From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?S=c3=a9bastien_Miquel?= Subject: Re: Bug: org-indent-region doesn't restore cursor position when org-src-tab-acts-natively is t [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)] Date: Sat, 29 Feb 2020 21:24:14 +0100 Message-ID: <0b735431-d1e3-090d-da9f-904bd538b57f@posteo.eu> References: <603f9c4e-c621-7592-5b20-a7354c11d5d2@posteo.eu> <87zhdz1par.fsf@gnu.org> <878slijpzg.fsf@gnu.org> <4545c239-c8bf-fa16-2591-b0ee541ea732@posteo.eu> <87d0andkmi.fsf@gnu.org> Reply-To: sebastien.miquel@posteo.eu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49298) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j88es-0005Zo-IW for emacs-orgmode@gnu.org; Sat, 29 Feb 2020 15:24:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j88ep-0003D8-VO for emacs-orgmode@gnu.org; Sat, 29 Feb 2020 15:24:21 -0500 Received: from mout02.posteo.de ([185.67.36.66]:54949) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j88eo-0003CW-6r for emacs-orgmode@gnu.org; Sat, 29 Feb 2020 15:24:18 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 91DF02400FD for ; Sat, 29 Feb 2020 21:24:15 +0100 (CET) In-Reply-To: <87d0andkmi.fsf@gnu.org> Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Cc: emacs-orgmode@gnu.org Hi Bastien, Thank you again for looking into this. I guess you couldn't find an easy=20 fix. This bug is quite the pain, since it gets triggered by the comment-line=20 function: every time I try to comment something, the cursor goes to the=20 beginning of the block. With org-src-tab-acts-natively being set to t by default, it may impact=20 a lot of people. Sorry to be nagging you, my elisp-fu is barely above kill/yank level,=20 but I'm still curious why save-excursion seemingly isn't doing its job he= re. > Hi S=C3=A9bastien, > > yes, the initial fix was wrong. > > The current behavior when the region is active in a src block is to > indent the whole source block, which is not what the user expect. The > problem with the cursor going back to the beginning of the block comes > on top of this (bigger?) problem. > > I could not find a proper fix yet, I will try later this week. > > Thanks, >