Prechádzať zdrojové kódy

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.
Matt Lundin 7 rokov pred
rodič
commit
84b329516e
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      lisp/org-gnus.el

+ 2 - 1
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)))