From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: Using `save-window-excursion' instead of `save-excursion' for `comment-region'? Date: Thu, 05 Dec 2013 13:49:34 +0100 Message-ID: <52A0765E.5050701@online.de> References: <87y53zk3dx.fsf@bzg.ath.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1386247726 31871 80.91.229.3 (5 Dec 2013 12:48:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Dec 2013 12:48:46 +0000 (UTC) Cc: Bastien To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 05 13:48:50 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VoYMK-0002rY-7r for ged-emacs-devel@m.gmane.org; Thu, 05 Dec 2013 13:48:48 +0100 Original-Received: from localhost ([::1]:53297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoYMJ-0002Re-SX for ged-emacs-devel@m.gmane.org; Thu, 05 Dec 2013 07:48:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoYKA-0008HX-Vl for emacs-devel@gnu.org; Thu, 05 Dec 2013 07:46:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoYK3-00023g-9p for emacs-devel@gnu.org; Thu, 05 Dec 2013 07:46:34 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.8]:51948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoYK2-00022w-Tq for emacs-devel@gnu.org; Thu, 05 Dec 2013 07:46:27 -0500 Original-Received: from purzel.sitgens (brln-4db91bcb.pool.mediaWays.net [77.185.27.203]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0LqYDd-1VK9Fx0oBV-00eJ3E; Thu, 05 Dec 2013 13:46:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: <87y53zk3dx.fsf@bzg.ath.cx> X-Provags-ID: V02:K0:GPMt2qnI6/99joG9KR2jz8K3x61zJXLefwePOG/vyAy Qm+RR1rgRIqT4+V1gpr4nMkhC1+4oEaUEsZNYSfDbsINklp3TZ JT8mxrI0V3oH8LIPp6MlyH7mLLE+4KYrVMAPCGMtDfrAPBmvMt t4OKwFQhxPDllH1uzj5w6iDSfs0tLe1wk+TGYwt8az9c+JoySJ c4foR6M8KEdAsPDsHYF9zbj/HbZmekAVHPzEx8xXVEEOtUBeka PadHq0+VftiI1dFi6zM3BsZAFaDTu0/vxcFLF27V0A7P0hTgqP mkN2oGMWIjCQFTnVKI00UTaqJW9IC31GwB/DhQRsEoEmkjW9sT /7VXMBRK+r2cYt72d3AU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.17.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166115 Archived-At: Am 05.12.2013 11:18, schrieb Bastien: > 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, > Hi Bastien, last time I've seen in, indirect buffers were used, which would be worth mentioning. Andreas