emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* routine "org-vm-select-message" in "ol-vm.el"
@ 2021-06-04  2:49 Alan Wehmann
  2021-09-26  6:16 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Wehmann @ 2021-06-04  2:49 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

I am using:

Org mode version 9.4.6 (9.4.6-2-g21eb69-elpa @ /Users/alanwehmann/.emacs.d/elpa/org-20210524/)
GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2020-08-12
VM version is: 8.2.0b
org-plus-contrib-20210531 package

I have found emails (in VM) which have e.g. the following lines in them:

Message-ID:
 <CH0PR20MB4028E04BA1B8CE21C1F57A3BAE2D9@CH0PR20MB4028.namprd20.prod.outlook.com>

i.e. a line break after the colon.

This cannot be matched by the following code from function "org-vm-select-message" found in "ol-vm.el" from "org-plus-contrib-20210531":

    (if (not (re-search-forward
              (concat "^" "message-id: *" (regexp-quote message-id))))
        (error "Could not find the specified message in this folder"))

The following change to this code works:

    (if (not (re-search-forward
              (concat "^" "message-id:\\s-*" (regexp-quote message-id))))
        (error "Could not find the specified message in this folder"))

since "\\s-" matches white space, including line breaks.

Alan Wehmann
alan.wehmann@gmail.com


[-- Attachment #2: Type: text/html, Size: 2753 bytes --]

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

* Re: routine "org-vm-select-message" in "ol-vm.el"
  2021-06-04  2:49 routine "org-vm-select-message" in "ol-vm.el" Alan Wehmann
@ 2021-09-26  6:16 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2021-09-26  6:16 UTC (permalink / raw)
  To: Alan Wehmann; +Cc: emacs-orgmode

Hi Alan,

Alan Wehmann <alan.wehmann@gmail.com> writes:

> The following change to this code works:
>
>     (if (not (re-search-forward
>               (concat "^" "message-id:\\s-*" (regexp-quote message-id))))
>         (error "Could not find the specified message in this folder"))
>
> since "\\s-" matches white space, including line breaks.

thanks, fixed in org-contrib:
https://git.sr.ht/~bzg/org-contrib/commit/8bed20b1440f4fe26505eb6107dd52038ec993fd

-- 
 Bastien


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

end of thread, other threads:[~2021-09-26  6:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04  2:49 routine "org-vm-select-message" in "ol-vm.el" Alan Wehmann
2021-09-26  6:16 ` Bastien

Code repositories for project(s) associated with this 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).