Most Popular
1500 questions
11
votes
1 answer
How to sort file list in helm-find-files
When I use helm-find-files to search for a directory. I would like it to display exact matches and directories first in the list of candidates, followed by files.
For example, searching for "src" gives the following results:
How can I make "src"…

Lee H
- 2,697
- 1
- 16
- 31
11
votes
1 answer
Getting started `use-package` question
I was reading the use-package documentation, which says, "Here is the simplest use-package declaration:"
;; This is only needed once, near the top of the file
(eval-when-compile
;; Following line is not needed if use-package.el is in ~/.emacs.d
…

SparedWhisle
- 569
- 3
- 13
11
votes
1 answer
Disable minor mode in all open buffers
Often I have many buffers open and, for whatever reason, I no longer wish to use a particular minor mode with them. Is there currently a built-in way to disable a particular minor mode for all open buffers, or does this require writing a custom…

holocronweaver
- 1,319
- 10
- 22
11
votes
1 answer
How to rename a file with dired with the current file name as default?
In the macOS Finder, I can rename a file or directory by pressing RET and the current value becomes the default for the new file name. This helps if I make a small change, such as adding a date at the beginning of the filename.
In Emacs with dired,…

miguelmorin
- 1,751
- 11
- 33
11
votes
1 answer
How to have org-publish automatically publish generated images?
I use org-publish to publish HTML exports of org-mode files quite often to share documents with my coworkers, however, I generate a lot of diagrams with plantuml and gnuplot. These diagrams aren't sent to the remote server when I export the file…

Lee H
- 2,697
- 1
- 16
- 31
11
votes
3 answers
Function to merge two property lists?
I have not found a standard Elisp library function to merge two property lists, like this:
(setq pl nil)
(setq pl (plist-put pl 'key-1 'value-1))
(setq pl (plist-put pl 'key-2 'value-2))
I could build something with dolist, but before I do, I would…

David J.
- 1,809
- 1
- 13
- 23
11
votes
1 answer
How is the variable scoping for macros determined?
Take the following example macro, defined in macro.el.
(defmacro some-macro (&rest body)
`(let ((some-variable 1))
,@body))
And take the following function, defined in a different file, function.el.
(defun some-function ()
(some-macro…

Malabarba
- 22,878
- 6
- 78
- 163
11
votes
2 answers
How to break out of a dolist loop?
Is it possible to break out of a dolist loop? if not, are there alternatives to dolist that don't involve a while loop and indexing a list?

ideasman42
- 8,375
- 1
- 28
- 105
11
votes
2 answers
Dired as an FTP client
I don't know whether this is possible or not.
I know I can edit remote files, but what I am looking for is a setup like this:
one buffer with dired on my local directory
one buffer with dired on the remote directory
Sort of a visual aid when…

Boccaperta-IT
- 1,556
- 11
- 24
11
votes
1 answer
How to diff one file against another branch with Magit
I want to see the differences of a file in another branch. With git I can simply do: git diff otherbranch: path-to-file.
In magit this seems trickier as the file may not be dirty and not showing up in magit-status. I have been looking in the manual…

dr jerry
- 321
- 1
- 7
11
votes
3 answers
Removing the last element of a list
Is there a simpler way to remove the last element of a list than this?
(setq list (reverse (cdr (reverse list))))

Toothrot
- 3,204
- 1
- 12
- 30
11
votes
2 answers
custom-theme-set-faces does not work in emacs 27
I have some custom theme settings like
(package-initialize)
(load-theme 'leuven t)
(custom-theme-set-faces
'leuven
'(Man-overstrike ((t (:foreground "red3" :bold t))) t)
'(Man-underline ((t (:foreground "green3" :underline t))))
;; ...…

Saddle Point
- 481
- 7
- 23
11
votes
3 answers
What is the difference between refill-mode and auto-fill-mode?
I tried to read the documentation, but in practice, I could not tell the difference. I feel they are doing the same thing. I can turn both modes on, but I am not sure in what circumstance I need to do so.

Tianyi
- 111
- 3
11
votes
1 answer
How to expand external files inline on orgmode?
I know I can use something like #+INCLUDE: "./filepath" but this has effect only when I export the file. I can also use link like [[./filepath]] but I have to type C-c C-o to go to the content.
How to automatically expand this include or this link…

Felipe
- 241
- 1
- 13
11
votes
1 answer
what is the `A-` binding?
On Emacs, if I type C-h, b a list of keybinds come up, including:
what is A- and how do I access it?

zcaudate
- 637
- 4
- 14