From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Brubeck Unhammer Subject: Bug: org-gnus-store-link wrong if used from article buffer when point moved in summary [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)] Date: Thu, 01 Mar 2018 13:13:48 +0100 Message-ID: <87efl4xabn.fsf@fsfe.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erN5w-0000MR-HE for emacs-orgmode@gnu.org; Thu, 01 Mar 2018 07:13:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erN5s-0003Uo-DA for emacs-orgmode@gnu.org; Thu, 01 Mar 2018 07:13:56 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33081) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erN5s-0003TT-87 for emacs-orgmode@gnu.org; Thu, 01 Mar 2018 07:13:52 -0500 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.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ Hi, If you open an article in Gnus, then move the point away from the summary line of that article in the Summary buffer, then go back to the Article buffer and M-x org-store-link, it will link to the article you're pointing at in the Summary, not the article in the Article buffer. The issue is at line 145 in https://code.orgmode.org/bzg/org-mode/raw/master/lisp/org-gnus.el which does (header (with-current-buffer gnus-summary-buffer (gnus-summary-article-header))) (I'm running 8.2.10 normally, but I've tried the most recent org-gnus.el and it's the same, and the code makes it clear why.) In my own code I use the following workaround: (if (eq major-mode 'gnus-article-mode) (save-window-excursion (gnus-article-show-summary) (org-store-link nil)) (org-store-link nil)) although someone with knowledge of gnus internals might be able to avoid the call to (gnus-configure-windows 'article) that changes the window configuration. (Or maybe org-mode should simply use the above workaround since that assumes less about gnus internals, which might change more than its public API.) best regards, Kevin Brubeck Unhammer Emacs : GNU Emacs 25.3.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-12 Package: Org-mode version 8.2.10 (release_8.2.10 @ /usr/share/emacs/25.3/lisp/org/)