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: Carsten Dominik
Subject: Re: [Orgmode] BUG: org-open-file fails with multiple %s in mailcap entry
Date: Thu, 3 Jan 2008 13:51:37 +0100


On Jan 3, 2008, at 1:41 PM, Adam Spiers wrote:

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.

Done for 5.18, thanks.

- Carsten





reply via email to

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