From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gilaras Drakeson Newsgroups: gmane.emacs.devel Subject: Re: [Wish] xdg-open, open from dired Date: Sat, 07 Nov 2009 19:13:15 -0500 Message-ID: <863a4pswkk.fsf@gmail.com> References: <86bpjes51e.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1257652950 26632 80.91.229.12 (8 Nov 2009 04:02:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Nov 2009 04:02:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 08 05:02:23 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N6yys-00024F-6H for ged-emacs-devel@m.gmane.org; Sun, 08 Nov 2009 05:02:22 +0100 Original-Received: from localhost ([127.0.0.1]:41113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6yyr-0002Dk-Kg for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2009 23:02:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6vP9-0000p6-6j for emacs-devel@gnu.org; Sat, 07 Nov 2009 19:13:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6vP3-0000lf-GY for emacs-devel@gnu.org; Sat, 07 Nov 2009 19:13:13 -0500 Original-Received: from [199.232.76.173] (port=56417 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6vP3-0000lc-7R for emacs-devel@gnu.org; Sat, 07 Nov 2009 19:13:09 -0500 Original-Received: from mail-yw0-f194.google.com ([209.85.211.194]:58135) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N6vP3-0007Ru-0E for emacs-devel@gnu.org; Sat, 07 Nov 2009 19:13:09 -0500 Original-Received: by ywh32 with SMTP id 32so2032490ywh.14 for ; Sat, 07 Nov 2009 16:13:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=dEz3TVjE3VGfM8443fgoaijyeS+EkOjIIZVCodGuDp0=; b=SYXDzyxhFTpeW9CvwgX0J/hK19uDV/W8Ljs8Qw/shx016VDtUWBZWa1yv3Put6Wv6a Gy71YqNCAYfhvrKjGvRhskk8DzhZRxR3883ER0I7BOt8nBzNTZkjPuur2OBsFvp/Evrc LzR95bbPIhnrzeDJz2yDeBaHZn8cFb+4DFy6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=x7r9rOlsGbgvC9KxQvlknNsXW8CrOxCCnHtCHXojIsvgZ8pKAWkSq7mVggcsE0p4Uh Tb9lDN+VNWV7fPTqxJZzZ/xitARyaoXqelgQKdrmVk9D5GoLfAt2Dz68+VHuUNdsMDMZ obQYG8ndU9Vhxe72RmukwwkM+ZG5rXGihtXIA= Original-Received: by 10.91.203.38 with SMTP id f38mr12437951agq.60.1257639187786; Sat, 07 Nov 2009 16:13:07 -0800 (PST) Original-Received: from susa (69-165-164-40.dsl.teksavvy.com [69.165.164.40]) by mx.google.com with ESMTPS id 34sm638970yxf.11.2009.11.07.16.13.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 07 Nov 2009 16:13:07 -0800 (PST) In-Reply-To: (Lennart Borgman's message of "Sat, 7 Nov 2009 17:14:45 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Sat, 07 Nov 2009 23:02:17 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116715 Archived-At: >> 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