amno1 / dired-queue

A small experiment to add a queue to Dired buffers to preserve order in which files are marked.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

A small experiment to add a queue to Dired buffers to preserve order in which files are marked.

Install

This is not yet in either Elpa nor Melpa, so currently you will have to either clone this repository or just download raw dired-queue.el somewhere where your Emacs can find it.

Usage

Require dired-queue.el.

To enable/disable dired-queue-mode: M-x dired-queue-mode.

You can also add this to dired-mode-hook to auto enable dired-queue-mode when dired mode is started:

(add-hook ‘dired-mode-hook (lambda () (dired-queue-mode 1)))

To display the queue call M-x dired-queue-display. It will open another dired buffer with only enqueued files in the order they were enqeued.

The queue is stored in buffer-local variable dired-queue as a list of strings. You can also act on it programmatically with ordinary Emacs-lisp routines.

Dired-queue also defines dired-line-up/down functions, which can be used to alternate order of filenames in a Dired buffer bu default bound to M-<up> and M-<down> in dired-queue-mode-map.

Those function can be used to either arrange the order of files before marking and sending them to the queue, or afterwards in the queue buffer.

The queue buffer itself is an ordinary Dired buffer, so all usual Dired operations are allowed there.

Observe that the dired-queue is a buffer-local variable, so the orinial buffer and the queue buffer do not share the same variable and value. It would be possible to sync them, but I haven’t done it.

Problems

This was a ten minutes prototype to test the idea. There are probably lots of unkown problems. If you find some, please let me know, or even better, give me a PR.

License

GPL v3. For details, see the attached license file.

About

A small experiment to add a queue to Dired buffers to preserve order in which files are marked.

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%