emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] BUG: org-open-file fails with multiple %s in mailcap entry


From: Adam Spiers
Subject: Re: [Orgmode] BUG: org-open-file fails with multiple %s in mailcap entry
Date: Thu, 3 Jan 2008 12:41:01 +0000
User-agent: Mutt/1.5.14 (2007-02-12)

On Thu, Jan 03, 2008 at 01:33:16PM +0100, Carsten Dominik wrote:
> 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

[snipped]

> What are you proposing?

Simply that every occurrence of '%s' be replaced by the file, not just
the first one.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]