Questions tagged [default]
24 questions
12
votes
2 answers
How do i get rid of "default" (last used) string in some emacs functions?
I have the following problem : when i use 'C-x r t' (string-rectangle), i am prompted to enter some string, to replace the selected rectangle. Lets say i type ";;" (to comment out the rectangle). This works just fine, but the next time i call the…

mation
- 121
- 3
8
votes
1 answer
How do i change the default shell for shell-command
I am having an issue with one of the plugins i am running because its trying to use fish and does not like the parameters.
Is there a way i can change emacs to use bash for any plugins that use shell-command or similar functions.
(setenv "SHELL"…

Oly
- 583
- 1
- 5
- 15
6
votes
1 answer
Reusing previous inputs (old or new) for query-replace
Most functions in emacs keep a default option, with the last arguments used. Is it possible to reuse some of the default arguments while changing others?
For example, when using search and replace, a string such as Query replace (default thing1 ->…

user2699
- 2,181
- 16
- 32
6
votes
3 answers
delete-selection-mode not a default?
If you enable Delete Selection mode, a minor mode, then inserting text
while the mark is active causes the selected text to be deleted first.
This also deactivates the mark. Many graphical applications follow
this convention, but Emacs does…

m33lky
- 297
- 3
- 9
5
votes
2 answers
Set a global default directory
I want a "default directory" which is constant across all contexts
(buffers, packages, etc). That is, when working on multiple files,
opening a new terminal, doing anything which requires a starting
directory, I want that starting directory to…

Lorem Ipsum
- 4,327
- 2
- 14
- 35
5
votes
1 answer
What is the proper way to identify a font for .spacemacs file?
Spacemacs isn't finding my Source Code Pro font files, and I think it's a naming issue. I have the fonts installed and in the font cache,
/usr/local/share$ fc-list : file | grep…

Logan S.
- 181
- 1
- 7
4
votes
3 answers
Display path and filename in a minibuffer
Eval this code:
(defun xx-display-filename (filename)
""
(interactive "Ffilename: ")
(message (concat "Filename is: " filename)))
Let's assume that I am editing a ~/.emacs.d/personal/custom.el file in the current buffer.
The function above,…

whysoserious
- 339
- 3
- 9
3
votes
2 answers
Why does Emacs not load the init file when using sudo?
My Emacs init file works fine in general. But, if I am in my home directory and if I execute:
pwd
/home/pedro
sudo emacs /etc/nixos/hosts.nix
For some reason, this opens vanilla Emacs without my init file being loaded. In normal situations,…

Pedro Delfino
- 1,369
- 3
- 13
2
votes
2 answers
Change permanently font size in Aquamacs
I have been looking on the web to the existing answers to this question, but non of them works for me.
I would like to change the default font size for all frames in Aquamacs 3.3 GNU Emacs 25.1.1 (x86_64-apple-darwin14.1.0, NS appkit-1344.72…

James
- 121
- 3
2
votes
3 answers
call write-file interactively with prompting
I have a function that creates a buffer, with a default file name, and would like the first user action for that buffer be a prompt to write the buffer to a file, allowing the user to change the default, but offering the default in the minibuffer…

user1404316
- 769
- 5
- 12
1
vote
2 answers
Make the minibuffer prompt always have a default argument
Is it possible to make the first history item available as the default argument when running commands like eval-expression and goto-line?
I'd like to be able to just press enter to use the previous value.
I started writing a wrapper around goto-line…

Matt
- 15
- 6
1
vote
1 answer
Setting default values on optional arguments
Have set the last three function arguments to optional. When calling the elisp
function in code (rather than interactively), how can I check the optional arguments
fol nil?
When brcmk-end in nil, I do not want the search-forward to occur on…

Dilna
- 1,173
- 3
- 10
1
vote
1 answer
How do you target the present directory, once in a while, with do-what-I-mean enabled?
After setting Dired do-what-I-mean
(setq dired-dwim-target t)
which, quoting the man pages
If non-nil, Dired tries to guess a default target directory. This
means: if there is a Dired buffer displayed in some window, use its
current directory,…

Calaf
- 483
- 3
- 16
1
vote
2 answers
How to wrap lines at window edge
My default line wrapping is 'truncate long lines'.
How can I change it to 'wrap line at window edge' ?

lambda-pumpkin
- 21
- 1
1
vote
0 answers
Two versions of Emacs on MS Windows: change the default "emacs" binding in the MS Windows shell
I have got two versions of Emacs on my Windows 10 laptop: Emacs 25.3.1 (x86_64-w64-mingw32) and Emacs 26.1 (build 1, x86_64-w64-mingw32). I would like the windows shell to run the 26.1 version by default when I type "emacs". At the moment, it runs…

Krzysztofik
- 23
- 5