From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?S=c3=a9bastien_Miquel?= Subject: 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: Sun, 2 Feb 2020 11:22:33 +0100 Message-ID: <603f9c4e-c621-7592-5b20-a7354c11d5d2@posteo.eu> 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]:44926) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyCOm-0005PG-Bv for emacs-orgmode@gnu.org; Sun, 02 Feb 2020 05:22:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyCOk-00019Y-OG for emacs-orgmode@gnu.org; Sun, 02 Feb 2020 05:22:39 -0500 Received: from mout02.posteo.de ([185.67.36.66]:40135) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iyCOk-00013a-67 for emacs-orgmode@gnu.org; Sun, 02 Feb 2020 05:22:38 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id DA5452400FB for ; Sun, 2 Feb 2020 11:22:34 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 489Rpy2WS8z9rxV for ; Sun, 2 Feb 2020 11:22:34 +0100 (CET) Content-Language: fr 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: emacs-orgmode@gnu.org Given the following src block in org-mode: #+BEGIN_SRC emacs-lisp (defun my-function () =C2=A0 (instruction1) =C2=A0 (instruction2) ;;=C2=A0 (instruction3) =C2=A0 ) #+END_SRC Steps to reproduce (with emacs -Q): =C2=A01) set org-src-tab-acts-natively to t =C2=A02) set the mark at the beginning of the function definition inside= the=20 src block =C2=A03) move point to the last line of the src block =C2=A04) call org-indent-region Effect: the code is indented, but the cursor is moved to first line of the block. Expected: the code is indented, and the cursor doesn't move. Emacs=C2=A0 : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version = 3.24.10) =C2=A0of 2019-08-29 Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @=20 /usr/share/emacs/26.3/lisp/org/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq =C2=A0org-src-mode-hook '(org-src-babel-configure-edit-buffer =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 org-src-m= ode-configure-edit-buffer) =C2=A0org-after-todo-state-change-hook '(org-clock-out-if-current) =C2=A0org-metadown-hook '(org-babel-pop-to-session-maybe) =C2=A0org-clock-out-hook '(org-clock-remove-empty-clock-drawer) =C2=A0org-mode-hook '(#[0 "\300\301\302\303\304$\207" =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 [add-hook change-majo= r-mode-hook org-show-block-all append =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 local] =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 5] =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0#[0 "\300\301\302\303\304$\2= 07" =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 [add-hook change-majo= r-mode-hook org-babel-show-result-all =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 append local] =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 5] =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0org-babel-result-hide-spec o= rg-babel-hide-all-hashes) =C2=A0org-archive-hook '(org-attach-archive-delete-maybe) =C2=A0org-confirm-elisp-link-function 'yes-or-no-p =C2=A0org-agenda-before-write-hook '(org-agenda-add-entry-text) =C2=A0org-metaup-hook '(org-babel-load-in-session-maybe) =C2=A0org-bibtex-headline-format-function #[257 "\300=01\236A\207" [:tit= le] 3=20 "\n\n(fn ENTRY)"] =C2=A0org-babel-pre-tangle-hook '(save-buffer) =C2=A0org-tab-first-hook '(org-babel-hide-result-toggle-maybe =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 org= -babel-header-arg-expand) =C2=A0org-occur-hook '(org-first-headline-recenter) =C2=A0org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-d= rawers =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 org-cycle-show-empty-lines =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 org-optimize-window-after-v= isibility-change) =C2=A0org-speed-command-hook '(org-speed-command-activate =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 org-babe= l-speed-command-activate) =C2=A0org-confirm-shell-link-function 'yes-or-no-p =C2=A0org-link-parameters '(("id" :follow org-id-open) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("rmail" :follow org-rmail-open :store =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 org-rmail-store= -link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("mhe" :follow org-mhe-open :store org-mhe-store-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("irc" :follow org-irc-visit :store org-irc-store-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("info" :follow org-info-open :export org-info-export =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 :store org-info= -store-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("gnus" :follow org-gnus-open :store =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 org-gnus-store-= link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("docview" :follow org-docview-open :export =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 org-docview-exp= ort :store org-docview-store-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("bibtex" :follow org-bibtex-open :store =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 org-bibtex-stor= e-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("bbdb" :follow org-bbdb-open :export org-bbdb-export =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 :complete org-b= bdb-complete-link :store =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 org-bbdb-store-= link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("w3m" :store org-w3m-store-link) ("file+sys") =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("file+emacs") ("doi" :follow org--open-doi-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("elisp" :follow org--open-elisp-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("file" :complete org-file-complete-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("ftp" :follow =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (lambda (path) = (browse-url (concat "ftp:" path)))) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("help" :follow org--open-help-link) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("http" :follow =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (lambda (path) = (browse-url (concat "http:" path)))) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("https" :follow =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (lambda (path) = (browse-url (concat "https:" path)))) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("mailto" :follow =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (lambda (path) = (browse-url (concat "mailto:" path)))) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("news" :follow =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (lambda (path) = (browse-url (concat "news:" path)))) =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ("shell" :follow org--open-shell-link)) =C2=A0)