all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Wish] xdg-open, open from dired
@ 2009-11-07 15:55 Gilaras Drakeson
  2009-11-07 16:14 ` Lennart Borgman
  0 siblings, 1 reply; 4+ messages in thread
From: Gilaras Drakeson @ 2009-11-07 15:55 UTC (permalink / raw
  To: emacs-devel

Hi,

Could we (or Do we) have a command in dired that opens the current or
marked files using the user's preferred desktop application according to
the (fairly recent) freedesktop.org standards, (e.g. using xdg-open(1)).

I bind it to `C-;', but `C-j' or `M-j' (comment-indent-new-line) seem to
be available, too.

Thanks,
Gilaras





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

* Re: [Wish] xdg-open, open from dired
  2009-11-07 15:55 [Wish] xdg-open, open from dired Gilaras Drakeson
@ 2009-11-07 16:14 ` Lennart Borgman
  2009-11-08  0:13   ` Gilaras Drakeson
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman @ 2009-11-07 16:14 UTC (permalink / raw
  To: Gilaras Drakeson; +Cc: emacs-devel

On Sat, Nov 7, 2009 at 4:55 PM, Gilaras Drakeson <gilaras@gmail.com> wrote:
> Hi,
>
> Could we (or Do we) have a command in dired that opens the current or
> marked files using the user's preferred desktop application according to
> the (fairly recent) freedesktop.org standards, (e.g. using xdg-open(1)).
>
> I bind it to `C-;', but `C-j' or `M-j' (comment-indent-new-line) seem to
> be available, too.

Could you please point to a specific page that shows what you want?




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

* Re: [Wish] xdg-open, open from dired
  2009-11-07 16:14 ` Lennart Borgman
@ 2009-11-08  0:13   ` Gilaras Drakeson
  2009-11-09  0:47     ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Gilaras Drakeson @ 2009-11-08  0:13 UTC (permalink / raw
  To: Lennart Borgman; +Cc: emacs-devel

>> Could we (or Do we) have a command in dired that opens the current or
>> marked files using the user's preferred desktop application according to
>> the (fairly recent) freedesktop.org standards, (e.g. using xdg-open(1)).
>>
>> I bind it to `C-;', but `C-j' or `M-j' (comment-indent-new-line) seem to
>> be available, too.
>
> Could you please point to a specific page that shows what you want?

As far as I understand, `xdg-open', (fairly similar to what `open' does
on macosx), effectively does what "double clicking" on the file supplied
in its arguments would do.

I wish something like the following be blessed by the upstream Emacs:

(defun dired-open (&optional file-list)
  (interactive
   (list (dired-get-marked-files t current-prefix-arg)))
  (apply 'call-process "xdg-open" nil 0 nil file-list))
(define-key dired-mode-map (kbd "C-;") 'dired-open)

Also note that xdg-open may open URLs, so maybe something like 
"open file or url at point" (similar to ffap) is more appropriate.

Thanks,
Gilaras




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

* Re: [Wish] xdg-open, open from dired
  2009-11-08  0:13   ` Gilaras Drakeson
@ 2009-11-09  0:47     ` Juri Linkov
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2009-11-09  0:47 UTC (permalink / raw
  To: Gilaras Drakeson; +Cc: Lennart Borgman, emacs-devel

> As far as I understand, `xdg-open', (fairly similar to what `open' does
> on macosx), effectively does what "double clicking" on the file supplied
> in its arguments would do.

Are you aware that it's not recommended to use `xdg-open'
because it is unreliable.  Please see for more information:
http://thread.gmane.org/gmane.emacs.devel/111843/focus=112044

-- 
Juri Linkov
http://www.jurta.org/emacs/




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

end of thread, other threads:[~2009-11-09  0:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-07 15:55 [Wish] xdg-open, open from dired Gilaras Drakeson
2009-11-07 16:14 ` Lennart Borgman
2009-11-08  0:13   ` Gilaras Drakeson
2009-11-09  0:47     ` Juri Linkov

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.