summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Lundin <mdl@imapmail.org>2017-11-29 09:17:55 -0600
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-11-29 19:02:57 +0100
commit84b329516efbe92ea5385f2aa2ad2779ab44b427 (patch)
tree5b3c3798172163ba78089f282a0424011a98e971
parent45c45027138624eb586d7ccca06226e333dd8c5a (diff)
downloadorg-mode-84b329516efbe92ea5385f2aa2ad2779ab44b427.tar.gz
Preserve position of point in gnus virtual group
* lisp/org-gnus.el: (org-gnus-store-link) Add a save-excursion to protect the position of point. Otherwise, when calling org-capture in an article with a virtual group, the point is moved and the region captured is incorrect.
-rw-r--r--lisp/org-gnus.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index 687bc08..27a968f 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -120,7 +120,8 @@ If `org-store-link' was called with a prefix arg the meaning of
(let* ((group
(pcase (gnus-find-method-for-group gnus-newsgroup-name)
(`(nnvirtual . ,_)
- (car (nnvirtual-map-article (gnus-summary-article-number))))
+ (save-excursion
+ (car (nnvirtual-map-article (gnus-summary-article-number)))))
(`(nnir . ,_)
(nnir-article-group (gnus-summary-article-number)))
(_ gnus-newsgroup-name)))