[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using `save-window-excursion' instead of `save-excursion' for `comme
From: |
Stefan Monnier |
Subject: |
Re: Using `save-window-excursion' instead of `save-excursion' for `comment-region'? |
Date: |
Thu, 05 Dec 2013 13:29:49 -0500 |
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.
I'm not sure exactly what means "point is lost" in this case, but if
using save-window-excursion solves the problem, it's only by accident.
Stefan