unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add file-dwim.
@ 2015-10-18 14:54 Taylan Ulrich Bayırlı/Kammer
  2015-10-18 19:12 ` Artur Malabarba
  2015-10-19 13:32 ` Wolfgang Jenkner
  0 siblings, 2 replies; 12+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-10-18 14:54 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 19 bytes --]

This is for ELPA.


[-- Attachment #2: 0001-Add-file-dwim.patch --]
[-- Type: text/x-diff, Size: 5201 bytes --]

From 288d2752c10349fffbde0cec070e4318690a5506 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Sun, 18 Oct 2015 16:53:51 +0200
Subject: [PATCH] Add file-dwim.

---
 packages/file-dwim/file-dwim.el | 132 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 132 insertions(+)
 create mode 100644 packages/file-dwim/file-dwim.el

diff --git a/packages/file-dwim/file-dwim.el b/packages/file-dwim/file-dwim.el
new file mode 100644
index 0000000..e33f725
--- /dev/null
+++ b/packages/file-dwim/file-dwim.el
@@ -0,0 +1,132 @@
+;;; file-dwim.el --- Do What I Mean for files.
+
+;; Copyright (C) 2015  Free Software Foundation, Inc.
+
+;; Author: Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
+;; Keywords: extensions, files
+;; URL: https://github.com/TaylanUB/file-dwim
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Do any action on a file, according to a dispatch-table.  E.g. specify that
+;; media files should be played, directories opened in Dired, etc..  This could
+;; be bound to RET in Dired, or used to replace `find-file'.
+;;
+;; Example configuration:
+;;
+;; (define-key dired-mode-map (kbd "RET") 'file-dwim-dired)
+;;
+;; (defun file-has-extension (file exts)
+;;   (string-match-p
+;;    (rx-to-string `(: "." (or ,@exts) eos))
+;;    file))
+;;
+;; (defun audio-file-p (file)
+;;   (file-has-extension file '("mp3" "flac" "aac" "wav")))
+;;
+;; (defun video-file-p (file)
+;;   (file-has-extension
+;;    file '("mkv" "mp4" "wmv" "webm" "avi" "mpg" "mov" "flv" "mts")))
+;;
+;; (defun guitarpro-file-p (file)
+;;   (file-has-extension file '("gp3" "gp4")))
+;;
+;; (defun play-audio-file (file)
+;;   (shell-command (concat "my-audio-player " (shell-quote-argument file))))
+;;
+;; (defun play-video-file (file)
+;;   (shell-command (concat "my-video-player " (shell-quote-argument file))))
+;;
+;; (defun open-guitarpro-file (file)
+;;   (async-shell-command (concat "tuxguitar " (shell-quote-argument file))))
+;;
+;; (dolist (entry
+;;          '((audio-file-p . play-audio-file)
+;;            (video-file-p . play-video-file)
+;;            (guitarpro-file-p . open-guitarpro-file)
+;;            ))
+;;   (add-to-list 'file-dwim-action-list entry))
+
+;;; Code:
+
+(eval-when-compile
+  (require 'cl)
+  (declare-function dired-get-file-for-visit "dired.el" ()))
+
+(defgroup file-dwim nil
+  "Do What I Mean for files."
+  :group 'files)
+
+(defcustom file-dwim-action-list nil
+  "A list of action-specifiers for file-types.
+
+Each entry must be either a cons cell or a unary function.
+
+If it's a cons cell, the car must either be a regexp or a
+predicate, and the cdr an unary function that will be called with
+a FILE argument.
+
+If it's a function, it will be called with a FILE argument and
+should return t to indicate that it matched, and can do its
+action at the same time.
+
+A function-entry could act on a file but return nil anyway to
+allow further actions."
+  :type '(repeat (or (cons (or string function)
+                           function)
+                     function))
+  :group 'file-dwim)
+
+(defcustom file-dwim-default-action 'find-file
+  "The default action for when none of `file-dwim-action-list'
+are applicable."
+  :type 'function
+  :group 'file-dwim)
+
+;;;###autoload
+(defun file-dwim (file)
+  "Act on a file according to `file-dwim-action-list'."
+  (interactive "FFile: ")
+  (cl-block actions
+    (dolist (action file-dwim-action-list)
+      (cond
+       ((consp action)
+        (let ((test (car action))
+              (function (cdr action)))
+          (cond
+           ((stringp test)
+            (when (string-match-p test file)
+              (return-from actions (funcall function file))))
+           ((functionp test)
+            (when (funcall test file)
+              (return-from actions (funcall function file))))
+           (t
+            (error "Bad test in `file-dwim-action-list': %S" action)))))
+       ((functionp action)
+        (if (funcall action file)
+            (return-from actions)))
+       (t
+        (error "Bad action in `file-dwim-action-list': %S" action))))
+    (funcall file-dwim-default-action file)))
+
+;;;###autoload
+(defun file-dwim-dired ()
+  "In Dired, use `file-dwim' on a file"
+  (interactive)
+  (file-dwim (dired-get-file-for-visit)))
+
+(provide 'file-dwim)
+;;; file-dwim.el ends here
-- 
2.5.0


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

* Re: [PATCH] Add file-dwim.
  2015-10-18 14:54 [PATCH] Add file-dwim Taylan Ulrich Bayırlı/Kammer
@ 2015-10-18 19:12 ` Artur Malabarba
  2015-10-18 19:46   ` Taylan Ulrich Bayırlı/Kammer
  2015-10-19 13:32 ` Wolfgang Jenkner
  1 sibling, 1 reply; 12+ messages in thread
From: Artur Malabarba @ 2015-10-18 19:12 UTC (permalink / raw)
  To: Taylan Ulrich Bayırlı/Kammer; +Cc: emacs-devel

> +  :group 'file-dwim)

These :group entries are redundant. It is a (poorly documented)
feature that all defcustoms following a defgroup belong to that
defgroup.

> +;; (defun play-video-file (file)
> +;;   (shell-command (concat "my-video-player " (shell-quote-argument file))))

Why not say that the cdr of an entry in `file-dwim-action-list' can
also be a list like ("command" "arg1" "arg2"), in which case it used
in `start-process' with the file-name at the end?
For instance:

    (add-to-list 'file-dwim-action-list
                 (list (rx "." (or "mp3" "flac" "aac" "wav") eos) "mplayer"))

I think that would be very valuable, as this sounds like the common
use for this package.



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

* Re: [PATCH] Add file-dwim.
  2015-10-18 19:12 ` Artur Malabarba
@ 2015-10-18 19:46   ` Taylan Ulrich Bayırlı/Kammer
  2015-10-18 22:22     ` Artur Malabarba
  0 siblings, 1 reply; 12+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-10-18 19:46 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

Artur Malabarba <bruce.connor.am@gmail.com> writes:

>> +  :group 'file-dwim)
>
> These :group entries are redundant. It is a (poorly documented)
> feature that all defcustoms following a defgroup belong to that
> defgroup.

Thanks, didn't know that.

>> +;; (defun play-video-file (file)
>> +;;   (shell-command (concat "my-video-player " (shell-quote-argument file))))
>
> Why not say that the cdr of an entry in `file-dwim-action-list' can
> also be a list like ("command" "arg1" "arg2"), in which case it used
> in `start-process' with the file-name at the end?
> For instance:
>
>     (add-to-list 'file-dwim-action-list
>                  (list (rx "." (or "mp3" "flac" "aac" "wav") eos) "mplayer"))
>
> I think that would be very valuable, as this sounds like the common
> use for this package.

Hmm, while that's indeed *my* most common use-case, I'm not sure if it
should be baked into the library.

People should be using shell-quasiquote to easily construct shell
commands anyway. ;-) That leaves the freedom to choose between a
synchronous and asynchronous process, whether the output goes into a
buffer, etc..

I guess I could have a cross reference to shell-quasiquote since that
will become an ELPA package too.

Here's an updated patch.


[-- Attachment #2: 0001-Add-file-dwim.patch --]
[-- Type: text/x-diff, Size: 5117 bytes --]

From 210db5bd46496e6c404dfaa590a31cf79a5aef16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Sun, 18 Oct 2015 16:53:51 +0200
Subject: [PATCH 1/2] Add file-dwim.

---
 packages/file-dwim/file-dwim.el | 129 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)
 create mode 100644 packages/file-dwim/file-dwim.el

diff --git a/packages/file-dwim/file-dwim.el b/packages/file-dwim/file-dwim.el
new file mode 100644
index 0000000..9343ce5
--- /dev/null
+++ b/packages/file-dwim/file-dwim.el
@@ -0,0 +1,129 @@
+;;; file-dwim.el --- Do What I Mean for files.
+
+;; Copyright (C) 2015  Free Software Foundation, Inc.
+
+;; Author: Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
+;; Keywords: extensions, files
+;; URL: https://github.com/TaylanUB/file-dwim
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Do any action on a file, according to a dispatch-table.  E.g. specify that
+;; media files should be played, directories opened in Dired, etc..  This could
+;; be bound to RET in Dired, or used to replace `find-file'.
+;;
+;; Example configuration (using `shqq' from the shell-quasiquote package):
+;;
+;; (define-key dired-mode-map (kbd "RET") 'file-dwim-dired)
+;;
+;; (defun file-has-extension (file exts)
+;;   (string-match-p
+;;    (rx-to-string `(: "." (or ,@exts) eos))
+;;    file))
+;;
+;; (defun audio-file-p (file)
+;;   (file-has-extension file '("mp3" "flac" "aac" "wav")))
+;;
+;; (defun video-file-p (file)
+;;   (file-has-extension
+;;    file '("mkv" "mp4" "wmv" "webm" "avi" "mpg" "mov" "flv" "mts")))
+;;
+;; (defun guitarpro-file-p (file)
+;;   (file-has-extension file '("gp3" "gp4")))
+;;
+;; (defun play-audio-file (file)
+;;   (shell-command (shqq (my-audio-player ,file))))
+;;
+;; (defun play-video-file (file)
+;;   (shell-command (shqq (my-video-player ,file))))
+;;
+;; (defun open-guitarpro-file (file)
+;;   (async-shell-command (shqq (tuxguitar ,file))))
+;;
+;; (dolist (entry
+;;          '((audio-file-p . play-audio-file)
+;;            (video-file-p . play-video-file)
+;;            (guitarpro-file-p . open-guitarpro-file)
+;;            ))
+;;   (add-to-list 'file-dwim-action-list entry))
+
+;;; Code:
+
+(eval-when-compile
+  (require 'cl)
+  (declare-function dired-get-file-for-visit "dired.el" ()))
+
+(defgroup file-dwim nil
+  "Do What I Mean for files.")
+
+(defcustom file-dwim-action-list nil
+  "A list of action-specifiers for file-types.
+
+Each entry must be either a cons cell or a unary function.
+
+If it's a cons cell, the car must either be a regexp or a
+predicate, and the cdr an unary function that will be called with
+a FILE argument.
+
+If it's a function, it will be called with a FILE argument and
+should return t to indicate that it matched, and can do its
+action at the same time.
+
+A function-entry could act on a file but return nil anyway to
+allow further actions."
+  :type '(repeat (or (cons (or string function)
+                           function)
+                     function)))
+
+(defcustom file-dwim-default-action 'find-file
+  "The default action for when none of `file-dwim-action-list'
+are applicable."
+  :type 'function)
+
+;;;###autoload
+(defun file-dwim (file)
+  "Act on a file according to `file-dwim-action-list'."
+  (interactive "FFile: ")
+  (cl-block actions
+    (dolist (action file-dwim-action-list)
+      (cond
+       ((consp action)
+        (let ((test (car action))
+              (function (cdr action)))
+          (cond
+           ((stringp test)
+            (when (string-match-p test file)
+              (return-from actions (funcall function file))))
+           ((functionp test)
+            (when (funcall test file)
+              (return-from actions (funcall function file))))
+           (t
+            (error "Bad test in `file-dwim-action-list': %S" action)))))
+       ((functionp action)
+        (if (funcall action file)
+            (return-from actions)))
+       (t
+        (error "Bad action in `file-dwim-action-list': %S" action))))
+    (funcall file-dwim-default-action file)))
+
+;;;###autoload
+(defun file-dwim-dired ()
+  "In Dired, use `file-dwim' on a file"
+  (interactive)
+  (file-dwim (dired-get-file-for-visit)))
+
+(provide 'file-dwim)
+;;; file-dwim.el ends here
-- 
2.5.0


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

* Re: [PATCH] Add file-dwim.
  2015-10-18 19:46   ` Taylan Ulrich Bayırlı/Kammer
@ 2015-10-18 22:22     ` Artur Malabarba
  2015-10-18 22:39       ` Random832
  2015-10-19  8:39       ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 2 replies; 12+ messages in thread
From: Artur Malabarba @ 2015-10-18 22:22 UTC (permalink / raw)
  To: Taylan Ulrich Bayırlı/Kammer; +Cc: emacs-devel

2015-10-18 20:46 GMT+01:00 Taylan Ulrich Bayırlı/Kammer
<taylanbayirli@gmail.com>:
>
> Hmm, while that's indeed *my* most common use-case, I'm not sure if it
> should be baked into the library.

Well, it would be mine too, so that's 100% of our 2 subjects test sample. :-)
And I know I've seen other people implement a sort of
`open-file-externally` command, so I'm sure it's a common need.

> People should be using shell-quasiquote to easily construct shell
> commands anyway. ;-) That leaves the freedom to choose between a
> synchronous and asynchronous process, whether the output goes into a
> buffer, etc..

Actually, people shouldn't use shell-command unless they specifically
need a shell.
If you want an external program, use start-process; if you want it
synchronous, use call-process.



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

* Re: [PATCH] Add file-dwim.
  2015-10-18 22:22     ` Artur Malabarba
@ 2015-10-18 22:39       ` Random832
  2015-10-19  4:44         ` Eli Zaretskii
  2015-10-19  7:49         ` Artur Malabarba
  2015-10-19  8:39       ` Taylan Ulrich Bayırlı/Kammer
  1 sibling, 2 replies; 12+ messages in thread
From: Random832 @ 2015-10-18 22:39 UTC (permalink / raw)
  To: emacs-devel

Artur Malabarba <bruce.connor.am@gmail.com> writes:

> Actually, people shouldn't use shell-command unless they specifically
> need a shell.
> If you want an external program, use start-process; if you want it
> synchronous, use call-process.

Can call-process return the stdout of the process in a string, as
shell-command-to-string does?




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

* Re: [PATCH] Add file-dwim.
  2015-10-18 22:39       ` Random832
@ 2015-10-19  4:44         ` Eli Zaretskii
  2015-10-19  6:00           ` Random832
  2015-10-19  7:49         ` Artur Malabarba
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2015-10-19  4:44 UTC (permalink / raw)
  To: Random832; +Cc: emacs-devel

> From: Random832 <random832@fastmail.com>
> Date: Sun, 18 Oct 2015 18:39:53 -0400
> 
> Artur Malabarba <bruce.connor.am@gmail.com> writes:
> 
> > Actually, people shouldn't use shell-command unless they specifically
> > need a shell.
> > If you want an external program, use start-process; if you want it
> > synchronous, use call-process.
> 
> Can call-process return the stdout of the process in a string, as
> shell-command-to-string does?

Yes, of course.  See its documentation: the output could go into a
buffer, a string, a file, or the null device.



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

* Re: [PATCH] Add file-dwim.
  2015-10-19  4:44         ` Eli Zaretskii
@ 2015-10-19  6:00           ` Random832
  2015-10-19  6:08             ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Random832 @ 2015-10-19  6:00 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:
>> Can call-process return the stdout of the process in a string, as
>> shell-command-to-string does?
>
> Yes, of course.  See its documentation: the output could go into a
> buffer, a string, a file, or the null device.

I looked at the documentation. As far as I can tell, you can specify
where the output goes with the following types of argument:

- A buffer
- A string *which names a buffer*
- t, which selects the current buffer.
- A list which names a file
- nil, which discards the output
- 0, which discards the output and backgrounds the process
- A list that does any of the above with stdout and something else with stderr

Nowhere is a way to get the output *as a string* mentioned. There may or
may not be a perfectly safe and efficient way to use a temporary buffer
or file to get a string, but those aren't being accomplished by the
call-process function itself.




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

* Re: [PATCH] Add file-dwim.
  2015-10-19  6:00           ` Random832
@ 2015-10-19  6:08             ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2015-10-19  6:08 UTC (permalink / raw)
  To: Random832; +Cc: emacs-devel

> From: Random832 <random832@fastmail.com>
> Date: Mon, 19 Oct 2015 02:00:52 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> >> Can call-process return the stdout of the process in a string, as
> >> shell-command-to-string does?
> >
> > Yes, of course.  See its documentation: the output could go into a
> > buffer, a string, a file, or the null device.
> 
> I looked at the documentation. As far as I can tell, you can specify
> where the output goes with the following types of argument:
> 
> - A buffer
> - A string *which names a buffer*
> - t, which selects the current buffer.
> - A list which names a file
> - nil, which discards the output
> - 0, which discards the output and backgrounds the process
> - A list that does any of the above with stdout and something else with stderr
> 
> Nowhere is a way to get the output *as a string* mentioned. There may or
> may not be a perfectly safe and efficient way to use a temporary buffer
> or file to get a string, but those aren't being accomplished by the
> call-process function itself.

You are right, sorry.  However, buffer-string from that temporary
buffer will do the job.



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

* Re: [PATCH] Add file-dwim.
  2015-10-18 22:39       ` Random832
  2015-10-19  4:44         ` Eli Zaretskii
@ 2015-10-19  7:49         ` Artur Malabarba
  1 sibling, 0 replies; 12+ messages in thread
From: Artur Malabarba @ 2015-10-19  7:49 UTC (permalink / raw)
  To: Random832; +Cc: emacs-devel

2015-10-18 23:39 GMT+01:00 Random832 <random832@fastmail.com>:
> Artur Malabarba <bruce.connor.am@gmail.com> writes:
>
>> Actually, people shouldn't use shell-command unless they specifically
>> need a shell.
>> If you want an external program, use start-process; if you want it
>> synchronous, use call-process.
>
> Can call-process return the stdout of the process in a string, as
> shell-command-to-string does?

Yep (like Eli latter suggests):

(with-temp-buffer
  (call-process "ls" nil t)
  (buffer-string))

Sure, it's ok to use shell-process-to-string if you're just hacking
something together for yourself. But in proper distributed code it's
best to start processes directly, which is safer and more robust than
spawning useless shells.



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

* Re: [PATCH] Add file-dwim.
  2015-10-18 22:22     ` Artur Malabarba
  2015-10-18 22:39       ` Random832
@ 2015-10-19  8:39       ` Taylan Ulrich Bayırlı/Kammer
  2015-10-19  9:30         ` Artur Malabarba
  1 sibling, 1 reply; 12+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-10-19  8:39 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: emacs-devel

Artur Malabarba <bruce.connor.am@gmail.com> writes:

> 2015-10-18 20:46 GMT+01:00 Taylan Ulrich Bayırlı/Kammer
> <taylanbayirli@gmail.com>:
>>
>> Hmm, while that's indeed *my* most common use-case, I'm not sure if it
>> should be baked into the library.
>
> Well, it would be mine too, so that's 100% of our 2 subjects test sample. :-)
> And I know I've seen other people implement a sort of
> `open-file-externally` command, so I'm sure it's a common need.

So is this typically called synchronously or asynchronously?

In my *real* config, I actually have exactly one synchronous command
(queue audio file for music player), one asynchronous command (run
tuxguitar), and one command that ends up being opened in an ansi-term
buffer (run mplayer).

I'm guessing that calling the process asynchronously, but ignoring its
output (instead of creating a buffer for it like async-shell-command)
would cover the most use-cases (it would cover the synchronous use-cases
too).  WDYT?

Taylan



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

* Re: [PATCH] Add file-dwim.
  2015-10-19  8:39       ` Taylan Ulrich Bayırlı/Kammer
@ 2015-10-19  9:30         ` Artur Malabarba
  0 siblings, 0 replies; 12+ messages in thread
From: Artur Malabarba @ 2015-10-19  9:30 UTC (permalink / raw)
  To: Taylan Ulrich Bayırlı/Kammer; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

2015-10-19 9:39 GMT+01:00 Taylan Ulrich Bayırlı/Kammer <
taylanbayirli@gmail.com>:
>
> I'm guessing that calling the process asynchronously, but ignoring its
> output (instead of creating a buffer for it like async-shell-command)
> would cover the most use-cases (it would cover the synchronous use-cases
> too).  WDYT?
>
> Taylan
>

I agree.
I think that people who just to open a file with an external program don't
care about stdout and certainly don't want it to be synchronous. If someone
has more special needs than that, then there's really no way to "guess"
what they want, and they should just write a function for it.

[-- Attachment #2: Type: text/html, Size: 1084 bytes --]

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

* Re: [PATCH] Add file-dwim.
  2015-10-18 14:54 [PATCH] Add file-dwim Taylan Ulrich Bayırlı/Kammer
  2015-10-18 19:12 ` Artur Malabarba
@ 2015-10-19 13:32 ` Wolfgang Jenkner
  1 sibling, 0 replies; 12+ messages in thread
From: Wolfgang Jenkner @ 2015-10-19 13:32 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: emacs-devel

On Sun, Oct 18 2015, Taylan Ulrich "Bayırlı/Kammer" wrote:

> +;; Do any action on a file, according to a dispatch-table.  E.g. specify that
> +;; media files should be played, directories opened in Dired, etc..  This could
> +;; be bound to RET in Dired, or used to replace `find-file'.

There's also gnus/gnus-dired.el, which augments the list of entries
found in ~/.mailcap, /etc/mailcap etc. (gathered via mailcap.el) with
entries directly specified in lisp.



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

end of thread, other threads:[~2015-10-19 13:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-18 14:54 [PATCH] Add file-dwim Taylan Ulrich Bayırlı/Kammer
2015-10-18 19:12 ` Artur Malabarba
2015-10-18 19:46   ` Taylan Ulrich Bayırlı/Kammer
2015-10-18 22:22     ` Artur Malabarba
2015-10-18 22:39       ` Random832
2015-10-19  4:44         ` Eli Zaretskii
2015-10-19  6:00           ` Random832
2015-10-19  6:08             ` Eli Zaretskii
2015-10-19  7:49         ` Artur Malabarba
2015-10-19  8:39       ` Taylan Ulrich Bayırlı/Kammer
2015-10-19  9:30         ` Artur Malabarba
2015-10-19 13:32 ` Wolfgang Jenkner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).