[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch to optionally show Python process buffer after C-c C-c

From: Glenn Morris
Subject: Re: Patch to optionally show Python process buffer after C-c C-c
Date: Mon, 18 Jun 2012 17:32:02 -0400

Looks like the following reply was sent just to me, so I am resending
this to emacs-devel:

Fabian Ezequiel Gallina wrote (on Mon, 18 Jun 2012 at 16:12 -0300):

> 2012/6/18 Glenn Morris <address@hidden>:
> >
> > I tested it with M-x python-shell-send-string and it has no effect.
> > Use process-buffer to get the actual buffer to switch to?
> > The command python-shell-switch-to-shell does this.
> > So maybe just add an option to call that at the end of
> > python-shell-send-string?
> >
> > In line with current python name space, the option should probably be
> > called python-shell-something.
> >
> > I don't use python much, so I'll cc the mode's author.
> >
> > Context is here:
> >
> > http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00272.html
> >
> Hi all,
> I just saw the patch and I have to say I don't see much of a need to
> add that particular code. User is always at just one binding of having
> the shell shown via C-c C-z. Even if this is a customizable behavior
> users will have to deal with the shell showing even if they just sent
> the current buffer for the sake of having enhanced completion with an
> updated context.
> For the OP if he really wants this implemented here's a rough approach
> you can add to your .emacs:
> (defun python-shell-send-buffer-and-switch ()
>   (interactive)
>   (python-shell-send-buffer)
>   (python-shell-switch-to-shell))
> Also if you want something more general that would work with any of
> the python-shell-send-* functions, I would rather work on the
> python-shell-send-string function itself and add the check for the
> customization variable just there. For your use-case you might just
> def-advice it and add the defcustom check at the end and the
> python-shell-switch-to-shell.
> Regards,
> Fabián E. Gallina

reply via email to

[Prev in Thread] Current Thread [Next in Thread]