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 23:22:37 +0530 Message-ID: <878v4ygp3u.fsf@gmail.com> References: <87zjxi4u15.fsf@gmail.com> <871uarou3r.fsf@gmail.com> <87d2uanz3v.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365098048 22660 80.91.229.3 (4 Apr 2013 17:54:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Apr 2013 17:54:08 +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 19:54:35 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 1UNoMr-0001K6-OC for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Apr 2013 19:54:33 +0200 Original-Received: from localhost ([::1]:53740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNoMS-0004Ui-V1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Apr 2013 13:54:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNoMK-0004Ml-GB for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2013 13:54:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNoMC-0001d7-K9 for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2013 13:54:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNoMC-0001cw-Gj for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2013 13:53:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UNoPG-0006iJ-6Z for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2013 13:57: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 17:57: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.136509816625724 (code B ref 14110); Thu, 04 Apr 2013 17:57:02 +0000 Original-Received: (at 14110) by debbugs.gnu.org; 4 Apr 2013 17:56:06 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: (Stefan Monnier's message of "Thu, 04 Apr 2013 12:24:50 -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:73165 Archived-At: 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