* [PATCH] mml.el: Make sure that <#part> sections are at beginning of line.
@ 2008-05-19 16:08 Michael Olson
2008-05-19 17:36 ` Reiner Steib
0 siblings, 1 reply; 5+ messages in thread
From: Michael Olson @ 2008-05-19 16:08 UTC (permalink / raw)
To: ding
* lisp/gnus/mml.el (mml-read-part): Only look for parts at the beginning
of a line. This way emailed patches that just happen to have "<#part>"
in them will not be misinterpreted.
---
This patch is for the version of Gnus that is included with CVS HEAD in
Emacs. I thought I'd run it by the Gnus mailing list first to see if
I'm doing something mistaken.
lisp/gnus/mml.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 3aaa9c7..fedd469 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -431,7 +431,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
(point)
(match-beginning 0))))
(if (re-search-forward
- "<#\\(/\\)?\\(multipart\\|part\\|external\\|mml\\)." nil t)
+ "^<#\\(/\\)?\\(multipart\\|part\\|external\\|mml\\)." nil t)
(prog1
(mml-buffer-substring-no-properties-except-hard-newlines
beg (match-beginning 0))
--
1.5.4.3
--
| Michael Olson | FSF Associate Member #652 |
| http://mwolson.org/ | Hobbies: Lisp, HCoop |
| Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |
`-------------------------------------------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mml.el: Make sure that <#part> sections are at beginning of line.
2008-05-19 16:08 [PATCH] mml.el: Make sure that <#part> sections are at beginning of line Michael Olson
@ 2008-05-19 17:36 ` Reiner Steib
2008-05-19 17:51 ` Michael Olson
0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2008-05-19 17:36 UTC (permalink / raw)
To: Michael Olson; +Cc: ding
On Mon, May 19 2008, Michael Olson wrote:
> * lisp/gnus/mml.el (mml-read-part): Only look for parts at the beginning
> of a line. This way emailed patches that just happen to have "<#part>"
> in them will not be misinterpreted.
> ---
> This patch is for the version of Gnus that is included with CVS HEAD in
> Emacs. I thought I'd run it by the Gnus mailing list first to see if
> I'm doing something mistaken.
I'm not sure if it's correct. AFAICS, the specification doesn't say
that the tags are at the beginning of line, cf. (info "(emacs-mime)MML
Definition").
Maybe instead, we should check if there's a closing `<#/part>' or
`<#/multipart>' tag. If not, suggest to run `mml-quote-region' on the
body:
,----[ `C-h k <menu-bar> <Attachments> <Quote MML in region>' ]
| <menu-bar> <Attachments> <Quote MML in region> runs the command
| mml-quote-region
| which is an interactive compiled Lisp function in `mml.elc'.
| It is bound to <menu-bar> <Attachments> <Quote MML in region>, C-c RET q.
| (mml-quote-region beg end)
|
| Quote the MML tags in the region.
`----
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mml.el: Make sure that <#part> sections are at beginning of line.
2008-05-19 17:36 ` Reiner Steib
@ 2008-05-19 17:51 ` Michael Olson
2008-05-19 20:53 ` Reiner Steib
0 siblings, 1 reply; 5+ messages in thread
From: Michael Olson @ 2008-05-19 17:51 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]
Reiner Steib <reinersteib+gmane@imap.cc> writes:
> I'm not sure if it's correct. AFAICS, the specification doesn't say
> that the tags are at the beginning of line, cf. (info "(emacs-mime)MML
> Definition").
I guess it doesn't mention the beginning of the line. Is MML some sort
of widely-used standard, or is it specific to Message Mode / Gnus? If
it's local to Gnus, it might be nice to modify the definition to say
that tags must occur at the beginning of a line.
> Maybe instead, we should check if there's a closing `<#/part>' or
> `<#/multipart>' tag. If not, suggest to run `mml-quote-region' on the
> body:
The problem is that this creates ambiguity if both "<#part>" and
"<#/part>" are next to each other (like in this email message!). This
patch would completely remove the ambiguity.
--
| Michael Olson | FSF Associate Member #652 |
| http://mwolson.org/ | Hobbies: Lisp, HCoop |
| Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |
`-------------------------------------------------------'
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mml.el: Make sure that <#part> sections are at beginning of line.
2008-05-19 17:51 ` Michael Olson
@ 2008-05-19 20:53 ` Reiner Steib
2008-05-19 21:12 ` Michael Olson
0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2008-05-19 20:53 UTC (permalink / raw)
To: Michael Olson; +Cc: ding
On Mon, May 19 2008, Michael Olson wrote:
> I guess it doesn't mention the beginning of the line. Is MML some sort
> of widely-used standard, or is it specific to Message Mode / Gnus? If
> it's local to Gnus,
MML is supposed to be the standard Emacs way to compose MIME messages.
IIRC, MH-E uses it as well. I don't know if they use Message mode or
mail-mode (sendmail).
> it might be nice to modify the definition to say that tags must
> occur at the beginning of a line.
Having a separate part in the middle of a line is (should be)
perfectly valid:
Foo<#part type="image/x-xpixmap" filename="s.xpm"><#/part>Bar
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mml.el: Make sure that <#part> sections are at beginning of line.
2008-05-19 20:53 ` Reiner Steib
@ 2008-05-19 21:12 ` Michael Olson
0 siblings, 0 replies; 5+ messages in thread
From: Michael Olson @ 2008-05-19 21:12 UTC (permalink / raw)
To: Reiner Steib; +Cc: ding
[-- Attachment #1: Type: text/plain, Size: 569 bytes --]
Reiner Steib <reinersteib+gmane@imap.cc> writes:
> Having a separate part in the middle of a line is (should be)
> perfectly valid:
>
> Foo<#part type="image/x-xpixmap" filename="s.xpm"><#/part>Bar
Bleh, what is this, HTML email? ;^)
I suppose in this case, it would be best to go with your suggestion
instead.
--
| Michael Olson | FSF Associate Member #652 |
| http://mwolson.org/ | Hobbies: Lisp, HCoop |
| Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |
`-------------------------------------------------------'
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-05-19 21:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-19 16:08 [PATCH] mml.el: Make sure that <#part> sections are at beginning of line Michael Olson
2008-05-19 17:36 ` Reiner Steib
2008-05-19 17:51 ` Michael Olson
2008-05-19 20:53 ` Reiner Steib
2008-05-19 21:12 ` Michael Olson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).