emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Wanrong Lin <wanrong.lin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug found (but don't know to fix)
Date: Wed, 21 May 2008 13:54:34 -0400	[thread overview]
Message-ID: <483461DA.2090301@gmail.com> (raw)
In-Reply-To: <016C01BD-F455-4CA8-AF44-9DF05BF23CCC@uva.nl>


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

      reply	other threads:[~2008-05-21 17:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-19 21:59 Bug found (but don't know to fix) Wanrong Lin
2008-05-21 10:26 ` Carsten Dominik
2008-05-21 14:25   ` Wanrong Lin
2008-05-21 17:16     ` Carsten Dominik
2008-05-21 17:54       ` Wanrong Lin [this message]

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=483461DA.2090301@gmail.com \
    --to=wanrong.lin@gmail.com \
    --cc=emacs-orgmode@gnu.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).