notmuch/emacs
Austin Clements e7ade21d56 emacs: Fix trimming regexp in notmuch-check-exit-status
For such a simple regexp, this was broken in a very complicated way.

The intent was to strip the newline (and potentially other whitespace)
off the end of the error string so there wasn't an extra newline in
the error signal.  However, the regexp was deeply dependent on the
active syntax table and the subtleties of $.  We didn't notice this
because all notmuch major modes put ?\n in the whitespace class, which
makes this behaved as intended: the "\\s " matches all newlines, but
by matching the newline character, causes the $ *not* to match
*except* where it matched the empty string at the very end of the
string, which was not followed by a newline.

However, if the syntax table declares ?\n to be non-whitespace
(lisp-mode declares it as endcomment, and is likely to be the mode
you're in when testing functions), then this regexp behaves completely
differently, matching trailing spaces at the end of every line within
the string.

The solution is to say what we mean for whitespace *and* to switch
from $ to \', which matches only the end of the string, rather than
the end of each line.  Both are necessary or this will strip away
interior newlines, which is not what we want.
2013-05-27 18:19:03 -03:00
..
coolj.el emacs: Add more functions to clean up text/plain parts 2010-04-26 10:05:46 -07:00
make-deps.el emacs: Compute build dependencies to fix byte compile issues 2013-05-23 08:06:12 -03:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local emacs: Compute build dependencies to fix byte compile issues 2013-05-23 08:06:12 -03:00
notmuch-address.el emacs/notmuch-address.el: add notmuch-address-selection-function 2013-05-13 21:05:29 -03:00
notmuch-crypto.el emacs: show: make buttons select window 2013-02-18 20:13:19 -04:00
notmuch-hello.el emacs: fixed (declare-function ...) definitions 2013-04-30 06:13:18 -03:00
notmuch-lib.el emacs: Fix trimming regexp in notmuch-check-exit-status 2013-05-27 18:19:03 -03:00
notmuch-logo.png emacs: Add notmuch-hello.el, a friendly frontend to notmuch 2010-04-23 12:50:18 -07:00
notmuch-maildir-fcc.el emacs: derive correct timestamp in FCC unique name 2012-06-22 07:39:21 -03:00
notmuch-message.el emacs: use new tag change helper to mark messages as replied 2012-09-19 08:03:35 -03:00
notmuch-mua.el emacs: Use --format-version for search, show, and reply 2012-12-16 17:22:26 -04:00
notmuch-print.el emacs: Put notmuch-print-mechanism in custom group notmuch-show 2012-04-24 23:25:51 -03:00
notmuch-query.el emacs: Use --format-version for search, show, and reply 2012-12-16 17:22:26 -04:00
notmuch-show.el emacs: add show view bindings to move to previous/next thread 2013-05-26 18:48:31 -03:00
notmuch-tag.el emacs: tag: fix compile warning 2013-05-15 22:23:58 -03:00
notmuch-wash.el emacs: show: handle inline patch fake parts at top level 2013-05-20 15:01:59 -03:00
notmuch.el emacs: Proper error string handling in search sentinel 2013-05-18 07:50:11 -03:00