From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#14110: 24.3.50; Add command to open files outside of Emacs (use xdg-open, open etc) Date: Thu, 04 Apr 2013 20:04:44 +0530 Message-ID: <87d2uanz3v.fsf@gmail.com> References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365086172 12485 80.91.229.3 (4 Apr 2013 14:36:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Apr 2013 14:36:12 +0000 (UTC) Cc: 14110@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 04 16:36:38 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UNlHG-0006KE-JE for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Apr 2013 16:36:34 +0200 Original-Received: from localhost ([::1]:53511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNlGr-0004m0-Pi for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Apr 2013 10:36:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNlGg-0004kw-D3 for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2013 10:36:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNlGb-0004sV-Jn for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2013 10:35:58 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNlGb-0004rm-3i for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2013 10:35:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UNlJe-0001uk-Bn for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2013 10:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Apr 2013 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14110 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14110-submit@debbugs.gnu.org id=B14110.13650862967299 (code B ref 14110); Thu, 04 Apr 2013 14:39:02 +0000 Original-Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 14:38:16 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: (Stefan Monnier's message of "Thu, 04 Apr 2013 08:22:34 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73153 Archived-At: 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