[Top][All Lists]

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

Using `save-window-excursion' instead of `save-excursion' for `comment-r

From: Bastien
Subject: Using `save-window-excursion' instead of `save-excursion' for `comment-region'?
Date: Thu, 05 Dec 2013 11:18:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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

Thanks for your feedback,


reply via email to

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