Giter VIP home page Giter VIP logo

python-x.el's People

Contributors

syohex avatar vspinu avatar wavexx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

syohex vspinu

python-x.el's Issues

Add to the readme: how to change the delimiter

I would guess one of the first thing people would like to know is how to set the section delimiter. Many IDEs use "# %%". While everything is documented very well, a comment in the readme would be helpful:
(setq python-section-delimiter "# %%")

Make evaluation commands print output

Hi. I love this new project. Thanks!

Currently all evaluation commands don't show output. As an ESS user, that's extremely annoying. I don't even know if the command finished or not.

Looking at the difference between standard evaluation commands and python-shell-print-region-or-symbol I see it's all about python-shell-buffer-substring wrapper. I haven't investigated this further. Is there a way to make python print last value automatically?

Unique prefix for the package

While familiarizing myself with the code base I noticed that hijacking the prefix from python.el makes the code comprehension and navigation a bit difficult. It's hard to mentally separate the projects.

Before the package is too big, would you consider switching to a package prefix? Maybe pythonx or pyx?

Proposals for enhancement of the evaluation system.

Evaluation commands:

I think the whole evaluation system could be effectively narrowed to 4 versatile functions:

  1. send-region-fold-or-section-or-defun-or-paragraph (no output by default)
  2. send-region-fold-or-section-or-defun-or-paragraph-and-step (no output by default)
  3. send-region-or-line (with output)
  4. send-region-or-line-and-step (with output)
  5. send-buffer

The current python-shell-print-region-or-symbol should be deprecated by an inspector as proposed in #3.

I think dwim name is opaque. Longer and explicit names like above are more suggestive IMO. Currently send-dwim is most closely related to 2 but is not as flexible.

Alternatively there could be send-dwim and send-dwim-and-step and a configuration variable with a list of expansions '(fold region section defun paragraph) that users can customize. Something like (er/try-expansions).

The above system would fit nicely into ESS aswell without breaking anything. 1 would be hooked on C-M-x and 2 on C-c C-c.

What do you think? Would it make sense to strive for uniform and clean UI as above?

Enhanced section markup:

  1. Allow multiple # in front
  2. Allow missing space #---
  3. Mark blocks that you want send functions to skip with # --- #

Quick and dirty inspector?

In ess (R dialect) you get C-c C-d C-e (with last C-e cycling). It cycles through concise representation of objects defined in:

ess-R-describe-object-at-point-commands is a variable defined in ‘ess-custom.el’.
Its value is (("str(%s)")
 ("htsummary(%s, hlength = 20, tlength = 20)")
 ("summary(%s, maxsum = 20)"))

I am using it hundreds of times a day and feel like stupid in python without it. Do you think it would be difficult to device something like that for python-x?

Is there a generic function that that would work on all python objects by constructing hierarchical representation with a short summary for each field (like str in R)?

Emacs 25.1

Just made the switch, but I noticed that several behaviors changed in python-mode. Most of the send-buffer machinery works, but process tracking doesn't anymore.

There are also some new behaviors that I don't like (such as defaulting to shared processes by default). This might actually be a good argument for forking the mode and starting clean :/

Move to GitLab

I'll be moving my source repositories to GitLab (https://gitlab.com/wavexx/) during the next few days.

I've been waiting to do this for a long time (at least since 2015) but I never switched because of network effects. I'll now use the acquisition news as an excuse to jump the shark!

This repository will be turned into a read-only archive after the migration and effectively become stale.
Since all issues and PR will be mirrored on gitlab, I'll also close all of them in github and reference this issue to make sure this is not going to be ignored.

See you on the other side!

Returning to the source buffer from inferior doesn't work

The current implementation of python-shell-switch-to-buffer is not very practical. It stores the buffer from where the process was started. After some time that buffer need not even exists.

I think the most meaningful would be to return to either the most recent python buffer or the last buffer from where the evaluation or switch to inferiror happened. This is how ESS and Elpy, for what matter, does.

Shall I propose a pull?

Process management

python.el's management of processes is too simplistic: You can either have a single global process, or a dedicated process per-buffer. Since you cannot select/associate buffers to processes, I always end up creating dedicated processes, but then have to resort to manual yanking into the process's buffer to evaluate code that I'm debugging in a library.

The simplest behavior I can think of to fix this is:

  • add a basic function to generate a process/buffer tree [which can be used for selection]
  • allow to change the associated process once a buffer is created (by reusing the above)
  • modify the prompt to create a new process to: global process/dedicated process/select existing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.