[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why does mml-attach-file put the attachment at the very end of the m
From: |
Marcin Borkowski |
Subject: |
Re: Why does mml-attach-file put the attachment at the very end of the message... |
Date: |
Mon, 26 Oct 2015 09:33:23 +0100 |
User-agent: |
mu4e 0.9.15; emacs 25.0.50.1 |
Ah, small correction: I should have said "\n-- \n" instead of "-- \n",
of course. Here it is:
--8<---------------cut here---------------start------------->8---
diff -c --label /usr/local/share/emacs/25.0.50/lisp/gnus/mml.el.gz --label
\#\<buffer\ mml.el.gz\> /tmp/jka-com2530smv /tmp/buffer-content-2530r6E
*** /usr/local/share/emacs/25.0.50/lisp/gnus/mml.el.gz
--- #<buffer mml.el.gz>
***************
*** 1374,1380 ****
(list file type description disposition)))
;; If in the message header, attach at the end and leave point unchanged.
(let ((head (unless (message-in-body-p) (point))))
! (if head (goto-char (point-max)))
(mml-insert-empty-tag 'part
'type type
;; icicles redefines read-file-name and returns a
--- 1374,1382 ----
(list file type description disposition)))
;; If in the message header, attach at the end and leave point unchanged.
(let ((head (unless (message-in-body-p) (point))))
! (when head
! (goto-char (point-max))
! (search-backward "\n-- \n" nil t))
(mml-insert-empty-tag 'part
'type type
;; icicles redefines read-file-name and returns a
Diff finished. Mon Oct 26 09:29:32 2015
--8<---------------cut here---------------end--------------->8---
On 2015-10-26, at 09:30, Marcin Borkowski <address@hidden> wrote:
> ...instead of right before the sigdashes?
>
> If there is no particular reason, I propose a patch below. My use case
> is a function that cycles through a few possible signatures, where at
> one point I delete everything after the sigdashes.
>
> --8<---------------cut here---------------start------------->8---
> diff -c --label /usr/local/share/emacs/25.0.50/lisp/gnus/mml.el.gz --label
> \#\<buffer\ mml.el.gz\> /tmp/jka-com2530smv /tmp/buffer-content-2530r6E
> *** /usr/local/share/emacs/25.0.50/lisp/gnus/mml.el.gz
> --- #<buffer mml.el.gz>
> ***************
> *** 1374,1380 ****
> (list file type description disposition)))
> ;; If in the message header, attach at the end and leave point unchanged.
> (let ((head (unless (message-in-body-p) (point))))
> ! (if head (goto-char (point-max)))
> (mml-insert-empty-tag 'part
> 'type type
> ;; icicles redefines read-file-name and returns a
> --- 1374,1382 ----
> (list file type description disposition)))
> ;; If in the message header, attach at the end and leave point unchanged.
> (let ((head (unless (message-in-body-p) (point))))
> ! (when head
> ! (goto-char (point-max))
> ! (search-backward "-- \n" nil t))
> (mml-insert-empty-tag 'part
> 'type type
> ;; icicles redefines read-file-name and returns a
>
> Diff finished. Mon Oct 26 09:29:32 2015
> --8<---------------cut here---------------end--------------->8---
>
> Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
- Why does mml-attach-file put the attachment at the very end of the message..., Marcin Borkowski, 2015/10/26
- Re: Why does mml-attach-file put the attachment at the very end of the message...,
Marcin Borkowski <=
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Katsumi Yamaoka, 2015/10/26
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Marcin Borkowski, 2015/10/26
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Andreas Schwab, 2015/10/26
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Marcin Borkowski, 2015/10/26
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Andreas Schwab, 2015/10/26
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Katsumi Yamaoka, 2015/10/26
- RE: Why does mml-attach-file put the attachment at the very end of the message..., Drew Adams, 2015/10/26
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Emanuel Berg, 2015/10/26
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Nicolas Richard, 2015/10/27
- Re: Why does mml-attach-file put the attachment at the very end of the message..., Alexis, 2015/10/26