From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanrong Lin Subject: Re: Bug found (but don't know to fix) Date: Wed, 21 May 2008 13:54:34 -0400 Message-ID: <483461DA.2090301@gmail.com> References: <4831F82F.90902@gmail.com> <483430E0.9040302@gmail.com> <016C01BD-F455-4CA8-AF44-9DF05BF23CCC@uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JysX2-0001ex-H9 for emacs-orgmode@gnu.org; Wed, 21 May 2008 13:55:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JysX0-0001cT-P6 for emacs-orgmode@gnu.org; Wed, 21 May 2008 13:55:19 -0400 Received: from [199.232.76.173] (port=49028 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JysX0-0001cC-CV for emacs-orgmode@gnu.org; Wed, 21 May 2008 13:55:18 -0400 Received: from rv-out-0708.google.com ([209.85.198.247]:14087) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JysWz-0007sn-Qw for emacs-orgmode@gnu.org; Wed, 21 May 2008 13:55:18 -0400 Received: by rv-out-0708.google.com with SMTP id k29so3204197rvb.6 for ; Wed, 21 May 2008 10:55:16 -0700 (PDT) In-Reply-To: <016C01BD-F455-4CA8-AF44-9DF05BF23CCC@uva.nl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Cc: emacs-orgmode@gnu.org Yes, this works! Thank you. Wanrong Carsten Dominik wrote: > > On May 21, 2008, at 4:25 PM, Wanrong Lin wrote: > >> Hi, Carsten, >> >> Thanks a lot for the patch. I tried it, but it does not work. I >> traced into the "org-open-at-point" function and found the patch is >> not executed because the condition *"(stringp cmd)" *is not >> satisfied, as "cmd" is a list "(w32-shell-execute "open" file)". This >> function seems a little bit too complicated for me to sort out, would >> you mind taking another look into it, or giving some suggestion on >> how to fix it? Thank you. > > Hi Wanrong, > > How about this patch then: > > diff --git a/lisp/org.el b/lisp/org.el > index 9094204..4e2aa58 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -7385,7 +7385,9 @@ If the file does not exist, an error is thrown." > (setq cmd (replace-match "%s" t t cmd))) > (while (string-match "%s" cmd) > (setq cmd (replace-match > - (save-match-data (shell-quote-argument file)) > + (save-match-data > + (shell-quote-argument > + (convert-standard-filename file))) > t t cmd))) > (save-window-excursion > (start-process-shell-command cmd nil cmd) > @@ -7398,7 +7400,8 @@ If the file does not exist, an error is thrown." > (if line (goto-line line) > (if search (org-link-search search)))) > ((consp cmd) > - (eval cmd)) > + (let ((file (convert-standard-filename file))) > + (eval cmd))) > (t (funcall (cdr (assq 'file org-link-frame-setup)) file))) > (and (org-mode-p) (eq old-mode 'org-mode) > (or (not (equal old-buffer (current-buffer))) > >