message-signature vs. mu4e-compose-signature(-file), mail-header-separator as defcustom

635 views
Skip to first unread message

Jeff Kowalczyk

unread,
Jun 4, 2014, 4:14:26 PM6/4/14
to mu-di...@googlegroups.com
I'm using mu4e @a36d4b with Emacs 24.4.50.1. I have a compose draft buffer like
the following [1]:

  From: (own email)
  To: 
  Subject: 
  --text follows this line--
  -- 
  (contents of mu4e-compose-signature)

1. How do I configure compose to add blank line(s) before signature block
   separator, so I don't have to insert a line to edit message body?

2. Contrary to the mu4e manual, message-signature or message-signature-file have
   not worked on my machine to insert the signature text to the draft
   window.

   mu4e-compose-signature does work, should the documentation be updated?

   Are there plans for a mu4e-compose-signature-file?

3. Could mail-header-separator become a defcustom and/or regex? I'm hoping for
   routine use with simple headers, matching the first empty line '^$' (or
   allowing whitespace) would suffice as a separator. It would be interesting to
   experiment with regexes to match the first non rfc2822 valid header line.

   The motivation is partly aesthetic, and partly from experience inadvertently
   altering the default mail-header-separator string, breaking the message on
   send.

Thanks,
Jeff

[1] Where the draft buffer modeline is:

mu4e:compose MML Abbrev Fill Narrow

Joost Kremers

unread,
Jun 4, 2014, 4:39:59 PM6/4/14
to mu-di...@googlegroups.com

On Wed, Jun 04 2014, Jeff Kowalczyk <jeff.ko...@gmail.com> wrote:
> 1. How do I configure compose to add blank line(s) before signature block
> separator, so I don't have to insert a line to edit message body?

I'd like to know that too. :-) I think there used to be an empty line,
but at some point it disappeared.

> 2. Contrary to the mu4e manual, message-signature or message-signature-file have
> not worked on my machine to insert the signature text to the draft
> window.
>
> mu4e-compose-signature does work, should the documentation be updated?

Probably. I think this was a fairly recent change.

> 3. Could mail-header-separator become a defcustom and/or regex?

It's already a customisable option: `M-x customize-option RET
mail-header-separator'.

It can't be a regexp, though, because it has to be a string that can be
inserted into the buffer. `mail-header-separator' is not a mu4e
variable, BTW, so mu4e can't really change it.


--
Joost Kremers
Life has its moments

Tamas Papp

unread,
Jun 5, 2014, 1:26:16 AM6/5/14
to mu-di...@googlegroups.com
I don't have a signature, but a while ago a -- started to appear below
. I tried to get rid of it by setting various
variables, but it didn't work, so I am interested in a solution too.

Best,

Tamas

On Wed, Jun 04 2014, Jeff Kowalczyk <jeff.ko...@gmail.com> wrote:

--

Tamas Papp

unread,
Jun 5, 2014, 7:01:01 AM6/5/14
to mu-di...@googlegroups.com
I looked at the sources and found that

(setq mu4e-compose-signature-auto-include nil)

takes care of this.

However, it would make more sense not to insert the -- when
mu4e-compose-signature is NIL. I submitted an issue
( http://github.com/djcb/mu/issues/434 ) suggesting this.

Best,

Tamas

Seth J. Rothschild

unread,
Nov 4, 2014, 10:12:55 AM11/4/14
to public-mu-discuss-/J...@plane.gmane.org


Jeff Kowalczyk <jeff.kowalczyk-Re5...@public.gmane.org>
writes:

Jeff> Are there plans for a mu4e-compose-signature-file?

Super late, but I just ran into this as well. I have the following:

(defun file-string (file)
"Read the contents of a file and return as a string."
(with-current-buffer (find-file-noselect file)
(buffer-string)))

(setq mu4e-compose-signature (file-string "~/.emacs.d/.signature"))

Thought I should leave it here for people in the future searching the
mailing list looking for an answer.

-Seth


Reply all
Reply to author
Forward
0 new messages