Gnus development mailing list
 help / color / mirror / Atom feed
From: "Rene H. Larsen" <rhl@traceroute.dk>
Subject: Re: Shouldn't Gnus (er, W3) inline related images in <img src=cid:...>?
Date: 12 Aug 2000 03:04:56 +0200	[thread overview]
Message-ID: <87r97vp9vr.fsf@worldonline.dk> (raw)
In-Reply-To: "Rene H. Larsen"'s message of "12 Aug 2000 01:51:11 +0200"

"Rene H. Larsen" <rhl@traceroute.dk> writes:

> Hmm, that's pretty bad, since all the mailcap entries shipped with
> Debian GNU/Linux use the quoted form. All of the Debian
> MIME-handling utilities expect the entries to be quoted as well.

In fact, they are all single-quoted.  I suppose that is Debian policy
on mailcap entries.

> It would be nice if there was an option to flip in Gnus so that it
> won't escape spaces in filenames passed to mailcap handlers. This
> would make it compatible with the way Debian (and others?) handles
> mailcap quoting.

The workaround I use right now is to modify mm-quote-arg to only quote
single quotes (using the mildly hideous '"'"' hack).  This is what
I've put in my .gnus.el:

,----
| ;;; Convince Gnus to handle single-quoted mailcap entries correctly.
| (eval-after-load 'mm-util
|               (defun mm-quote-arg (arg)
|                 "Return a version of ARG that is safe to evaluate in a shell."
|                 (let ((pos 0) new-pos accum)
|                   ;; *** bug: we don't handle newline characters properly
|                   (while (setq new-pos (string-match "'" arg pos))
|                     (push (substring arg pos new-pos) accum)
|                     (push "'\"'\"" accum)
|                     (push (list (aref arg new-pos)) accum)
|                     (setq pos (1+ new-pos)))
|                   (if (= pos 0)
|                       arg
|                     (apply 'concat (nconc (nreverse accum) (list (substring arg pos))))))))
`----

To handle double quoted entries you'll need something a bit different
(more like what is used for the non-quoted case).  If your mailcap
entries are inconsistently quoted, you're basically screwed :/.
-- 
Echelon bait:
genetic Ft. Bragg Panama Legion of Doom Serbian World Trade Center JFK
Noriega PLO Ft. Meade AK-47 $400 million in gold bullion Saddam
Hussein fissionable NORAD



  reply	other threads:[~2000-08-12  1:04 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-29 21:40 Karl Kleinpaste
2000-03-05 14:24 ` William M. Perry
2000-03-05 14:35   ` Karl Kleinpaste
2000-04-20 20:26 ` Lars Magne Ingebrigtsen
2000-04-20 22:02   ` Michael Harnois
2000-04-20 22:53     ` Lars Magne Ingebrigtsen
2000-04-21 22:37       ` Michael Harnois
2000-04-22 12:14         ` Lars Magne Ingebrigtsen
2000-04-23 16:46           ` Michael Harnois
2000-08-10 18:48             ` Lars Magne Ingebrigtsen
2000-08-10 18:53               ` Roland Mas
2000-08-10 19:00                 ` Lars Magne Ingebrigtsen
2000-08-10 19:02                   ` Lars Magne Ingebrigtsen
2000-08-11  2:04                   ` Rene H. Larsen
2000-08-11  4:33                     ` ShengHuo ZHU
2000-08-11 13:17                       ` Kai Großjohann
2000-08-11 13:48                         ` ShengHuo ZHU
2000-08-11 21:03                           ` Kai Großjohann
2000-08-11 21:41                             ` ShengHuo ZHU
2000-08-13 16:07                               ` Kai Großjohann
2000-08-14  3:31                                 ` Daniel Pittman
2000-08-14 14:00                                   ` William M. Perry
2000-08-11 23:51                       ` Rene H. Larsen
2000-08-12  1:04                         ` Rene H. Larsen [this message]
2000-08-14 12:04                           ` `mm-quote-arg' and shell quoting in mailcap (was: Shouldn't...) Toby Speight
2000-08-15  0:35                             ` Rene H. Larsen
2000-08-15 12:51                               ` `mm-quote-arg' and shell quoting in mailcap Toby Speight
2000-12-04  1:46                               ` `mm-quote-arg' and shell quoting in mailcap (was: Shouldn't...) Greg Stark
2000-08-15 13:09                           ` Shouldn't Gnus (er, W3) inline related images in <img src=cid:...>? François Pinard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r97vp9vr.fsf@worldonline.dk \
    --to=rhl@traceroute.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).