From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 01 03:01:16 2013 Received: (at submit) by debbugs.gnu.org; 1 Apr 2013 07:01:16 +0000 Received: from localhost ([127.0.0.1]:55295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMYjz-00029I-BW for submit@debbugs.gnu.org; Mon, 01 Apr 2013 03:01:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36595) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMYjt-000298-Rv for submit@debbugs.gnu.org; Mon, 01 Apr 2013 03:01:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMYh5-0003Tf-Oo for submit@debbugs.gnu.org; Mon, 01 Apr 2013 02:58:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMYh5-0003TQ-L7 for submit@debbugs.gnu.org; Mon, 01 Apr 2013 02:58:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMYh0-00088r-VV for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 02:58:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMYgy-0003Sl-43 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 02:58:10 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:57695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMYgx-0003Se-Qy for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 02:58:08 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro8so1056250pbb.32 for ; Sun, 31 Mar 2013 23:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:mime-version :content-type; bh=qpBn5VgBKyjq/VdVkrmZvAzX4KbgejjzshPws7DxT+c=; b=dRdFxJ/3wySurb1O04+zLOwmM9qUhidPB3JeH34Y/cEBTluj3ER3XPcql5f7XoOL9d Bzd/TlRmpResxvnsL6bN8uaV6RvN8J75MAcNx2r+UbpLxW5M6ORyolqBz4rMUnW85oUo w1Tai4inec5svbtscQ/LC0fOLAvMAozQQVEtvTcCjUY7SvNyoDqZWZ7zrWxObqkKAnYu PpgPkJIBZ56vLTgr+hXm9U7eC6VIDZM4eJp1vIJqzISlqWjI9dU/bUdqX37xemKsRarC KhEOSMe3HjeGmM3IoCbjAVJNtf1ChVl7MA1dPH+CmaNXnkYKcKDibNi3QRORAAa2H2rR oQiQ== X-Received: by 10.68.129.135 with SMTP id nw7mr16518091pbb.58.1364799486972; Sun, 31 Mar 2013 23:58:06 -0700 (PDT) Received: from debian-6.05 ([101.63.135.39]) by mx.google.com with ESMTPS id tf8sm12673725pbc.42.2013.03.31.23.58.03 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 31 Mar 2013 23:58:06 -0700 (PDT) From: Jambunathan K To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) Date: Mon, 01 Apr 2013 12:27:58 +0530 Message-ID: <87zjxi4u15.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --=-=-= Content-Type: text/plain Add support for opening files outside of Emacs (use xdg-open, open etc). This is something that I sorely missed or continue to miss. Here is an (initial) patch... --=-=-= Content-Type: text/x-diff Content-Disposition: inline Content-Description: open-file.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-31 15:19:19 +0000 +++ lisp/ChangeLog 2013-04-01 06:50:35 +0000 @@ -1,3 +1,13 @@ +2013-04-01 Jambunathan K + + * files.el (open-file-command): New user option. + (open-file): New command. + (ctl-x-map): Bind it to `C-S-f'. + + * dired-aux.el (dired-do-open): New command + + * dired.el (dired-mode-map): Bind it to `C-S-f'. + 2013-03-31 Roland Winkler * emacs-lisp/crm.el (completing-read-multiple): Doc fix. === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2013-02-28 21:51:11 +0000 +++ lisp/dired-aux.el 2013-04-01 05:44:57 +0000 @@ -426,6 +426,18 @@ Uses the shell command coming from varia 'print arg file-list))) (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) +;;;###autoload +(defun dired-do-open (&optional arg) + "Open the marked (or next ARG) files (presumably) outside of Emacs. +Use shell command coming from variable `open-file-command' to +open the file." + (interactive "P") + (let* ((file-list (dired-get-marked-files t arg)) + (command (dired-mark-read-string "Open %s with: " + (eval (cadr (assq system-type open-file-command))) + t arg file-list))) + (dired-run-shell-command (dired-shell-stuff-it command file-list t)))) + (defun dired-mark-read-string (prompt initial op-symbol arg files &optional default-value collection) "Read args for a Dired marked-files command, prompting with PROMPT. === modified file 'lisp/dired.el' --- lisp/dired.el 2013-02-28 21:51:11 +0000 +++ lisp/dired.el 2013-04-01 06:52:10 +0000 @@ -1426,6 +1426,7 @@ Do so according to the former subdir ali (define-key map "C" 'dired-do-copy) (define-key map "B" 'dired-do-byte-compile) (define-key map "D" 'dired-do-delete) + (define-key map [33554438] 'dired-do-open) ; C-S-f (define-key map "G" 'dired-do-chgrp) (define-key map "H" 'dired-do-hardlink) (define-key map "L" 'dired-do-load) @@ -3958,6 +3959,13 @@ Uses the shell command coming from varia \(fn &optional ARG)" t nil) +(autoload 'dired-do-open "dired-aux" "\ +Open the marked (or next ARG) files (presumably) outside of Emacs. +Use shell command coming from variable `open-file-command' to +open the file. + +\(fn &optional ARG)" t nil) + (autoload 'dired-clean-directory "dired-aux" "\ Flag numerical backups for deletion. Spares `dired-kept-versions' latest versions, and `kept-old-versions' oldest. === modified file 'lisp/files.el' --- lisp/files.el 2013-03-24 06:42:25 +0000 +++ lisp/files.el 2013-04-01 06:05:45 +0000 @@ -6805,6 +6805,54 @@ Otherwise, trash FILENAME using the free (rename-file fn new-fn))))))))) +;; Open files outside of Emacs +(defcustom open-file-command '((gnu "xdg-open *") + (gnu/linux "xdg-open *") + (gnu/kfreebsd "xdg-open *") + (darwin "open *") + (windows-nt "open *") + (cygwin "open *") + (ms-dos nil)) + "Shell commands for opening files generically. + +Each element of this list looks like + + (SYSTEM-TYPE COMMAND...) + +SYSTEM-TYPE is one of `system-type's. + +COMMAND can either be a string or a Lisp expression that +evaluates to a string. It follows the same semantics as the +COMMAND param of `dired-do-shell-command'." + :type '(alist :key-type symbol :value-type (group sexp) + :options ((gnu "xdg-open &") + (gnu/linux "xdg-open &") + (gnu/kfreebsd "xdg-open &") + (darwin "open &") + (windows-nt "open &") + (cygwin "open &") + (ms-dos nil))) + :version "24.4" + :group 'file) + +(eval-when-compile + (require 'dired-aux)) + +(defun open-file (filename) + "Open FILENAME (presumably) outside of Emacs. +Use shell command from `open-file-command' to open the file." + (interactive "fOpen file:") + (require 'dired-aux) + (let* ((default-directory (file-name-directory filename)) + (filename (file-name-nondirectory filename)) + (command (or (eval (cadr (assq system-type open-file-command))) + (read-shell-command (format "Open %s with: " filename) nil + 'dired-shell-command-history)))) + (when (and command (string-match "\\S-" command)) + (dired-run-shell-command (dired-shell-stuff-it command (list filename) t))))) + + +(define-key ctl-x-map [33554438] 'open-file) ; C-x C-S-f (define-key ctl-x-map "\C-f" 'find-file) (define-key ctl-x-map "\C-r" 'find-file-read-only) (define-key ctl-x-map "\C-v" 'find-alternate-file) --=-=-= Content-Type: text/plain In GNU Emacs 24.3.50.7 (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2013-04-01 on debian-6.05 Bzr revision: 112204 jay.p.belanger@gmail.com-20130331202740-d1t6qedxr13vmnzc Windowing system distributor `The X.Org Foundation', version 11.0.10707000 Important settings: value of $LANG: en_IN locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 01 03:45:37 2013 Received: (at 14110) by debbugs.gnu.org; 1 Apr 2013 07:45:37 +0000 Received: from localhost ([127.0.0.1]:55350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMZQu-0003Da-9R for submit@debbugs.gnu.org; Mon, 01 Apr 2013 03:45:37 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:48268) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMZQq-0003DN-NN for 14110@debbugs.gnu.org; Mon, 01 Apr 2013 03:45:34 -0400 Received: by mail-pd0-f177.google.com with SMTP id u11so202611pdi.36 for <14110@debbugs.gnu.org>; Mon, 01 Apr 2013 00:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:reply-to:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=h2kXoliT8ek8xV0d8dTTXlKd9Dr6atFn/y9vRYQcKq8=; b=EoVPb+GSqXpMdVC+8BgwViqWkRTBnX/aVVaUsg/0AV9MAgx7Nh0MejUZEJeykOB6Tf WrArqPTypCX+hP8etu1gJhdcQhvu8UXNv0iZtiI3CONiDd/VQN3rtGIpkDIahRbkr/XQ /1HtnUpWTVxWXx8Fsz5yE9aAW2VI7BfCVrH1VoP1e48ICN75aQHXYvQe39zsaQm/J53v n3l3pGbqZO3aCx0wJEVK7XpbxMBwsR9on0vdFQAEgMTF5Og0T3vFvDQ5d+Gb2JovlNLR NpNQjyp7TGkJw8w2Uiqti1AHoPdR542EMpaJGCDkP9I6TQqH85DUU0wwBrbk0IZAFd+m c3qg== X-Received: by 10.68.201.135 with SMTP id ka7mr16958596pbc.119.1364802160327; Mon, 01 Apr 2013 00:42:40 -0700 (PDT) Received: from localhost ([111.161.47.175]) by mx.google.com with ESMTPS id 4sm12840385pbn.23.2013.04.01.00.42.37 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Apr 2013 00:42:39 -0700 (PDT) From: Leo Liu To: Jambunathan K Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3 CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII= Date: Mon, 01 Apr 2013 15:42:32 +0800 In-Reply-To: <87zjxi4u15.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 01 Apr 2013 12:27:58 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: debbugs.gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 2013-04-01 14:57 +0800, Jambunathan K wrote: > Add support for opening files outside of Emacs (use xdg-open, open etc). > This is something that I sorely missed or continue to miss. See dired-x Leo From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 01 04:09:18 2013 Received: (at 14110) by debbugs.gnu.org; 1 Apr 2013 08:09:18 +0000 Received: from localhost ([127.0.0.1]:55368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMZnq-0003lR-5w for submit@debbugs.gnu.org; Mon, 01 Apr 2013 04:09:18 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:47921) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMZnn-0003lJ-Qz for 14110@debbugs.gnu.org; Mon, 01 Apr 2013 04:09:17 -0400 Received: by mail-pa0-f51.google.com with SMTP id jh10so1203137pab.10 for <14110@debbugs.gnu.org>; Mon, 01 Apr 2013 01:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:in-reply-to:references:user-agent :date:message-id:mime-version:content-type; bh=VtNAV4EAbrLBAWyuoB2PkcPKIMLOIExPPZVAOKrzOF4=; b=I0rWSjZCTfZUWeMRPagEgzbWHsoWKPPwj0DK87GYUaRSnkIBJsKLyudB190kZ5aV3g sy16YHatFa95qJh9L+1oBUnTkA71javsaU1sehqkjnDgNmZpxxpXcid4QveJ1g8k7Y6T R8iLltdY+turlqlmtNt4jBxl8LJC3IP1x2Ox23GnRKGlF/5dECM17r1skKpD4cR3TBKm KkhwoNznUVK5dVtB6vhfV98w7l5zH9R1BQPCdeXLmbqEQRtyqXzzf/46wlk7C6cj3jQk nqIFwzTHUySOIR/Yg0ev+/mDClSxVi7AvB0+Idxm1eJlSRV86J8avyTED7mO2AnaIlWr g+8A== X-Received: by 10.68.190.195 with SMTP id gs3mr17147947pbc.14.1364803583449; Mon, 01 Apr 2013 01:06:23 -0700 (PDT) Received: from debian-6.05 ([101.63.170.137]) by mx.google.com with ESMTPS id s6sm8732739pbi.37.2013.04.01.01.06.20 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 01 Apr 2013 01:06:22 -0700 (PDT) From: Jambunathan K To: Leo Liu Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) In-Reply-To: (Leo Liu's message of "Mon, 01 Apr 2013 15:42:32 +0800") References: <87zjxi4u15.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Date: Mon, 01 Apr 2013 13:36:11 +0530 Message-ID: <87d2uesmj0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Leo Liu writes: > On 2013-04-01 14:57 +0800, Jambunathan K wrote: >> Add support for opening files outside of Emacs (use xdg-open, open etc). >> This is something that I sorely missed or continue to miss. > > See dired-x Be specific. Where exactly? > Leo From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 01 09:35:09 2013 Received: (at 14110) by debbugs.gnu.org; 1 Apr 2013 13:35:09 +0000 Received: from localhost ([127.0.0.1]:55721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMetA-0003xw-BN for submit@debbugs.gnu.org; Mon, 01 Apr 2013 09:35:09 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:51554) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMet6-0003xn-5Y for 14110@debbugs.gnu.org; Mon, 01 Apr 2013 09:35:05 -0400 Received: by mail-pb0-f50.google.com with SMTP id jt11so1180689pbb.23 for <14110@debbugs.gnu.org>; Mon, 01 Apr 2013 06:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=Qd5GffchHST9qpx3VtZqQLwEW80mgesl1UUApzopJu0=; b=aw5lkMJseVpinbtv6aPOgWHKtKWvzZMOAv+Rm4NguaV3CX+KXV7Ow9j8wp2DWj7amE XSPbe6ZzcNMfnLNtSz6cVv0Cz9LGR3MvevEvpxukhW274FmfGlnNUpkNgMtKiVra9oxO IlUoQLqnEP+KerWT1yTkdGBz3CK53bNPGfcIrnhcOLexC6I/NLS16DvzUh/Kq03YAt0x tlIGtKx30TApgdkJCpDCHWGAqYfCgA/EQFHCquC5Q4+FMoOFS6GchZ7OQwGDzAXDEnWL V3ulcHwuCLos/+NuJE4/8NNrNJqWoUGq2y1H7Zhzi1i8MQUjOAOLr6E6p5qWQgN6JD/s qFFA== X-Received: by 10.66.250.161 with SMTP id zd1mr18858043pac.141.1364823130549; Mon, 01 Apr 2013 06:32:10 -0700 (PDT) Received: from localhost ([111.161.47.175]) by mx.google.com with ESMTPS id wl14sm15338919pac.18.2013.04.01.06.31.50 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Apr 2013 06:32:09 -0700 (PDT) From: Leo Liu To: Jambunathan K Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> <87d2uesmj0.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Mon, 01 Apr 2013 21:31:45 +0800 In-Reply-To: <87d2uesmj0.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 01 Apr 2013 13:36:11 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 2013-04-01 16:06 +0800, Jambunathan K wrote: > Be specific. Where exactly? You can start with dired-guess-shell-alist-user Leo From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 01 16:26:06 2013 Received: (at 14110) by debbugs.gnu.org; 1 Apr 2013 20:26:06 +0000 Received: from localhost ([127.0.0.1]:56499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMlIr-0007J1-Pp for submit@debbugs.gnu.org; Mon, 01 Apr 2013 16:26:06 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:40289) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMlIp-0007It-A8 for 14110@debbugs.gnu.org; Mon, 01 Apr 2013 16:26:04 -0400 Received: by mail-pd0-f169.google.com with SMTP id 10so1395931pdc.28 for <14110@debbugs.gnu.org>; Mon, 01 Apr 2013 13:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=3rE1k4fSwkoYx0On684JnHgp5zQ8Ouh28FFmZTawqxw=; b=gJWQm5wxkxQrZBhtKFvcygWf6kKP3UFacLzrsriuIrn3c5Ytl3+/asuj3oP5o+Xh0b 3J2ndFKA9MYB+uZN46ObfrwIZQrOmhe3qaDsegSJ/+2qcpeo38ISIpRjyOQb2747xaan +qt8yIaIywEkeJD3ji/X/lV14DZoESN7vSNQEbhvDRd1R2Tt6K9c9mwIJtafWNN/9AaL Yvn5I/QSTQ6HL+aHU4+XUNF0w28azrtfMez6DyFRdpYEINd5zUq1MAx/3IQZm9XV7gOx kjI4PYY22tsG//9/XsCWr+5djp01pWYIcln0WJW1MreGrbJ51ecRjz/97INfQrhpRdLz MZ9w== X-Received: by 10.68.107.4 with SMTP id gy4mr20360586pbb.153.1364847788240; Mon, 01 Apr 2013 13:23:08 -0700 (PDT) Received: from debian-6.05 ([115.241.89.195]) by mx.google.com with ESMTPS id fk1sm14945956pbd.36.2013.04.01.13.23.05 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 01 Apr 2013 13:23:07 -0700 (PDT) From: Jambunathan K To: Leo Liu Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> <87d2uesmj0.fsf@gmail.com> Date: Tue, 02 Apr 2013 01:53:00 +0530 In-Reply-To: (Leo Liu's message of "Mon, 01 Apr 2013 21:31:45 +0800") Message-ID: <87a9piyp97.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Leo Liu writes: > On 2013-04-01 16:06 +0800, Jambunathan K wrote: >> Be specific. Where exactly? > > You can start with dired-guess-shell-alist-user Ok, That is a variable not a command. My patch introduces two (useful) commands. I suggest that you start with looking at my patch. > Leo From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 03 21:11:40 2013 Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 01:11:40 +0000 Received: from localhost ([127.0.0.1]:60835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNYiJ-00044s-Ns for submit@debbugs.gnu.org; Wed, 03 Apr 2013 21:11:40 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:52872) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNYiH-00044l-GG for 14110@debbugs.gnu.org; Wed, 03 Apr 2013 21:11:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="6437071" Received: from 69-196-180-174.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Apr 2013 21:08:27 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B6B14AE3CB; Wed, 3 Apr 2013 21:08:29 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) Message-ID: References: <87zjxi4u15.fsf@gmail.com> Date: Wed, 03 Apr 2013 21:08:29 -0400 In-Reply-To: <87zjxi4u15.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 01 Apr 2013 12:27:58 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.5 (/) > Add support for opening files outside of Emacs (use xdg-open, open etc). > This is something that I sorely missed or continue to miss. For those people who find xdg-open not customizable enough, I think open-file deserves an alist associating different commands to different file kinds. I guess in this sense I agree with Leo, that it should probably use dired-guess-shell or something like that. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 03 23:28:38 2013 Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 03:28:38 +0000 Received: from localhost ([127.0.0.1]:60976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNaqq-0007yV-IZ for submit@debbugs.gnu.org; Wed, 03 Apr 2013 23:28:38 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35043) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNaqn-0007yH-BZ for 14110@debbugs.gnu.org; Wed, 03 Apr 2013 23:28:34 -0400 Received: by mail-pa0-f50.google.com with SMTP id bg2so1252020pad.37 for <14110@debbugs.gnu.org>; Wed, 03 Apr 2013 20:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=J4L5eVIStYopO7oYt8PHLsZiW/+oHPs9OCAtGQ1YwlQ=; b=DJj0i7AWVMIdEv7qk8sPv7Q1nyiy63BTLYF414fJBAXM8FmyKswdeeLQ4PAAcVUuyY Qs9FUb4xYF0OsNXIIbaGyFYoEuUaIGBi9o7Z0wuCkcNlHCUltx8iI3DhnUc1Qho0hYNz 6N4gEttbiuqLbQYpoYWXF74Qwi9pf5f460UcuNdFzJcz47GDLCn+cvl82WA4YgpLF4oy XynYfFAeBsFBVwOS8TVrGyKQBYqKO0lzmEimkiYzdsfOeJ392yViTEMg9XN2IkoO8oej CJUVPDX3dcksafl+OMevBN7nKyRKcxE27J3BBCyiVWZ3lzlMNivkiZavPNAIPiaWPkrj dwtQ== X-Received: by 10.68.96.34 with SMTP id dp2mr5770416pbb.193.1365045925252; Wed, 03 Apr 2013 20:25:25 -0700 (PDT) Received: from debian-6.05 ([115.242.147.166]) by mx.google.com with ESMTPS id ri1sm8345297pbc.16.2013.04.03.20.25.21 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 03 Apr 2013 20:25:24 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> Date: Thu, 04 Apr 2013 08:55:12 +0530 In-Reply-To: (Stefan Monnier's message of "Wed, 03 Apr 2013 21:08:29 -0400") Message-ID: <871uarou3r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Stefan Monnier writes: >> Add support for opening files outside of Emacs (use xdg-open, open etc). >> This is something that I sorely missed or continue to miss. > > For those people who find xdg-open not customizable enough, I think > open-file deserves an alist associating different commands to different > file kinds. > I guess in this sense I agree with Leo, that it should probably use > dired-guess-shell or something like that. I have looked at the variable that Leo mentions, prior to preparting the patch. (Hint: The COMMAND is a sexp. It can theoretically be a `cond' or a `case' statement.) I want the new customization to be simple and not over-engineered and in a way that is welcoming of the new user while giving power to the more experienced. To allow for a possibility that a generic open command may not be available, I have arranged for a `read-shell-command' and remembering the command name so entered in `dired-shell-command-history'. Furthermore, the open command need not be xdg-open, it could be gnome-open or kde-open. (If you look xdg-open you will see that it internally checks for desktop open and calls the native open method.) (defun open-file (filename) "Open FILENAME (presumably) outside of Emacs. Use shell command from `open-file-command' to open the file." (interactive "fOpen file:") (require 'dired-aux) (let* ((default-directory (file-name-directory filename)) (filename (file-name-nondirectory filename)) | (command (or (eval (cadr (assq system-type open-file-command))) | (read-shell-command (format "Open %s with: " filename) nil | 'dired-shell-command-history)))) (when (and command (string-match "\\S-" command)) (dired-run-shell-command (dired-shell-stuff-it command (list filename) t))))) > Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 04 08:25:50 2013 Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 12:25:50 +0000 Received: from localhost ([127.0.0.1]:33151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNjEj-0006kz-7v for submit@debbugs.gnu.org; Thu, 04 Apr 2013 08:25:49 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:28985) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNjEf-0006kq-KO for 14110@debbugs.gnu.org; Thu, 04 Apr 2013 08:25:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT X-IPAS-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="6456351" Received: from 69-196-180-174.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Apr 2013 08:22:32 -0400 Received: by pastel.home (Postfix, from userid 20848) id B592267C34; Thu, 4 Apr 2013 08:22:34 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) Message-ID: References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> Date: Thu, 04 Apr 2013 08:22:34 -0400 In-Reply-To: <871uarou3r.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 04 Apr 2013 08:55:12 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > (Hint: The COMMAND is a sexp. It can theoretically be a `cond' > or a `case' statement.) If you want such customizability, then please use a function: funcall/apply is great, but eval is evil. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 04 10:38:16 2013 Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 14:38:16 +0000 Received: from localhost ([127.0.0.1]:33646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNlIt-0001tf-VR for submit@debbugs.gnu.org; Thu, 04 Apr 2013 10:38:16 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:48861) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNlIo-0001tU-50 for 14110@debbugs.gnu.org; Thu, 04 Apr 2013 10:38:13 -0400 Received: by mail-pb0-f46.google.com with SMTP id rp8so1459942pbb.5 for <14110@debbugs.gnu.org>; Thu, 04 Apr 2013 07:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=P4TIBPnRsDdobU41ELhzLSTBsf+yZpePl6Kbp0Rnksc=; b=GwKzJM6NY+4lQPY2Mf1k+roeAKg6dW4rGT5ntlUzQBuBheT09s8ikwDfVghZlUhOQJ jg+BgtVmfCQs5wYFR05rQROSFNFFEtMSqpMWx9ckwqw1gkf2xXfa3z1qV27GdDVwp/kR Wy5euCgAxWu+N979+gJO3Ir1sMlERFigwbLYhniZSUhkP1eKRYi3+DYVtGQQk5DMYoM+ HQCvOf20odBQ68oXW3qFc+iXdQX2DdQXlN6n5rIUX8vciJnB5qRdPDybk18p9lHgCkjF 6kUdkVTeW4NWj4InYn2Z4oHTb8va+qPVaOAWtB0yUMcgRB5JA8UPWJ6ydgOpjf4brfFO OW9Q== X-Received: by 10.66.102.10 with SMTP id fk10mr9969596pab.169.1365086099384; Thu, 04 Apr 2013 07:34:59 -0700 (PDT) Received: from debian-6.05 ([115.241.32.149]) by mx.google.com with ESMTPS id ef3sm11682011pad.20.2013.04.04.07.34.55 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 07:34:58 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> Date: Thu, 04 Apr 2013 20:04:44 +0530 In-Reply-To: (Stefan Monnier's message of "Thu, 04 Apr 2013 08:22:34 -0400") Message-ID: <87d2uanz3v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.8 (-) Stefan Monnier writes: >> (Hint: The COMMAND is a sexp. It can theoretically be a `cond' >> or a `case' statement.) > > If you want such customizability, then please use a function: > funcall/apply is great, but eval is evil. (It will be improper for me to provide a patch.) Leo suggests `dired-guess-shell-alist-user'. COMMAND there is a sexp, btw. So the above variable is also evil. There is one another reason why `dired-guess-shell-alist-user' will be improper to be used for Open semantics. IIRC, running a shell command .tex file compiles it. So equating shell command with open is confusing, btw. ,----[ C-h v dired-guess-shell-alist-user RET ] | dired-guess-shell-alist-user is a variable defined in `dired-x.el'. | Its value is nil | | Documentation: | User-defined alist of rules for suggested commands. | These rules take precedence over the predefined rules in the variable | `dired-guess-shell-alist-default' (to which they are prepended). | | Each element of this list looks like | | (REGEXP COMMAND...) | | where each COMMAND can either be a string or a Lisp expression that evaluates | to a string. If several COMMANDs are given, the first one will be the default | and the rest will be added temporarily to the history and can be retrieved | with M-x previous-history-element (M-p) . | | The variable `dired-guess-shell-case-fold-search' controls whether | REGEXP is matched case-sensitively. | | You can set this variable in your ~/.emacs. For example, to add rules for | `.foo' and `.bar' files, write | | (setq dired-guess-shell-alist-user | '(("\\.foo\\'" "FOO-COMMAND") | ("\\.bar\\'" | (if condition | "BAR-COMMAND-1" | "BAR-COMMAND-2")))) | | You can customize this variable. | | [back] `---- > Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 04 12:28:06 2013 Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 16:28:06 +0000 Received: from localhost ([127.0.0.1]:33795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNn1B-0004V1-Bo for submit@debbugs.gnu.org; Thu, 04 Apr 2013 12:28:05 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:37818) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNn18-0004Us-OA for 14110@debbugs.gnu.org; Thu, 04 Apr 2013 12:28:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="6485490" Received: from 69-196-180-174.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Apr 2013 12:24:48 -0400 Received: by pastel.home (Postfix, from userid 20848) id E5C1F67C34; Thu, 4 Apr 2013 12:24:50 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) Message-ID: References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> Date: Thu, 04 Apr 2013 12:24:50 -0400 In-Reply-To: <87d2uanz3v.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 04 Apr 2013 20:04:44 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > Leo suggests `dired-guess-shell-alist-user'. COMMAND there is a sexp, > btw. So the above variable is also evil. Yes. I also plead guilty of doing that a few times in the past. It's still evil. > There is one another reason why `dired-guess-shell-alist-user' will be > improper to be used for Open semantics. IIRC, running a shell command > .tex file compiles it. So equating shell command with open is > confusing, btw. I tend to agree, but: - I can't think of anything useful "open" could do with a .tex file other than pass it back to Emacs (which you can already do better by opening the file in Emacs without going through "open"). While this might not apply to all cases, I suspect that most cases are like that. - That doesn't preclude using dired-guess-shell. It might just mean that we should have maybe an alist for "run command" and another alist for "open command" (and maybe a third alist to share the many common cases between the two). Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 04 13:56:06 2013 Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 17:56:06 +0000 Received: from localhost ([127.0.0.1]:33916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNoOL-0006gq-Eo for submit@debbugs.gnu.org; Thu, 04 Apr 2013 13:56:06 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:60369) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNoOJ-0006gj-7l for 14110@debbugs.gnu.org; Thu, 04 Apr 2013 13:56:04 -0400 Received: by mail-pb0-f54.google.com with SMTP id xa7so1555513pbc.27 for <14110@debbugs.gnu.org>; Thu, 04 Apr 2013 10:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=qK9HB3injt9M/NH+PmIJ9XfDldgpGQxPjqeibJov1dg=; b=ZU7YnCSV1K5b9EpfG2CsYqqAk+b2h5dIBUgHZtv2/4aqWffibNrVUvPF3d6EqNqNX8 q6rPKhm6Bn15/kykxpjQ+pdYd6YsFbj2nEYtVnzrRSHTIgLFcSgdozVYJaGU+45jE5oX ibjSxq71EqnZ4koO4OBWo+Onr+X4dPJNOC4AgLWJrCbJN8hy5ZjLK6GcDxX8lZszE1TD W7UBUgx+YgpzhQ5ZnfqZKQMqQVhztmyC3ZeSeJ6PRFJfBURIhTLyL8sRJe8XhdYvCfuM 0H64b5eRv0+2M7hKT9KcyyQtPT/++6fhZ+QgHC8x48I/vqo1l8Og7QL1C/C/N07EiwXo R5sw== X-Received: by 10.68.143.197 with SMTP id sg5mr10209894pbb.101.1365097971490; Thu, 04 Apr 2013 10:52:51 -0700 (PDT) Received: from debian-6.05 ([115.241.32.149]) by mx.google.com with ESMTPS id ve7sm12329268pab.11.2013.04.04.10.52.47 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 10:52:50 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> Date: Thu, 04 Apr 2013 23:22:37 +0530 In-Reply-To: (Stefan Monnier's message of "Thu, 04 Apr 2013 12:24:50 -0400") Message-ID: <878v4ygp3u.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.8 (-) Stefan Monnier writes: >> Leo suggests `dired-guess-shell-alist-user'. COMMAND there is a sexp, >> btw. So the above variable is also evil. > > Yes. I also plead guilty of doing that a few times in the past. > It's still evil. > >> There is one another reason why `dired-guess-shell-alist-user' will be >> improper to be used for Open semantics. IIRC, running a shell command >> .tex file compiles it. So equating shell command with open is >> confusing, btw. > > I tend to agree, but: > - I can't think of anything useful "open" could do with a .tex file > other than pass it back to Emacs (which you can already do better by > opening the file in Emacs without going through "open"). > While this might not apply to all cases, I suspect that most cases are > like that. `open-file' command (as I see it) will do what a "double click" in Windows Explorer or Thunar will do. Note that each popular `system-type' already has a open command. In Windows + MikTex, double-clicking on a .tex will open a specialized viewer (IIRC, it is called yap). More importantly, `open-file' on a directory will launch Windows explorer or Thunar or Nautilus. > - That doesn't preclude using dired-guess-shell. It might just mean > that we should have maybe an alist for "run command" and another alist > for "open command" (and maybe a third alist to share the many common > cases between the two). Big NO for having an alist (within Emacs) for the open command. The alist is already maintained by the user's desktop (likely via Explore->`Open with' -> `Always use this application for these files'). Emacs should at no point in time have any knowledge of this association. To accommodate other systems which are non-desktopy (DOS?), we can enhance the shell-command history var to be a (cons FILE-EXTENSION VIEWER). This will be an exception rather than the norm. > Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 04 14:23:43 2013 Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 18:23:43 +0000 Received: from localhost ([127.0.0.1]:33951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNop5-0007ML-LK for submit@debbugs.gnu.org; Thu, 04 Apr 2013 14:23:43 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:51812) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNop4-0007ME-61 for 14110@debbugs.gnu.org; Thu, 04 Apr 2013 14:23:42 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MKQ00500TKOZW00@a-mtaout23.012.net.il> for 14110@debbugs.gnu.org; Thu, 04 Apr 2013 21:20:03 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MKQ005F3TLFZU00@a-mtaout23.012.net.il>; Thu, 04 Apr 2013 21:20:03 +0300 (IDT) Date: Thu, 04 Apr 2013 21:20:41 +0300 From: Eli Zaretskii Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) In-reply-to: <878v4ygp3u.fsf@gmail.com> X-012-Sender: halo1@inter.net.il To: Jambunathan K Message-id: <83li8yf98m.fsf@gnu.org> References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> <878v4ygp3u.fsf@gmail.com> X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Jambunathan K > Date: Thu, 04 Apr 2013 23:22:37 +0530 > Cc: 14110@debbugs.gnu.org > > The alist is already maintained by the user's desktop (likely via > Explore->`Open with' -> `Always use this application for these files'). > Emacs should at no point in time have any knowledge of this association. Emacs can easily know about the associations, at least on Windows. > To accommodate other systems which are non-desktopy (DOS?), we can > enhance the shell-command history var to be a (cons FILE-EXTENSION > VIEWER). This will be an exception rather than the norm. That's meaningless on DOS, which is a single-process system. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 01:01:30 2013 Received: (at 14110) by debbugs.gnu.org; 5 Apr 2013 05:01:30 +0000 Received: from localhost ([127.0.0.1]:34552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNymH-00077u-HH for submit@debbugs.gnu.org; Fri, 05 Apr 2013 01:01:30 -0400 Received: from mail-da0-f54.google.com ([209.85.210.54]:48738) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNymF-00077n-T8 for 14110@debbugs.gnu.org; Fri, 05 Apr 2013 01:01:28 -0400 Received: by mail-da0-f54.google.com with SMTP id p1so1426504dad.27 for <14110@debbugs.gnu.org>; Thu, 04 Apr 2013 21:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=IQePh7hVHPABpfkHZV0ddPdd27ZAdAEBcQ7bYUXy9Cs=; b=bVRcQa6UInkg7+PyDjVykSVlPJdZMVVFgnOpvyh4NQHfDxr71ASt+G92mSZ/SFvQOB o9OzTE5QipW9dxedi/qUd6TAdp3z6hBuPzg9eVZSVHtZjcc0FBOmt/7ZSa77up8dYipX MKVLclzRlsuG4PYJ20JXeC47X9GBvCEsy1U9RRe9UJYnQXd6EyTy4PPKHIAaegDkm/KN N4PCSiHILaYImhoNrKuHeteopQOhgO3Vh9CKVFCpUkHETPuufq49uheIgsMSfBkoTJ11 6IFk7tVQfR/ZW191k0iVRugMqj55OFpL5uyN22XdByoEeFT6h+cUqO+cvRoeqeon1cum AG2A== X-Received: by 10.66.122.196 with SMTP id lu4mr12870322pab.129.1365137893763; Thu, 04 Apr 2013 21:58:13 -0700 (PDT) Received: from debian-6.05 ([115.242.147.216]) by mx.google.com with ESMTPS id ti8sm12878129pbc.12.2013.04.04.21.58.10 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 21:58:12 -0700 (PDT) From: Jambunathan K To: Eli Zaretskii Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> <878v4ygp3u.fsf@gmail.com> <83li8yf98m.fsf@gnu.org> Date: Fri, 05 Apr 2013 10:28:01 +0530 In-Reply-To: <83li8yf98m.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 04 Apr 2013 21:20:41 +0300") Message-ID: <878v4x1sme.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Eli Zaretskii writes: >> From: Jambunathan K >> Date: Thu, 04 Apr 2013 23:22:37 +0530 >> Cc: 14110@debbugs.gnu.org >> >> The alist is already maintained by the user's desktop (likely via >> Explore->`Open with' -> `Always use this application for these files'). >> Emacs should at no point in time have any knowledge of this association. > > Emacs can easily know about the associations, at least on Windows. On my Debian/Squeeze, this is what I have ended up with. ,---- | $ xdg-mime query filetype images/vanilla-emacs.png | image/png; charset=binary `---- ,---- | $ xdg-mime query default image/png | gimp.desktop `---- ,---- | $ dpkg -L gimp | grep desktop | /usr/lib/gimp/2.0/plug-ins/file-desktop-link | /usr/share/applications/gimp.desktop `---- ,---- | $ cat /usr/share/applications/gimp.desktop | grep Exec | Exec=gimp-2.6 %U | TryExec=gimp-2.6 `---- ,---- | $ gimp- | gimp-2.6 gimp-console gimp-console-2.6 `---- There should be a way to go directly from *.desktop file to Exec entry. I haven't figured it out or it is in the works. Surprisingly, the above sequence fails for ODT files. ,---- | $ xdg-mime query filetype book.odt | application/vnd.oasis.opendocument.text; charset=binary `---- ,---- | $ xdg-mime query default application/vnd.oasis.opendocument.text | `---- I believe xdg-stuff is in it's initial stages and not so reliable at this moment. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 02:07:51 2013 Received: (at submit) by debbugs.gnu.org; 5 Apr 2013 06:07:51 +0000 Received: from localhost ([127.0.0.1]:34595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNzoU-0000Kp-AP for submit@debbugs.gnu.org; Fri, 05 Apr 2013 02:07:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40515) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNzoR-0000Ki-MU for submit@debbugs.gnu.org; Fri, 05 Apr 2013 02:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNzlE-0004hm-Ei for submit@debbugs.gnu.org; Fri, 05 Apr 2013 02:04:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.4 required=5.0 tests=BAYES_20,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:53606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNzlE-0004hi-Aq for submit@debbugs.gnu.org; Fri, 05 Apr 2013 02:04:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNzl9-0006iy-A7 for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2013 02:04:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNzl1-0004Ok-LD for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2013 02:04:23 -0400 Received: from plane.gmane.org ([80.91.229.3]:60173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNzl1-0004OW-FH for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2013 02:04:15 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UNzlM-0005Fl-LX for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2013 08:04:36 +0200 Received: from lbe83-2-78-243-104-167.fbx.proxad.net ([78.243.104.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Apr 2013 08:04:36 +0200 Received: from thierry.volpiatto by lbe83-2-78-243-104-167.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Apr 2013 08:04:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) Date: Fri, 05 Apr 2013 08:03:59 +0200 Organization: Emacs Helm Lines: 40 Message-ID: <87fvz5fr8w.fsf@gmail.com> References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> <878v4ygp3u.fsf@gmail.com> <83li8yf98m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lbe83-2-78-243-104-167.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:E7TGIwbO0uTfhobwlz2vGrZkv6A= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Eli Zaretskii writes: >> From: Jambunathan K >> Date: Thu, 04 Apr 2013 23:22:37 +0530 >> Cc: 14110@debbugs.gnu.org >> >> The alist is already maintained by the user's desktop (likely via >> Explore->`Open with' -> `Always use this application for these files'). >> Emacs should at no point in time have any knowledge of this association. > > Emacs can easily know about the associations, at least on Windows. Here what I do in helm: Default action to open a file is always edit the file in emacs with the right mode. Use another command to open file externally (async). This command can use a prefix to choose program to use (with completion). Once you choose this program your choice is stored in an alist with customize. (So no need for user to customize complex alist) Each time you want to change, you can press C-u to make another choice. If you answer yes, this new program will replace the precedent in alist, no will use the new program without storing it. If you don't press C-u the last program used for this kind of file is used. If the command is called with no choice (not C-u) and nothing for this file extension is found in alist helm looks for mailcap entries. It is good to be able to change program at any time, e.g for foo.jpg, you may use sometimes imagemagick, ristretto, or gimp etc.... I also have a command that use default tool with no choice (xdg-open) but I don't like it. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 02:56:34 2013 Received: (at 14110) by debbugs.gnu.org; 5 Apr 2013 06:56:34 +0000 Received: from localhost ([127.0.0.1]:34618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO0Zc-0001Vk-Kp for submit@debbugs.gnu.org; Fri, 05 Apr 2013 02:56:33 -0400 Received: from mail-da0-f47.google.com ([209.85.210.47]:52679) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO0ZW-0001VZ-IJ for 14110@debbugs.gnu.org; Fri, 05 Apr 2013 02:56:27 -0400 Received: by mail-da0-f47.google.com with SMTP id s35so1472086dak.20 for <14110@debbugs.gnu.org>; Thu, 04 Apr 2013 23:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=KZt68xddK/xercem1LqAwKeQgPSSYGLZCia4RDuZKOg=; b=0pLlGaMekyfmsNT2Ii/9hGnWMBZrwYoarHjeQ77zBXkwPTysqj6GZiYN8O/ht7S17l w49pgcLUnl+9AivB4vIt/Qp72GH0cKDf2E31TVqr+9bZucnASG6G9ImbEj06lMVE1Aky s0UYAMQZJU6dqbAHo4QPHajg5dD2eXAQ2wlmOgzfdu3kIZ2P/F9MfUgAKhX6Vwz9t/Se bzpiU6Tg9o4o/B9jPsmAOHT95v9rbc+q7a0ciuhM+3Q0XXo2leBFuWJ/0T3S94eLzNC5 eUBb7JeQCatUswTpCa5FZnh9LedkIN7QDGcJYFimqbzF+V2QJY2FBp+hgdxfeu0wOml8 iDNg== X-Received: by 10.68.231.42 with SMTP id td10mr12783430pbc.174.1365144791807; Thu, 04 Apr 2013 23:53:11 -0700 (PDT) Received: from localhost ([61.148.244.73]) by mx.google.com with ESMTPS id wl14sm14734543pac.18.2013.04.04.23.53.07 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 23:53:11 -0700 (PDT) From: Leo Liu To: Jambunathan K Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Fri, 05 Apr 2013 14:53:06 +0800 In-Reply-To: <87d2uanz3v.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 04 Apr 2013 20:04:44 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 2013-04-04 22:34 +0800, Jambunathan K wrote: > Leo suggests `dired-guess-shell-alist-user'. COMMAND there is a sexp, > btw. So the above variable is also evil. dired-x provides a general way for doing these sorts of things including those you try to achieve in your patches. I merely point you to the entry. It has a few glitches such as using eval and maybe others but nothing major. Leo From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 10 00:34:43 2013 Received: (at 14110) by debbugs.gnu.org; 10 Apr 2013 04:34:44 +0000 Received: from localhost ([127.0.0.1]:42836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UPmk7-00030X-A2 for submit@debbugs.gnu.org; Wed, 10 Apr 2013 00:34:43 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:54638) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UPmk4-00030O-KA for 14110@debbugs.gnu.org; Wed, 10 Apr 2013 00:34:42 -0400 Received: by mail-pa0-f51.google.com with SMTP id jh10so88544pab.24 for <14110@debbugs.gnu.org>; Tue, 09 Apr 2013 21:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=/jaQgCLlui1xciYNusVEGk0H5A3i2R/MFkgGrSf7/ik=; b=nJZC0JrHKvZpgACMx2JJFBxO2qIBLz8onMuXkd2/E0/E8ov4xG7Lnhg3of/FtWiUGG egVpZSvTliMj8B/+rsCYjWPNVen0jgZjeElZJutoS1Z8gYgHmsUoJtLa6CIBvBXBVfJu AHZ2NBoL1uQbmCy8Q1IjCrhtBhacI+WcagO+zJQ/M8nv1qRuTWtw3FrAJ4+yt46BHsuH o3pN82iqqcaramc4oHKF0xhKu36Xa/i7S0xcReew1Q70/uh16R/dCwZMGS4z4ktzLFlZ KqUblcpUwilJwb56oq2D3X1zpxRfKIN8aGRwMMjUAuiOTIDkzWvetkzePQ0+dOXC5xNl bZBg== X-Received: by 10.66.19.170 with SMTP id g10mr1180702pae.199.1365568258386; Tue, 09 Apr 2013 21:30:58 -0700 (PDT) Received: from debian-6.05 ([115.242.208.26]) by mx.google.com with ESMTPS id ak1sm4785728pbc.10.2013.04.09.21.30.55 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 09 Apr 2013 21:30:57 -0700 (PDT) From: Jambunathan K To: Thierry Volpiatto Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> <878v4ygp3u.fsf@gmail.com> <83li8yf98m.fsf@gnu.org> <87fvz5fr8w.fsf@gmail.com> Date: Wed, 10 Apr 2013 10:00:45 +0530 In-Reply-To: <87fvz5fr8w.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 05 Apr 2013 08:03:59 +0200") Message-ID: <8761zv3t3e.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > I also have a command that use default tool with no choice (xdg-open) > but I don't like it. What are the problems with `xdg-open'? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 10 01:43:32 2013 Received: (at 14110) by debbugs.gnu.org; 10 Apr 2013 05:43:32 +0000 Received: from localhost ([127.0.0.1]:42878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UPnof-0004h0-6u for submit@debbugs.gnu.org; Wed, 10 Apr 2013 01:43:31 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:39154) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UPnoc-0004gs-8U for 14110@debbugs.gnu.org; Wed, 10 Apr 2013 01:43:27 -0400 Received: by mail-wg0-f48.google.com with SMTP id m15so73169wgh.3 for <14110@debbugs.gnu.org>; Tue, 09 Apr 2013 22:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=mxK5s/ycJY9JDqcv2ut1QUahtCP4joyVH/wKz5ZtFE4=; b=jRO237hbjKfCrRDjw5L6HagaVFn60iHWDQgPw2wTkGbLCvALypMMKV8X3OYfxwqKm8 5EixFO4X6rfBD/WNHQ55m8q/TqNU0ESrUGAPn3mke+qPEKAED0eEJt6k2KtmyzT9dYDP M6oP+EZnlg6lH3eSjWFXAWyukPcAgHxbJ9CAx66+tZRyEU3qEYEvFqjZFdGXRTiodG7J bkCZF4Te/MVFyGgfGGFrFTyZRy6o+xr72kChmKNd5g9paPv+qcGFdCDk9c8KzlZYjqzJ 79CxPL0l+CJNJFNRnMO+wBOttW2Lea2VLBmeEhgEtgyoPFsLE7vBBxhQABsR9EdaYa78 91uw== X-Received: by 10.180.82.68 with SMTP id g4mr757616wiy.26.1365572383846; Tue, 09 Apr 2013 22:39:43 -0700 (PDT) Received: from dell-14z (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPS id ed6sm32999811wib.9.2013.04.09.22.39.42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 09 Apr 2013 22:39:42 -0700 (PDT) From: Thierry Volpiatto To: Jambunathan K Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) Organization: Emacs Helm References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> <878v4ygp3u.fsf@gmail.com> <83li8yf98m.fsf@gnu.org> <87fvz5fr8w.fsf@gmail.com> <8761zv3t3e.fsf@gmail.com> Date: Wed, 10 Apr 2013 07:39:40 +0200 In-Reply-To: <8761zv3t3e.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 10 Apr 2013 10:00:45 +0530") Message-ID: <87obdnc5b7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14110 Cc: 14110@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Jambunathan K writes: >> I also have a command that use default tool with no choice (xdg-open) >> but I don't like it. > > What are the problems with `xdg-open'? Less flexibility, no choice. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 22:55:22 2013 Received: (at 14110-done) by debbugs.gnu.org; 15 Nov 2013 03:55:22 +0000 Received: from localhost ([127.0.0.1]:52997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VhAV7-00083g-RH for submit@debbugs.gnu.org; Thu, 14 Nov 2013 22:55:22 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35023) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VhAV5-00083R-Um for 14110-done@debbugs.gnu.org; Thu, 14 Nov 2013 22:55:20 -0500 Received: by mail-pa0-f49.google.com with SMTP id lf10so3058850pab.22 for <14110-done@debbugs.gnu.org>; Thu, 14 Nov 2013 19:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=977NOdKhFMrGDiO/+BodCULFkVFB6aa+4veEylEDlY8=; b=QXUDG/6GqrRUgzbJyHENAIX0wdvuK4/y97uJk/8/IY8WsPINhqGjVb3sascU87WuER zenSki8k286D+PNpIvNqJplC+CsYk1yZNiaz3qLWfM/cQzq7f8D0H6qlsSji1AYoP9Mp JTHdx2HdoqZyDy6z3Dc2P3CV0CZF65SjXFcpDjWQqBDhiZ30nVzEmAcNPi9p/NlEooEa SSk/AxtPSt2z/dOF/BrAxkoVeA2LWrh/OpWhDIl25nncCJtrXXWgRJuTqJ3K7Q2CM8b/ Anl6ebR3Yj+QMpzR+3dRhPpztWLRG7jjQ3nw7Pwev7sbMBhQbLmb9HfZncM4j5zMWvQY RD2g== X-Received: by 10.66.27.16 with SMTP id p16mr4651366pag.65.1384487714133; Thu, 14 Nov 2013 19:55:14 -0800 (PST) Received: from debian-6.05 ([101.63.165.167]) by mx.google.com with ESMTPSA id i10sm1391728pat.11.2013.11.14.19.55.12 for <14110-done@debbugs.gnu.org> (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 14 Nov 2013 19:55:13 -0800 (PST) From: Jambunathan K To: 14110-done@debbugs.gnu.org Subject: Re: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) References: <87zjxi4u15.fsf@gmail.com> Date: Tue, 01 Jan 2002 05:58:09 +0530 In-Reply-To: <87zjxi4u15.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 01 Apr 2013 12:27:58 +0530") Message-ID: <87g05qykx2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: OP here. I have a local fix that works for me. Closing it. [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kjambunathan[at]gmail.com) 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 14110-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: OP here. I have a local fix that works for me. Closing it. [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kjambunathan[at]gmail.com) 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid OP here. I have a local fix that works for me. Closing it. From unknown Sat Aug 16 11:41:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 13 Dec 2013 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator