all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG?] org-open-file cannot handle spaces in file name?
@ 2008-01-28 22:52 Xiao-Yong Jin
  2008-01-28 23:23 ` Phil Jackson
  2008-01-29  4:43 ` Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: Xiao-Yong Jin @ 2008-01-28 22:52 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 119 bytes --]

Hi, When I open a link in org-mode containing spaces in the
actual file name, it gives out error as in attached file.


[-- Attachment #2: error while opening a file --]
[-- Type: application/octet-stream, Size: 2771 bytes --]

[-- Attachment #3: Type: text/plain, Size: 423 bytes --]



Emacs version: "GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu,
                GTK+ Version 2.12.1) of 2008-01-13 on
                neutrino"
org-mode version: "Org-mode version 5.19a"

I'm not sure it's a problem of a particular emacs version or
of the org-mode, since I updated my emacs and org-mode
together and forget what was the version of org-mode before
updating.
-- 
    c/*    __o/*
    <\     * (__
    */\      <

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] org-open-file cannot handle spaces in file name?
  2008-01-28 22:52 [BUG?] org-open-file cannot handle spaces in file name? Xiao-Yong Jin
@ 2008-01-28 23:23 ` Phil Jackson
  2008-01-29  0:28   ` Xiao-Yong Jin
  2008-01-29 16:12   ` Phil Jackson
  2008-01-29  4:43 ` Carsten Dominik
  1 sibling, 2 replies; 6+ messages in thread
From: Phil Jackson @ 2008-01-28 23:23 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Xiao-Yong Jin <xj2106@columbia.edu> writes:

> Hi, When I open a link in org-mode containing spaces in the actual
> file name, it gives out error as in attached file.
>
> Emacs version: "GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu,
>                 GTK+ Version 2.12.1) of 2008-01-13 on
>                 neutrino"

I can't quite replicate this on 23.0.50.3 (5.19a), if I try with a file
called 'file with spaces.txt' all is well. With 'file with spaces.pdf' I
get a different error to you (args out of range). I'll try with 22
tomorrow and see what I get.

Cheers,
Phil
-- 
 Phil Jackson
 http://www.shellarchive.co.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] org-open-file cannot handle spaces in file name?
  2008-01-28 23:23 ` Phil Jackson
@ 2008-01-29  0:28   ` Xiao-Yong Jin
  2008-01-29 16:12   ` Phil Jackson
  1 sibling, 0 replies; 6+ messages in thread
From: Xiao-Yong Jin @ 2008-01-29  0:28 UTC (permalink / raw)
  To: emacs-orgmode

Phil Jackson <phil@shellarchive.co.uk> writes:

> Hi,
>
> Xiao-Yong Jin <xj2106@columbia.edu> writes:
>
>> Hi, When I open a link in org-mode containing spaces in the actual
>> file name, it gives out error as in attached file.
>>
>> Emacs version: "GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu,
>>                 GTK+ Version 2.12.1) of 2008-01-13 on
>>                 neutrino"
>
> I can't quite replicate this on 23.0.50.3 (5.19a), if I try with a file
> called 'file with spaces.txt' all is well. With 'file with spaces.pdf' I
> get a different error to you (args out of range). I'll try with 22
> tomorrow and see what I get.

I also see `Args out of range' error.  In fact, if I don't
turn on debug using `toggle-debug-on-error', it shows

Args out of range: 41, 42

in the mini-buffer.  Above two numbers depend on the file
name.

Best,
Xiao-Yong
-- 
    c/*    __o/*
    <\     * (__
    */\      <

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] org-open-file cannot handle spaces in file name?
  2008-01-28 22:52 [BUG?] org-open-file cannot handle spaces in file name? Xiao-Yong Jin
  2008-01-28 23:23 ` Phil Jackson
@ 2008-01-29  4:43 ` Carsten Dominik
  1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2008-01-29  4:43 UTC (permalink / raw)
  To: Xiao-Yong Jin; +Cc: emacs-orgmode

What does the link look like in the org-mode file?
Please turn on `visible-mode' and copy the full link.

- Carsten
On Jan 28, 2008, at 11:52 PM, Xiao-Yong Jin wrote:

> Hi, When I open a link in org-mode containing spaces in the
> actual file name, it gives out error as in attached file.
>
> <error>
>
> Emacs version: "GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu,
>                GTK+ Version 2.12.1) of 2008-01-13 on
>                neutrino"
> org-mode version: "Org-mode version 5.19a"
>
> I'm not sure it's a problem of a particular emacs version or
> of the org-mode, since I updated my emacs and org-mode
> together and forget what was the version of org-mode before
> updating.
> -- 
>    c/*    __o/*
>    <\     * (__
>    */\      <
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] org-open-file cannot handle spaces in file name?
  2008-01-28 23:23 ` Phil Jackson
  2008-01-29  0:28   ` Xiao-Yong Jin
@ 2008-01-29 16:12   ` Phil Jackson
  2008-01-30 23:09     ` Carsten Dominik
  1 sibling, 1 reply; 6+ messages in thread
From: Phil Jackson @ 2008-01-29 16:12 UTC (permalink / raw)
  To: emacs-orgmode

Phil Jackson <phil@shellarchive.co.uk> writes:

[...]

> I'll try with 22 tomorrow and see what I get.

22.1.50.1 (5.19a):

[[file:~/this is a file with space.pdf]]

 ,----[ trace ]
 | Debugger entered--Lisp error: (args-out-of-range 34 35)
 |   replace-match("/home/pjackso1/this\\ is\\ a\\ file\\ with\\ space.pdf"
 |   t t "evince %s") (setq cmd (replace-match (shell-quote-argument file)
 |   t t cmd)) (while (string-match "%s" cmd) (setq cmd (replace-match
 |   ... t t cmd))) (cond ((and ... ...) (while ... ...) (while ... ...)
 |   (save-window-excursion ...)) ((or $ (let* ((file ...) (apps ...) (remp
 |   ...) (dirp ...) (dfile ...)  (old-buffer ...) (old-po$
 |   org-open-file("~/this is a file with space.pdf" nil nil nil) (if
 |   (string-match "[*?{]" (file-name-nondirectory path)) (dired path)
 |   (org-open-file pa$ (cond ((assoc type org-link-protocols) (funcall
 |   ... path)) ((equal type "mailto") (let $ (let (type path link line
 |   search (pos ...)) (catch (quote match) (save-excursion ... ..$ (if
 |   (org-at-timestamp-p t) (org-follow-timestamp-link) (let (type path
 |   link line search$ (catch (quote abort) (move-marker
 |   org-open-link-marker (point)) (setq org-window-config$
 |   org-open-at-point(nil) call-interactively(org-open-at-point)
 `----


Cheers,
Phil
-- 
 Phil Jackson
 http://www.shellarchive.co.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] org-open-file cannot handle spaces in file name?
  2008-01-29 16:12   ` Phil Jackson
@ 2008-01-30 23:09     ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2008-01-30 23:09 UTC (permalink / raw)
  To: Phil Jackson; +Cc: emacs-orgmode


On Jan 29, 2008, at 5:12 PM, Phil Jackson wrote:

> Phil Jackson <phil@shellarchive.co.uk> writes:
>
> [...]
>
>> I'll try with 22 tomorrow and see what I get.
>
> 22.1.50.1 (5.19a):
>
> [[file:~/this is a file with space.pdf]]

Hi Phil, this is part of the problem, the link should look like this:

> [[file:~/this%20is%02a%20file%20with%20space.pdf][file:~/this is a  
> file with space.pdf]]



When you enter links with C-c C-l, this will be done automatically.

There is also another bug here which you have discovered, I have fixed  
it
for the next version.

- Carsten

>
>
> ,----[ trace ]
> | Debugger entered--Lisp error: (args-out-of-range 34 35)
> |   replace-match("/home/pjackso1/this\\ is\\ a\\ file\\ with\\  
> space.pdf"
> |   t t "evince %s") (setq cmd (replace-match (shell-quote-argument  
> file)
> |   t t cmd)) (while (string-match "%s" cmd) (setq cmd (replace-match
> |   ... t t cmd))) (cond ((and ... ...) (while ... ...)  
> (while ... ...)
> |   (save-window-excursion ...)) ((or $ (let* ((file ...) (apps ...)  
> (remp
> |   ...) (dirp ...) (dfile ...)  (old-buffer ...) (old-po$
> |   org-open-file("~/this is a file with space.pdf" nil nil nil) (if
> |   (string-match "[*?{]" (file-name-nondirectory path)) (dired path)
> |   (org-open-file pa$ (cond ((assoc type org-link-protocols) (funcall
> |   ... path)) ((equal type "mailto") (let $ (let (type path link line
> |   search (pos ...)) (catch (quote match) (save-excursion ... ..$ (if
> |   (org-at-timestamp-p t) (org-follow-timestamp-link) (let (type path
> |   link line search$ (catch (quote abort) (move-marker
> |   org-open-link-marker (point)) (setq org-window-config$
> |   org-open-at-point(nil) call-interactively(org-open-at-point)
> `----
>
>
> Cheers,
> Phil
> -- 
> Phil Jackson
> http://www.shellarchive.co.uk
>
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-30 23:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-28 22:52 [BUG?] org-open-file cannot handle spaces in file name? Xiao-Yong Jin
2008-01-28 23:23 ` Phil Jackson
2008-01-29  0:28   ` Xiao-Yong Jin
2008-01-29 16:12   ` Phil Jackson
2008-01-30 23:09     ` Carsten Dominik
2008-01-29  4:43 ` Carsten Dominik

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.