Questions tagged [default]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
47 views

Emacs default directory

I have the following statement in two installations of emacs (setq default-directory "~/.emacs.d/") followed by (load-file "keyboard.el") One installation finds the file, the ...
balanga's user avatar
  • 125
0 votes
2 answers
72 views

How to make optional parameters default to true?

In the question Optional parameter defaults, the suggested way to set default value for the parameter of an elisp function is along the lines of: (defun my-command (a &optional b) (command-...
tinlyx's user avatar
  • 1,334
1 vote
2 answers
155 views

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 ...
Matt's user avatar
  • 15
3 votes
2 answers
748 views

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 ...
Pedro Delfino's user avatar
1 vote
1 answer
95 views

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 ...
Dilna's user avatar
  • 1
1 vote
1 answer
109 views

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 ...
Calaf's user avatar
  • 483
0 votes
1 answer
33 views

is there a shortcut to re-type the original filename and then edit it, when at the dired copy (C) minibuffer prompt

While in a dired buffer, after pressing C to copy a file, often the new filename you want is actually a variation of the original file name. Is there a easy way to get original file name in to the ...
american-ninja-warrior's user avatar
1 vote
2 answers
1k views

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's user avatar
1 vote
0 answers
48 views

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 ...
Krzysztofik's user avatar
1 vote
1 answer
348 views

setq in init file not overriding the default for indent-tabs-mode

It works when using setq-default in place of setq or when customizing through C-h v. C-h v reports that it is set in 'C source code'. I was thinking it might be affected by my c-default-style, but my ...
mcp's user avatar
  • 546
0 votes
0 answers
1k views

Cannot set default theme. Dark theme even if loaded without .emacs and without .emacs.d

When I load emacs without any configuration I see a dark theme: There is no way for me to get back to the default theme. I tried the following: M-x disable-theme: no theme is enabled M-x ...
michael.t's user avatar
  • 101
2 votes
2 answers
1k views

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 (...
James's user avatar
  • 121
5 votes
2 answers
2k views

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 ...
Lorem Ipsum's user avatar
  • 4,447
2 votes
3 answers
317 views

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 ...
user1404316's user avatar
1 vote
1 answer
89 views

Switch back to default font on widening

Running emacs 25.2.2 on Kubuntu 17.10. I have an Org mode file that is mostly in English but certain headlines contain text in Devanagari. From Options -> Set Default Font, I have chosen Hack 13 ...
deshmukh's user avatar
  • 1,912
0 votes
1 answer
175 views

File encoding differet when visiting the file again

I have this in my .emacs: (setq-default buffer-file-coding-system 'utf-8-unix) When I create a file in emacs and save it, it should be buffered and saved in utf-8-unix. When I open such a file ...
 bersama's user avatar
4 votes
3 answers
2k views

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 ...
whysoserious's user avatar
1 vote
1 answer
1k views

setup shell to default eshell

I am new to Spacemacs and eshell. I try to open eshell via the default shortcut key SPC ' but it opens the bash shell: [wolfv@localhost ~] $ message "hello" bash: message: command not found... I ...
wolfv's user avatar
  • 1,393
5 votes
1 answer
4k views

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 source Returns: /...
Logan S.'s user avatar
  • 181
6 votes
3 answers
2k views

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 ...
m33lky's user avatar
  • 297
8 votes
2 answers
11k views

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-...
Oly's user avatar
  • 593
0 votes
1 answer
159 views

How Do I Adjust Indentation Style For Multi-Line Lists?

The default indentation style in emacs for a multi-line list is as follows: longFunctionName(arg1, arg2, arg3, arg4) where the final argument snaps to the starting position of the ...
A. Fletcher's user avatar
12 votes
2 answers
557 views

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 ...
mation's user avatar
  • 121
6 votes
1 answer
569 views

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 ...
user2699's user avatar
  • 2,231