[PATCH 1/3] emacs: Stop the `truncate-string-to-width' madness.
David Edmondson
dme at dme.org
Mon Jan 30 01:16:24 PST 2012
On Sat, 28 Jan 2012 00:09:58 -0500, Austin Clements <amdragon at MIT.EDU> wrote:
> Quoth David Edmondson on Jan 25 at 1:48 pm:
> > There's no need to call `truncate-string-to-width' twice in this code
> > path.
>
> LGTM if what I point out below is okay. Technically this changes the
> behavior of this code, but what it did before was obviously wrong (if
> you do roll a new version, I'd mention this in the commit message; but
> no need to do that just for this).
>
> > ---
> > emacs/notmuch.el | 14 ++++++--------
> > 1 files changed, 6 insertions(+), 8 deletions(-)
> >
> > diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> > index 3ec0816..3f6b977 100644
> > --- a/emacs/notmuch.el
> > +++ b/emacs/notmuch.el
> > @@ -441,18 +441,16 @@ Complete list of currently available key bindings:
> > (interactive "P")
> > (let ((thread-id (notmuch-search-find-thread-id))
> > (subject (notmuch-search-find-subject)))
> > +
> > + (if (string-match "^[ \t]*$" subject)
> > + (setq subject "[No Subject]"))
> > +
>
> Is subject necessarily a string at this point? Previously this only
> ran if the code determined there was a thread at point.
No, it's a bug. It's fixed in the third patch, but should be fixed here
as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120130/96898fb4/attachment.pgp>
More information about the notmuch
mailing list