all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-open-file with xdg-open not working?
@ 2014-04-22  9:30 Eric Abrahamsen
  2014-04-22 13:10 ` Nick Dokos
  2014-04-22 13:28 ` Nicolas Richard
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2014-04-22  9:30 UTC (permalink / raw)
  To: emacs-orgmode

I'm trying to open files externally (via org-attach), with a mailcap
that funnels most everything to xdg-open. I notice that doing this with
org-open-file gives me:

Running xdg-open /home/me/path/to/file.PDF...done

But no actual open file.

Doing a similar thing in gnus, with the `gnus-mime-view-part-externally'
command, gives me a similar message about xdg-open, but then the file
actually opens.

Presumably that's because the gnus version (eventually
`mm-display-external') calls xdg-open with `call-process' and org does
it with `start-process-shell-command'. The first is synchronous, the
second asynchronous, and I do remember seeing something on one of these
lists about difficulties with xdg-open because the process returns
before the file actually opens, or *doesn't* return, or some similar
thing the details of which I'm forgetting.

Have other people run into this difficulty? How are you solving it?

Thanks!
Eric

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

* Re: org-open-file with xdg-open not working?
  2014-04-22  9:30 org-open-file with xdg-open not working? Eric Abrahamsen
@ 2014-04-22 13:10 ` Nick Dokos
  2014-04-22 13:19   ` Eric Abrahamsen
  2014-04-22 13:28 ` Nicolas Richard
  1 sibling, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2014-04-22 13:10 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I'm trying to open files externally (via org-attach), with a mailcap
> that funnels most everything to xdg-open. I notice that doing this with
> org-open-file gives me:
>
> Running xdg-open /home/me/path/to/file.PDF...done
>
> But no actual open file.
>
> Doing a similar thing in gnus, with the `gnus-mime-view-part-externally'
> command, gives me a similar message about xdg-open, but then the file
> actually opens.
>
> Presumably that's because the gnus version (eventually
> `mm-display-external') calls xdg-open with `call-process' and org does
> it with `start-process-shell-command'. The first is synchronous, the
> second asynchronous, and I do remember seeing something on one of these
> lists about difficulties with xdg-open because the process returns
> before the file actually opens, or *doesn't* return, or some similar
> thing the details of which I'm forgetting.
>
> Have other people run into this difficulty?

Yes.

> How are you solving it?

By not using xdg-open: I tend to add explicit entries in my .mailcap instead.

-- 
Nick

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

* Re: org-open-file with xdg-open not working?
  2014-04-22 13:10 ` Nick Dokos
@ 2014-04-22 13:19   ` Eric Abrahamsen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2014-04-22 13:19 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I'm trying to open files externally (via org-attach), with a mailcap
>> that funnels most everything to xdg-open. I notice that doing this with
>> org-open-file gives me:
>>
>> Running xdg-open /home/me/path/to/file.PDF...done
>>
>> But no actual open file.
>>
>> Doing a similar thing in gnus, with the `gnus-mime-view-part-externally'
>> command, gives me a similar message about xdg-open, but then the file
>> actually opens.
>>
>> Presumably that's because the gnus version (eventually
>> `mm-display-external') calls xdg-open with `call-process' and org does
>> it with `start-process-shell-command'. The first is synchronous, the
>> second asynchronous, and I do remember seeing something on one of these
>> lists about difficulties with xdg-open because the process returns
>> before the file actually opens, or *doesn't* return, or some similar
>> thing the details of which I'm forgetting.
>>
>> Have other people run into this difficulty?
>
> Yes.
>
>> How are you solving it?
>
> By not using xdg-open: I tend to add explicit entries in my .mailcap instead.

Well pooh... not the answer I was hoping for!

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

* Re: org-open-file with xdg-open not working?
  2014-04-22  9:30 org-open-file with xdg-open not working? Eric Abrahamsen
  2014-04-22 13:10 ` Nick Dokos
@ 2014-04-22 13:28 ` Nicolas Richard
  2014-04-22 14:40   ` Eric Abrahamsen
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Richard @ 2014-04-22 13:28 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Presumably that's because the gnus version (eventually
> `mm-display-external') calls xdg-open with `call-process' and org does
> it with `start-process-shell-command'. The first is synchronous, the
> second asynchronous, and I do remember seeing something on one of these
> lists about difficulties with xdg-open because the process returns
> before the file actually opens, or *doesn't* return, or some similar
> thing the details of which I'm forgetting.
>
> Have other people run into this difficulty? How are you solving it?

I remember having problems which I was able to solve by changing the
value of process-connection-type to nil. Does that work for you ?

-- 
Nico.

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

* Re: org-open-file with xdg-open not working?
  2014-04-22 13:28 ` Nicolas Richard
@ 2014-04-22 14:40   ` Eric Abrahamsen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2014-04-22 14:40 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>> Presumably that's because the gnus version (eventually
>> `mm-display-external') calls xdg-open with `call-process' and org does
>> it with `start-process-shell-command'. The first is synchronous, the
>> second asynchronous, and I do remember seeing something on one of these
>> lists about difficulties with xdg-open because the process returns
>> before the file actually opens, or *doesn't* return, or some similar
>> thing the details of which I'm forgetting.
>>
>> Have other people run into this difficulty? How are you solving it?
>
> I remember having problems which I was able to solve by changing the
> value of process-connection-type to nil. Does that work for you ?

Brilliant, that did it! Very glad there was a semi-simple solution.

Thanks,
Eric

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

end of thread, other threads:[~2014-04-22 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22  9:30 org-open-file with xdg-open not working? Eric Abrahamsen
2014-04-22 13:10 ` Nick Dokos
2014-04-22 13:19   ` Eric Abrahamsen
2014-04-22 13:28 ` Nicolas Richard
2014-04-22 14:40   ` Eric Abrahamsen

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.