From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iOZWEkrgDWVxBAAAauVa8A:P1 (envelope-from ) for ; Fri, 22 Sep 2023 20:43:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iOZWEkrgDWVxBAAAauVa8A (envelope-from ) for ; Fri, 22 Sep 2023 20:43:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C22443D059 for ; Fri, 22 Sep 2023 20:43:21 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=e8lrNXel; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695408202; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/q/RJr8Jf6U8+bAIrOqzPhp2Pfc+ryZufMevxgx357o=; b=K11NRhtZUJx2ghhkDmha6xGtzCdtbtK0+HV/ugowKBYc1jXiB7lY4sd0ewk3l67YUzc6TY nQ6PFiD4TxxGvESrXuAAF6C3/POLqkQMmd6UfFABjpN4wVmyOHc0T4YoypF/pOnYHpGL+p 78FksXzyeEa7JDctmPvjl1eQKmyGHiSGByl564IRBVRw2dZQaglRU2zTTVDATgw3uj8R0H Y032kYr++dqWt+o4ZegJaAtzMhxQN/WJZ0VBaT32hTgYiS193O6cLM0EgSvC5Asn7TqFTP b2VlHTYHatzhYeYYEDEz04MQnxVT/XW7Dqd3E7FPeaqd1EGRhdGv9FLRBPsJiw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=e8lrNXel; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695408202; a=rsa-sha256; cv=none; b=eKw61ZvLsjl8AdoVb4gvXLOAc/2/p1v2+paSPP5ZjQlZ5EDzlo7p1ADD7rfBacYbRIoaGj 9Yrdv/nuXkMmaEbKXC4TuPkmdsiMursjxO+4Lx/uoVQxWhZBKq9jHC7miNEzQUJ+87zJdt 0EAPiPeGx2gqVACRKGKdQB+ugdpQMM9Hvwgqv2GpdrCzvte6xrTI38slXCsHPvdkmT94sc KHInHCRSeMdsSo27J8Ux17Ak6Aevn6K2oBoqv6qg5CMyrmXl/QIzF4BU29ekETrajb9+nv vcStbOPAEUwpTcvPEuDM+rzywRsvubtozEIPSYt7We5T/VmHsuOmg7DG8dFSRA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjl6l-0002BY-SQ; Fri, 22 Sep 2023 14:42:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjl6i-0002BJ-S7 for emacs-orgmode@gnu.org; Fri, 22 Sep 2023 14:42:29 -0400 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjl6g-0004YA-V9 for emacs-orgmode@gnu.org; Fri, 22 Sep 2023 14:42:28 -0400 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6c4b9e09521so742904a34.3 for ; Fri, 22 Sep 2023 11:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695408144; x=1696012944; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=/q/RJr8Jf6U8+bAIrOqzPhp2Pfc+ryZufMevxgx357o=; b=e8lrNXelLi5+ILa3XFCdDkcjwE+lFc48q8zXyzLjD+tIYVjRgihTIZvk5tLW60q1ik xaIzxUc/7PEjoT/kVVinUxtstuZ35aVJTSLe/40LMZr3oD4n278F0gIYqrD4hYjteqHi 2thojUXga09iEfyZ1vtxrC0GhTgPuEc35R+hkpbWvDEfzw9iNr+WogtZoiXGFad1gFdz JALh1f6FhX338YQZcCNLS+7MOTAHqzUQu07rbcZwYbncn5C6cv3y+0Iq49VcbmxAjS8C wmfuwn8mUbK62v7mfQLeXk7i40ciEe9EYir0nkhPol+NlVYJAnH7y2kzN4He1EadkkYb qEOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695408144; x=1696012944; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/q/RJr8Jf6U8+bAIrOqzPhp2Pfc+ryZufMevxgx357o=; b=K93VPrBP4gus77dl2u88T2noMEWajaDVG3XXASLzLfBgg+vi8Un4jYTMEcIDO1L5lZ AzIGiqXf6eyyu6rwSi86JmeroXKfzmuHqfBrGVHS2L8HagijR3zu/APwZTJV5mcDtk0r DRAPC1sBw6R0DM/xBbMJkaIm/5soA+px7iy+uHrYTTIRsPXJT6ppBXKY1EGAGhBmprvE JrL5nYQ4AbD5SEF235ZtuLet7i7hxE9mX/0GnoXUm3ANG86N08ZCk5ThZgCeF6pPEExL UF/R9BIJFkZibls8riOjCXam5MJAWzmNxb2WsWsYPRvhCPsMPuilaqTHgK79NxSMmIkv oOOQ== X-Gm-Message-State: AOJu0Yyyu0CU6qqIATaoEcxb7vErJNVDrqesR95ti0onzbcLkdQETG9e PN3ARd1JcpWH7sbqzo/UjTbIdxMfGgioS1LaXuW+yVyjkJS5SA== X-Google-Smtp-Source: AGHT+IHiwipwwBiKtftR5ey8YbgHWoO+I4hqPDU2N7t2xTJQ+let1dq6iukAdPenfvilywr7fL1l6EJXzWCHiufCnCA= X-Received: by 2002:a05:6830:1442:b0:6b9:2e88:79cc with SMTP id w2-20020a056830144200b006b92e8879ccmr542541otp.19.1695408144104; Fri, 22 Sep 2023 11:42:24 -0700 (PDT) MIME-Version: 1.0 From: Gustavo Barros Date: Fri, 22 Sep 2023 15:42:13 -0300 Message-ID: Subject: [BUG] Point position with org-open-at-point on a heading [9.6.6 (release_9.6.6 @ /usr/local/share/emacs/29.1/lisp/org/)] To: org-mode list Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::32f; envelope-from=gtvbrs@gmail.com; helo=mail-ot1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HK_RANDOM_ENVFROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.52 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: C22443D059 X-Spam-Score: -6.52 X-TUID: PzQyfHGNBFZ8 Hi All, When point is on a heading, `org-open-at-point' offers to open links in the subtree. This is a very useful feature, and I use it a lot. However, in this case, `org-open-at-point' not only opens the link, but also moves point to said link. Perhaps there's some reason why point is not preserved in this case. But for me at least, this is not what I'd expect, and I find it somewhat disrupting, especially when I'm working on a folded tree (defeats speed keys, etc.). A simple test file to reproduce the described behavior: #+begin_src org ,* Heading Foo. https://orgmode.org/ Bar. #+end_src How about adding a `save-excursion' for this case inside `org-open-at-point'? Best regards, Gustavo. Emacs : GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-07-30 Package: Org mode version 9.6.6 (release_9.6.6 @ /usr/local/share/emacs/29.1/lisp/org/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-persist-directory "/tmp/org-persist-IhBaHK" org-fold-core-isearch-open-function 'org-fold--isearch-reveal org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-metaup-hook '(org-babel-load-in-session-maybe) )