emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 925e0ea 14/15: Remove mail-citation-prefix-regexp


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 925e0ea 14/15: Remove mail-citation-prefix-regexp from strings to snarf
Date: Thu, 22 Mar 2018 00:58:58 -0400 (EDT)

branch: externals/ebdb
commit 925e0ea3d005ce7ba16577029ffd051308d36f54
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Remove mail-citation-prefix-regexp from strings to snarf
    
    * ebdb-snarf.el (ebdb-snarf-collect): Work with common case of
      snarfing mail messages.
---
 ebdb-snarf.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ebdb-snarf.el b/ebdb-snarf.el
index 6f85a0e..77c6984 100644
--- a/ebdb-snarf.el
+++ b/ebdb-snarf.el
@@ -176,7 +176,11 @@ list of other field instances.  Any element can be nil."
                  "\\)[-\n ,:]*")))
 
     (with-temp-buffer
-      (insert str)
+      ;; Snarfing mail buffers is very common, try deleting citation
+      ;; prefixes from the buffer first.
+      (insert (replace-regexp-in-string
+              (concat "^" mail-citation-prefix-regexp "[:blank:]+")
+              "" str))
       (goto-char (point-min))
       (while (re-search-forward big-re nil t)
        (let* ((start (goto-char (match-beginning 0)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]