emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2018-03-01 12:13 Kevin Brubeck Unhammer
  2018-03-03 22:36 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Brubeck Unhammer @ 2018-03-01 12:13 UTC (permalink / raw)
  To: emacs-orgmode

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/)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 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/)]
  2018-03-01 12:13 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/)] Kevin Brubeck Unhammer
@ 2018-03-03 22:36 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-03-03 22:36 UTC (permalink / raw)
  To: Kevin Brubeck Unhammer; +Cc: emacs-orgmode

Hello,

Kevin Brubeck Unhammer <unhammer@fsfe.org> writes:

> 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.)

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-03 22:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 12:13 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/)] Kevin Brubeck Unhammer
2018-03-03 22:36 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).