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

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

Date: Fri, 27 Jan 2012 10:28:56 +0000

To: Mark Walters, notmuch@notmuchmail.org

Cc:

From: David Edmondson


On Fri, 27 Jan 2012 10:23:07 +0000, Mark Walters <m.walters@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.
part-000.sig (application/pgp-signature)

Thread: