all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* rmail and quoted-printable
@ 2006-08-31 22:37 Xavier Maillard
  2006-09-01 14:40 ` Kevin Rodgers
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Xavier Maillard @ 2006-08-31 22:37 UTC (permalink / raw)


Hi,

This is getting more and more annoying today.

I can't find an elegant solution to deal with all these mails sent
with QP encoded body.

What is exactly the way to go either with GNU Emacs (directly) or
using external programs.

I pre-sort/filter my mails using procmail but I did not find any
solution too.

What can I do see my mails ala old good way ?
Why is there so many MIME message with only one text/plain part ??

Regards
Crosspost & Followup-To: comp.emacs
-- 
Xavier

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-08-31 22:37 rmail and quoted-printable Xavier Maillard
@ 2006-09-01 14:40 ` Kevin Rodgers
       [not found] ` <mailman.6139.1157121909.9609.help-gnu-emacs@gnu.org>
  2006-09-05 16:32 ` Kaloian Doganov
  2 siblings, 0 replies; 16+ messages in thread
From: Kevin Rodgers @ 2006-09-01 14:40 UTC (permalink / raw)


Xavier Maillard wrote:
> I can't find an elegant solution to deal with all these mails sent
> with QP encoded body.
> 
> What is exactly the way to go either with GNU Emacs (directly) or
> using external programs.

Emacs: Gnus or VM

-- 
Kevin

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
       [not found] ` <mailman.6139.1157121909.9609.help-gnu-emacs@gnu.org>
@ 2006-09-01 22:05   ` maillaxa
  2006-09-02  1:57     ` Barry Margolin
  2006-09-02  9:48     ` Eli Zaretskii
  0 siblings, 2 replies; 16+ messages in thread
From: maillaxa @ 2006-09-01 22:05 UTC (permalink / raw)



Kevin Rodgers a écrit :

> Xavier Maillard wrote:
> > I can't find an elegant solution to deal with all these mails sent
> > with QP encoded body.
> >
> > What is exactly the way to go either with GNU Emacs (directly) or
> > using external programs.
>
> Emacs: Gnus or VM

I do not want to change my rmail solution for my mails. The question
was more on how to decode qp in rmail than what MUA I could use.

Anyway thank you.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-01 22:05   ` maillaxa
@ 2006-09-02  1:57     ` Barry Margolin
  2006-09-02  9:48     ` Eli Zaretskii
  1 sibling, 0 replies; 16+ messages in thread
From: Barry Margolin @ 2006-09-02  1:57 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

In article <1157148332.060114.148370@p79g2000cwp.googlegroups.com>,
 maillaxa@gmail.com wrote:

> Kevin Rodgers a écrit :
> 
> > Xavier Maillard wrote:
> > > I can't find an elegant solution to deal with all these mails sent
> > > with QP encoded body.
> > >
> > > What is exactly the way to go either with GNU Emacs (directly) or
> > > using external programs.
> >
> > Emacs: Gnus or VM
> 
> I do not want to change my rmail solution for my mails. The question
> was more on how to decode qp in rmail than what MUA I could use.
> 
> Anyway thank you.

I haven't read my mail in Emacs in a number of years, but when I did I 
used the rmail-mime package, and I think it automatically decoded 
quoted-printable.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-01 22:05   ` maillaxa
  2006-09-02  1:57     ` Barry Margolin
@ 2006-09-02  9:48     ` Eli Zaretskii
  2006-09-02 15:58       ` Xavier Maillard
  1 sibling, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2006-09-02  9:48 UTC (permalink / raw)


> From: maillaxa@gmail.com
> Date: 1 Sep 2006 15:05:32 -0700
> 
> > Xavier Maillard wrote:
> > > I can't find an elegant solution to deal with all these mails sent
> > > with QP encoded body.
> > >
> > > What is exactly the way to go either with GNU Emacs (directly) or
> > > using external programs.
> >
> > Emacs: Gnus or VM
> 
> I do not want to change my rmail solution for my mails. The question
> was more on how to decode qp in rmail than what MUA I could use.

Please explain what would qualify as ``an elegant solution'', then.
The infrastructure is there: we have the function
mail-unquote-printable-region to do the actual work.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-02  9:48     ` Eli Zaretskii
@ 2006-09-02 15:58       ` Xavier Maillard
  2006-09-02 16:48         ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Xavier Maillard @ 2006-09-02 15:58 UTC (permalink / raw)
  Cc: help-gnu-emacs

   From: Eli Zaretskii <eliz@gnu.org>
   X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	   version=3.0.4

   > From: maillaxa@gmail.com
   > Date: 1 Sep 2006 15:05:32 -0700
   > 
   > > Xavier Maillard wrote:
   > > > I can't find an elegant solution to deal with all these mails sent
   > > > with QP encoded body.
   > > >
   > > > What is exactly the way to go either with GNU Emacs (directly) or
   > > > using external programs.
   > >
   > > Emacs: Gnus or VM
   > 
   > I do not want to change my rmail solution for my mails. The question
   > was more on how to decode qp in rmail than what MUA I could use.

   Please explain what would qualify as ``an elegant solution'', then.
   The infrastructure is there: we have the function
   mail-unquote-printable-region to do the actual work.

A solution that would just work could be enough. I played with
procmail, rmime.el, etach.el and even rmail-mime.el but that just does
not work.

rmime.el just groks the mail content ...
etach.el is ok when we talk about attaching/detaching
rmail-mime.el is really too old and just does not integrate well

As of procmail, I looked many recipes but *none* of them did anything
interesting with that (except adding many X- headers ...)

So if you just have something working -i.e. something that permits to
read my mails successfully, I would qualify this as elegant :)

Regards
-- 
Xavier

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-02 15:58       ` Xavier Maillard
@ 2006-09-02 16:48         ` Eli Zaretskii
  2006-09-02 17:36           ` Xavier Maillard
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2006-09-02 16:48 UTC (permalink / raw)


> CC: help-gnu-emacs@gnu.org
> Jabber-ID: zedek@im.lolica.org
> From: Xavier Maillard <zedek@gnu.org>
> Date: Sat, 02 Sep 2006 17:58:37 +0200
> 
>    Please explain what would qualify as ``an elegant solution'', then.
>    The infrastructure is there: we have the function
>    mail-unquote-printable-region to do the actual work.
> 
> A solution that would just work could be enough.

``Just work'' in what sense?  Can you describe the simplest set of
features, from the user point of view, that would satisfy you?

> So if you just have something working -i.e. something that permits to
> read my mails successfully, I would qualify this as elegant :)

I do have something that works:

  "M-: (mail-unquote-printable-region (mark) (point) nil nil t) RET

but I doubt that this can be described as ``elegant''.  Which is why I
asked.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-02 16:48         ` Eli Zaretskii
@ 2006-09-02 17:36           ` Xavier Maillard
  2006-09-02 21:08             ` Eli Zaretskii
       [not found]             ` <mailman.6172.1157231314.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 16+ messages in thread
From: Xavier Maillard @ 2006-09-02 17:36 UTC (permalink / raw)
  Cc: help-gnu-emacs


   >    Please explain what would qualify as ``an elegant solution'', then.
   >    The infrastructure is there: we have the function
   >    mail-unquote-printable-region to do the actual work.
   > 
   > A solution that would just work could be enough.

   ``Just work'' in what sense?  Can you describe the simplest set of
   features, from the user point of view, that would satisfy you?

The best I can think at, is as simple as automatically decoding just
by displaying an rmail message.

Some people tried to tell me I should switch to Gnus or other MUA but
I just can't and I do not want ;) I love rmail except when I have to
deal with people misconfiguring their MUA. When I speak with english
people, I have no problem at all but as soon as I talk to french or
people using exotic MUA (evolution, thunderbird or even worst) there
are problems. Not speaking about guys putting MM for a single piece of
text...

So I would be very thank full if there were good solutions. For
example how do you do ?

-- 
Xavier

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-02 17:36           ` Xavier Maillard
@ 2006-09-02 21:08             ` Eli Zaretskii
  2006-09-02 21:50               ` Xavier Maillard
       [not found]             ` <mailman.6172.1157231314.9609.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2006-09-02 21:08 UTC (permalink / raw)


> CC: help-gnu-emacs@gnu.org
> Jabber-ID: zedek@im.lolica.org
> From: Xavier Maillard <zedek@gnu.org>
> Date: Sat, 02 Sep 2006 19:36:41 +0200
> 
>    ``Just work'' in what sense?  Can you describe the simplest set of
>    features, from the user point of view, that would satisfy you?
> 
> The best I can think at, is as simple as automatically decoding just
> by displaying an rmail message.

You seem to assume that the quoted-printable part is text.  But it
sometimes isn't; and then in some cases that part is base64-encoded,
not quoted-printable encoded.

> So I would be very thank full if there were good solutions. For
> example how do you do ?

I described that in my message: I manually decode the relevant region,
if I'm sure it's text I want to read.  It shouldn't be hard to write a
command for that, but I just never bothered enough.

Btw, I also use RMAIL and won't switch to Gnus.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-02 21:08             ` Eli Zaretskii
@ 2006-09-02 21:50               ` Xavier Maillard
  0 siblings, 0 replies; 16+ messages in thread
From: Xavier Maillard @ 2006-09-02 21:50 UTC (permalink / raw)
  Cc: help-gnu-emacs

   From: Eli Zaretskii <eliz@gnu.org>

   >    ``Just work'' in what sense?  Can you describe the simplest set of
   >    features, from the user point of view, that would satisfy you?
   > 
   > The best I can think at, is as simple as automatically decoding just
   > by displaying an rmail message.

   You seem to assume that the quoted-printable part is text.  But it
   sometimes isn't; and then in some cases that part is base64-encoded,
   not quoted-printable encoded.

One point for you.

   > So I would be very thank full if there were good solutions. For
   > example how do you do ?

   I described that in my message: I manually decode the relevant region,
   if I'm sure it's text I want to read.  It shouldn't be hard to write a
   command for that, but I just never bothered enough.

Fair enough. Hopefully with the help of rmime.el and etach.el, things
are far less annoying than without. But it is still not perfect.

   Btw, I also use RMAIL and won't switch to Gnus.

I just can't imagine doing so too ! I am totally addicted to it even
with these major issues.

Regards,

-- 
Xavier

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
       [not found]             ` <mailman.6172.1157231314.9609.help-gnu-emacs@gnu.org>
@ 2006-09-03  1:41               ` Barry Margolin
  2006-09-03 21:39                 ` Xavier Maillard
                                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Barry Margolin @ 2006-09-03  1:41 UTC (permalink / raw)


In article <mailman.6172.1157231314.9609.help-gnu-emacs@gnu.org>,
 Eli Zaretskii <eliz@gnu.org> wrote:

> > CC: help-gnu-emacs@gnu.org
> > Jabber-ID: zedek@im.lolica.org
> > From: Xavier Maillard <zedek@gnu.org>
> > Date: Sat, 02 Sep 2006 19:36:41 +0200
> > 
> >    ``Just work'' in what sense?  Can you describe the simplest set of
> >    features, from the user point of view, that would satisfy you?
> > 
> > The best I can think at, is as simple as automatically decoding just
> > by displaying an rmail message.
> 
> You seem to assume that the quoted-printable part is text.  But it
> sometimes isn't; and then in some cases that part is base64-encoded,
> not quoted-printable encoded.

I've never seen quoted-printable that wasn't text.  The point of 
quoted-printable is that it's used for plain text, to just encode 
occasional special characters, such as soft line breaks, diacriticals, 
fancy quotes, etc.

It's possible that an attachment is base64-encoded, but he's not asking 
about that, just about quoted printable.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-03  1:41               ` Barry Margolin
@ 2006-09-03 21:39                 ` Xavier Maillard
  2006-09-03 22:37                 ` Jesper Harder
       [not found]                 ` <mailman.6223.1157323058.9609.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 16+ messages in thread
From: Xavier Maillard @ 2006-09-03 21:39 UTC (permalink / raw)
  Cc: help-gnu-emacs


   > You seem to assume that the quoted-printable part is text.  But it
   > sometimes isn't; and then in some cases that part is base64-encoded,
   > not quoted-printable encoded.

   I've never seen quoted-printable that wasn't text.  The point of 
   quoted-printable is that it's used for plain text, to just encode 
   occasional special characters, such as soft line breaks, diacriticals, 
   fancy quotes, etc.

   It's possible that an attachment is base64-encoded, but he's not asking 
   about that, just about quoted printable.

It is exactly what I wanted to explain with my bad english :) Thank
you for helping me.


-- 
Xavier

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-03  1:41               ` Barry Margolin
  2006-09-03 21:39                 ` Xavier Maillard
@ 2006-09-03 22:37                 ` Jesper Harder
       [not found]                 ` <mailman.6223.1157323058.9609.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 16+ messages in thread
From: Jesper Harder @ 2006-09-03 22:37 UTC (permalink / raw)


Barry Margolin <barmar@alum.mit.edu> writes:

> I've never seen quoted-printable that wasn't text.

I've seen Postscript encoded as qp, FWIW.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-08-31 22:37 rmail and quoted-printable Xavier Maillard
  2006-09-01 14:40 ` Kevin Rodgers
       [not found] ` <mailman.6139.1157121909.9609.help-gnu-emacs@gnu.org>
@ 2006-09-05 16:32 ` Kaloian Doganov
  2 siblings, 0 replies; 16+ messages in thread
From: Kaloian Doganov @ 2006-09-05 16:32 UTC (permalink / raw)
  Cc: help-gnu-emacs

Xavier Maillard <zedek@gnu.org> writes:

    I can't find an elegant solution to deal with all these mails sent
    with QP encoded body.

This doesn't qualify as 'elegant', but I've used this function, which
detects and handles both base64 and quoted-printable:

(defun mime-decode ()
  (interactive)
  (save-excursion
	(re-search-forward "^--[^\n]+")
	(beginning-of-line)
	(let ((string (buffer-substring-no-properties
				   (point) (save-excursion (end-of-line) (point))))
		  (buf (current-buffer))
		  start end meta-start)
	  (setq meta-start (point))
	  (search-forward "\n\n")
	  (setq start (point))
	  (search-forward string)
	  (beginning-of-line)
	  (setq end (point))
	  (let ((source-buffer (current-buffer))
			(target-buffer (get-buffer-create "*foo*")))
		(save-excursion
		  (set-buffer target-buffer)
		  (erase-buffer))
		(append-to-buffer target-buffer start end)
		(save-excursion
		  (goto-char meta-start)
		  (search-forward "\n\n" nil t)
		  (let ((mime-charset
				 (if (and rmail-decode-mime-charset
						  (save-excursion
							(let ((case-fold-search t))
							  (re-search-backward
							   rmail-mime-charset-pattern
							   meta-start t))))
					 (intern (downcase (match-string 1)))))
				(mime-encoding
				 (save-excursion
				   (if (let ((case-fold-search t))
						 (re-search-backward
						  "^content-transfer-encoding:\\(\n?[\t ]\\)*\\([-a-z0-9]+\\)\\(\n?[\t ]\\)*"
						  meta-start t))
					   (intern (downcase (match-string 2)))
					 nil))))					 
			(message "Detected charset: %s, encoding: %s" mime-charset mime-encoding)
			(save-excursion
			  (set-buffer target-buffer)
			  (cond ((string= mime-encoding "base64")
					 (base64-decode-region (point-min) (point-max)))
					((string= mime-encoding "quoted-printable")
					 (quoted-printable-decode-region (point-min) (point-max))))
			  (rmail-decode-region (point-min) (point-max) mime-charset)
			  (goto-char (point-min))))
		  (switch-to-buffer target-buffer))))))

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
       [not found]                 ` <mailman.6223.1157323058.9609.help-gnu-emacs@gnu.org>
@ 2006-09-07 16:04                   ` Miles Bader
  2006-09-07 20:23                     ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Miles Bader @ 2006-09-07 16:04 UTC (permalink / raw)


Jesper Harder <jesper.harder@gmail.com> writes:
>> I've never seen quoted-printable that wasn't text.
>
> I've seen Postscript encoded as qp, FWIW.

(Decent) Postscript _is_ text.

-miles
-- 
Do not taunt Happy Fun Ball.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: rmail and quoted-printable
  2006-09-07 16:04                   ` Miles Bader
@ 2006-09-07 20:23                     ` Eli Zaretskii
  0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2006-09-07 20:23 UTC (permalink / raw)


> From: Miles Bader <miles@gnu.org>
> Date: Fri, 08 Sep 2006 01:04:42 +0900
> 
> Jesper Harder <jesper.harder@gmail.com> writes:
> >> I've never seen quoted-printable that wasn't text.
> >
> > I've seen Postscript encoded as qp, FWIW.
> 
> (Decent) Postscript _is_ text.

Not in general, no.  A Postscript file can legitimately include binary
data.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-09-07 20:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-31 22:37 rmail and quoted-printable Xavier Maillard
2006-09-01 14:40 ` Kevin Rodgers
     [not found] ` <mailman.6139.1157121909.9609.help-gnu-emacs@gnu.org>
2006-09-01 22:05   ` maillaxa
2006-09-02  1:57     ` Barry Margolin
2006-09-02  9:48     ` Eli Zaretskii
2006-09-02 15:58       ` Xavier Maillard
2006-09-02 16:48         ` Eli Zaretskii
2006-09-02 17:36           ` Xavier Maillard
2006-09-02 21:08             ` Eli Zaretskii
2006-09-02 21:50               ` Xavier Maillard
     [not found]             ` <mailman.6172.1157231314.9609.help-gnu-emacs@gnu.org>
2006-09-03  1:41               ` Barry Margolin
2006-09-03 21:39                 ` Xavier Maillard
2006-09-03 22:37                 ` Jesper Harder
     [not found]                 ` <mailman.6223.1157323058.9609.help-gnu-emacs@gnu.org>
2006-09-07 16:04                   ` Miles Bader
2006-09-07 20:23                     ` Eli Zaretskii
2006-09-05 16:32 ` Kaloian Doganov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.