mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-26 10:49:38 +00:00
Fix problem when org-capturing text from French email
* lisp/org-gnus.el (org-gnus-store-link): Remove text properties of subject string to avoid Emacs bug
This commit is contained in:
parent
1c3f69ea28
commit
995c4532f7
@ -120,22 +120,26 @@ If `org-store-link' was called with a prefix arg the meaning of
|
||||
|
||||
((memq major-mode '(gnus-summary-mode gnus-article-mode))
|
||||
(let* ((group gnus-newsgroup-name)
|
||||
(header (with-current-buffer gnus-summary-buffer
|
||||
(header (with-current-buffer gnus-summary-buffer
|
||||
(gnus-summary-article-header)))
|
||||
(from (mail-header-from header))
|
||||
(message-id (org-remove-angle-brackets (mail-header-id header)))
|
||||
(date (mail-header-date header))
|
||||
(subject (mail-header-subject header))
|
||||
(to (cdr (assq 'To (mail-header-extra header))))
|
||||
newsgroups x-no-archive desc link)
|
||||
(subject (copy-sequence (mail-header-subject header)))
|
||||
(to (cdr (assq 'To (mail-header-extra header))))
|
||||
newsgroups x-no-archive desc link)
|
||||
;; Remove text properties of subject string to avoid Emacs bug
|
||||
;; #3506
|
||||
(set-text-properties 0 (length subject) nil subject)
|
||||
|
||||
;; Fetching an article is an expensive operation; newsgroup and
|
||||
;; x-no-archive are only needed for web links.
|
||||
(when (org-xor current-prefix-arg org-gnus-prefer-web-links)
|
||||
;; Make sure the original article buffer is up-to-date
|
||||
(save-window-excursion (gnus-summary-select-article))
|
||||
(setq to (or to (gnus-fetch-original-field "To"))
|
||||
newsgroups (gnus-fetch-original-field "Newsgroups")
|
||||
x-no-archive (gnus-fetch-original-field "x-no-archive")))
|
||||
;; Make sure the original article buffer is up-to-date
|
||||
(save-window-excursion (gnus-summary-select-article))
|
||||
(setq to (or to (gnus-fetch-original-field "To"))
|
||||
newsgroups (gnus-fetch-original-field "Newsgroups")
|
||||
x-no-archive (gnus-fetch-original-field "x-no-archive")))
|
||||
(org-store-link-props :type "gnus" :from from :subject subject
|
||||
:message-id message-id :group group :to to)
|
||||
(setq desc (org-email-link-description)
|
||||
|
Loading…
Reference in New Issue
Block a user