[PATCH 3/3] emacs: Prefer '[No Subject]' to blank subjects.

David Edmondson dme at dme.org
Fri Jan 27 02:28:56 PST 2012


On Fri, 27 Jan 2012 10:23:07 +0000, Mark Walters <m.walters at qmul.ac.uk> wrote:
> I am very much not a lisp expert

Me neither, so please do continue to review stuff.

> The patch 1/3 seems to set the show buffer line to *[No Subject]* where
> it used to be just [No Subject]. (I have no preference: I just wasn't
> sure if that was intentional.

There was inconsistency before, now the buffer name always has the
surrounding *s.

> Patch 3/3:
> > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> > index e6a5b31..c602b3e 100644
> > --- a/emacs/notmuch-show.el
> > +++ b/emacs/notmuch-show.el
> > @@ -985,7 +985,7 @@ buffer."
> >        (notmuch-show-next-open-message))
> >  
> >      ;; Set the header line to the subject of the first open message.
> > -    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))
> > +    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))
> >  
> >      (notmuch-show-mark-read)))
> >  
> > @@ -1216,6 +1216,9 @@ Some useful entries are:
> >  (defun notmuch-show-get-depth ()
> >    (notmuch-show-get-prop :depth))
> >  
> > +(defun notmuch-show-get-pretty-subject ()
> > +  (notmuch-prettify-subject (notmuch-show-get-subject)))
> > +
> >  (defun notmuch-show-set-tags (tags)
> >    "Set the tags of the current message."
> >    (notmuch-show-set-prop :tags tags)
> 
> As far as I can see notmuch-show-get-pretty-subject is only called once
> so I wondered why you bothered with a new function. But as I say I have
> almost zero lisp experience so no feel for lisp style.

Just mirroring the existing structure really.
`notmuch-show-get-<something>' to access details of the message. I've no
strong preference.
-------------- 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/20120127/7d8886f0/attachment.pgp>


More information about the notmuch mailing list