all messages for Emacs-related lists mirrored at yhetil.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.