emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Adam Spiers <orgmode@adamspiers.org>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: BUG: org-open-file fails with multiple %s in mailcap entry
Date: Thu, 3 Jan 2008 13:33:16 +0100	[thread overview]
Message-ID: <A755D76B-9328-474F-9F06-1FEB276D8C7D@gmail.com> (raw)
In-Reply-To: <20071222123027.GJ13112@atlantic.linksys.moosehall>

What are you proposing?

- Carsten

On Dec 22, 2007, at 1:30 PM, Adam Spiers wrote:

> The use of format in org-open-file assumes that there will only ever
> be a single '%s' in a mailcap entry:
>
>    (cond
>     ((and (stringp cmd) (not (string-match "^\\s-*$" cmd)))
>      ;; Remove quotes around the file name - we'll use
>     shell-quote-argument.
>      (if (string-match "['\"]%s['\"]" cmd)
>        (setq cmd (replace-match "%s" t t cmd)))
>      (setq cmd (format cmd (shell-quote-argument file)))
>
> However this is not necessarily the case, e.g. I have
>
> text/html; mailcap_bg %s url_handler.sh "@s" || logger  
> "url_handler.sh failed on %s"; test=test -n "$DISPLAY" &&  
> mailcap_test %s firefox; nametemplate=%s.html
> text/html; w3m -T text/html -dump %s || lynx -dump %s || links -dump  
> %s; copiousoutput; nametemplate=%s.html; description=HTML text
>
> The mailcap(4) man page doesn't explicitly say whether multiple %s is
> allowed or not, but it has always worked for me.  The
>
>  w3m || lynx || links
>
> example above is a particularly common use case, AFAIK.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2008-01-03 12:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-22 12:30 BUG: org-open-file fails with multiple %s in mailcap entry Adam Spiers
2008-01-03 12:33 ` Carsten Dominik [this message]
2008-01-03 12:41   ` Adam Spiers
2008-01-03 12:51     ` Carsten Dominik

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=A755D76B-9328-474F-9F06-1FEB276D8C7D@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@adamspiers.org \
    /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.
Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).