unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Using `save-window-excursion' instead of `save-excursion' for `comment-region'?
@ 2013-12-05 10:18 Bastien
  2013-12-05 11:46 ` martin rudalics
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Bastien @ 2013-12-05 10:18 UTC (permalink / raw)
  To: emacs-devel

In Org buffer, you can comment code within source blocks.  This opens
a new buffer, insert the code there, comment it, and insert the buffer
contents back into Org's buffer.

With the current `comment-region' function, point is lost when Org
goes back to the org buffer.  Using `save-window-excursion' instead
of `save-excursion' fixes the problem.

Are you aware of problems that this change may trigger?

I cannot think of any, but I'm always a bit cautious when using
`save-window-excursion'.

Thanks for your feedback,

-- 
 Bastien




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-12-06  9:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-05 10:18 Using `save-window-excursion' instead of `save-excursion' for `comment-region'? Bastien
2013-12-05 11:46 ` martin rudalics
2013-12-05 12:49 ` Andreas Röhler
2013-12-05 18:29 ` Stefan Monnier
2013-12-05 18:43   ` Bastien
2013-12-05 19:05     ` Aaron Ecay
2013-12-05 19:45       ` Stefan Monnier
2013-12-06  9:49         ` Bastien
2013-12-06  9:58           ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).