Gnus development mailing list
 help / color / mirror / Atom feed
* %{...} in mailcap (was: bugs in mailcap (patch: 93-zsh3))
       [not found] ` <m3u2rdq0zn.fsf@quimbies.gnus.org>
@ 1999-07-09 16:20   ` Shenghuo ZHU
  1999-07-09 16:47     ` William M. Perry
  1999-07-09 21:31     ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 3+ messages in thread
From: Shenghuo ZHU @ 1999-07-09 16:20 UTC (permalink / raw)


>>>>> "LMI" == Lars Magne Ingebrigtsen <bugs@gnus.org> writes:

>> Here the patch. By the way, I guess mm-display-external do not handle
>> %-sequences like %{name}, %{patchnumber}.

LMI> No, it doesn't -- I didn't even know that one could do that.  Is the
LMI> mailcap format specified anywhere?

The following is cited from mailcap manual of RedHat 6.0 (by Nathaniel
S. Borenstein).

,--------
|        The "command" field is any UNIX command ("cat %s"  in  the
|        above example), and is used to specify the interpreter for
|        the given type of message.  It will be passed to the shell
|        via  the  system(3)  facility.  Semicolons and backslashes
|        within the command must be quoted  with  backslashes.   If
|        the  command  contains  "%s", those two characters will be
|        replaced by the name of a file that contains the  body  of
|        the  message.  If  it  contains "%t', those two characters
|        will be replaced by the content-type field, including  the
|        subtype,  if  any.   (That  is,  if  the  content-type was
|        "image/pbm;  opt1=something-else",  then  "%t"  would   be
|        replaced  by "image/pbm".)   If the command field contains
|        "%{" followed by a parameter name and a closing "}",  then
|        all  those characters will be replaced by the value of the
|        named parameter, if any,  from  the  Content-type  header.
|        Thus,  in the previous example, "%{opt1}" will be replaced
|        by "something-else".  Finally, if the command contains "",
|        those two characters will be replaced by a single % ch
| 
|        aracter.  (In fact, the backslash can be used to quote any
|        character, including itself.)
`--------


-- 
Shenghuo


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

* Re: %{...} in mailcap (was: bugs in mailcap (patch: 93-zsh3))
  1999-07-09 16:20   ` %{...} in mailcap (was: bugs in mailcap (patch: 93-zsh3)) Shenghuo ZHU
@ 1999-07-09 16:47     ` William M. Perry
  1999-07-09 21:31     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: William M. Perry @ 1999-07-09 16:47 UTC (permalink / raw)
  Cc: Gnus Mailing List

Shenghuo ZHU <zsh@cs.rochester.edu> writes:

> >>>>> "LMI" == Lars Magne Ingebrigtsen <bugs@gnus.org> writes:
> 
> >> Here the patch. By the way, I guess mm-display-external do not handle
> >> %-sequences like %{name}, %{patchnumber}.
> 
> LMI> No, it doesn't -- I didn't even know that one could do that.  Is the
> LMI> mailcap format specified anywhere?
> 
> The following is cited from mailcap manual of RedHat 6.0 (by Nathaniel
> S. Borenstein).

The original mm.el code handles this type of thing in
'mm-unescape-mime-test' but I don't think it did it when actually passing
things to the viewers.

	    (cond
	     ((null save-chr) nil)
	     ((= save-chr ?t)
	      (delete-region save-pos (progn (forward-char 1) (point)))
	      (insert (or (cdr (assoc "type" type-info)) "\"\"")))
	     ((= save-chr ?M)
	      (delete-region save-pos (progn (forward-char 1) (point)))
	      (insert "\"\""))
	     ((= save-chr ?n)
	      (delete-region save-pos (progn (forward-char 1) (point)))
	      (insert "\"\""))
	     ((= save-chr ?F)
	      (delete-region save-pos (progn (forward-char 1) (point)))
	      (insert "\"\""))
>>>>	     ((= save-chr ?{)
>>>>	      (forward-char 1)
>>>>	      (skip-chars-forward "^}")
>>>>	      (downcase-region (+ 2 save-pos) (point))
>>>>	      (setq subst (buffer-substring (+ 2 save-pos) (point)))
>>>>	      (delete-region save-pos (1+ (point)))
>>>>	      (insert (or (cdr (assoc subst type-info)) "\"\"")))
	     (t nil))

-bp


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

* Re: %{...} in mailcap (was: bugs in mailcap (patch: 93-zsh3))
  1999-07-09 16:20   ` %{...} in mailcap (was: bugs in mailcap (patch: 93-zsh3)) Shenghuo ZHU
  1999-07-09 16:47     ` William M. Perry
@ 1999-07-09 21:31     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-07-09 21:31 UTC (permalink / raw)


Shenghuo ZHU <zsh@cs.rochester.edu> writes:

> The following is cited from mailcap manual of RedHat 6.0 (by Nathaniel
> S. Borenstein).

Ok; I've now added these things to 0.95.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1999-07-09 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2nhfnfwrsz.fsf@tiger.jia.vnet>
     [not found] ` <m3u2rdq0zn.fsf@quimbies.gnus.org>
1999-07-09 16:20   ` %{...} in mailcap (was: bugs in mailcap (patch: 93-zsh3)) Shenghuo ZHU
1999-07-09 16:47     ` William M. Perry
1999-07-09 21:31     ` Lars Magne Ingebrigtsen

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).