Most Popular
1500 questions
22
votes
2 answers
Is there a mode to automatically update copyright years in files?
Usually around this time of year people start to realize that their copyright year is out of date in their files. This is particularly annoying if you like to put the copyright in every source file. I was wondering if emacs could help here.
Is there…

asmeurer
- 1,552
- 12
- 30
22
votes
3 answers
emacs on terminal does not recognise option as alt-key on mac
I am on a mac and I am running emacs 24.4.1, but I have the same problem also with 22.1.1. When I open mac on a terminal on the remote host, it does not recognise option key (alt) like the meta key. I have modified the .emacs in the following…

simona
- 403
- 2
- 4
- 7
22
votes
1 answer
Get content of a buffer
So buffer-string gets the content of the current buffer. But it doesn't allow specifying other buffers.
How can I get around that? Do I need something like save-window-excursion to make it work?

Maciej Goszczycki
- 1,777
- 13
- 18
22
votes
4 answers
How to input special character, such as Celsius symbol, and common greek letters?
I want to input:
Celsius degree symbol
Common Greek letter: Alpha, Theta, Omega

Nick
- 4,423
- 4
- 24
- 41
22
votes
4 answers
Are there color pickers for Emacs?
I use the excellent rainbow-mode to highlight colors in CSS files.
However, this assumes I know what color I want. Are there any color pickers that I can use for CSS editing inside Emacs? Ideally, I'd really like something where I can make colors…

Wilfred Hughes
- 6,890
- 2
- 29
- 59
22
votes
1 answer
What steps are necessary to start contributing to Emacs proper?
Now that Emacs is maintained in a git repository (AFAIK), this opens the door (at least for me) to intelligently explore Emacs as a F/OSS project to contribute to :)
Trouble is, I have no idea how to start doing so. CONTRIBUTING instructs the…

Sean Allred
- 6,861
- 16
- 85
22
votes
2 answers
How can I improve startup time despite many packages?
TL;DR I have such a huge amount of packages that it's hurting my startup time. If you don't believe that could be the case, read on.
My Emacs startup time is quite small. I don't use use-package, I just set tons of hooks and autoloads so that…

GDP2
- 1,340
- 9
- 25
22
votes
3 answers
A faster method to obtain `line-number-at-pos` in large buffers
The function line-number-at-pos (when repeated about 50 times) is causing a noticeable slow-down in semi-large buffers -- e.g., 50,000 lines -- when point is near the end of the buffer. By slow-down, I mean a combined total of about 1.35…

lawlist
- 18,826
- 5
- 37
- 118
22
votes
4 answers
How to change indent size for typescript layer in Spacemacs?
I have a tsfmt.json file with
{
"indentSize": 2,
"tabSize": 2
}
which does get picked up appropriately by tide when running M-x tide-format.
But when I start a new line by pressing RET or 'o', it gets indented 4 spaces. How do I change…

agentofuser
- 501
- 3
- 11
22
votes
7 answers
how install emacs 26 (or whatever latest ver) on mac
Someone (in another SE answer) mentioned a feature thats only available in 26,
so I guess now I gotta upgrade.
How do you install emacs 26 on macOS Sierra?
What I tried:
Googled how install emacs 26 Mac,
brew install emacs.

american-ninja-warrior
- 3,773
- 2
- 21
- 40
22
votes
2 answers
How to check if a directory exists in elisp?
I've seen how to check if a file exists (file-exists-p), but how to check if a directory exists?

ideasman42
- 8,375
- 1
- 28
- 105
22
votes
4 answers
Put all backups into one backup folder
How can I set up Emacs so that all backups are placed into one backup folder? e.g. /MyEmacsBackups

programking
- 7,064
- 9
- 41
- 62
22
votes
2 answers
How to concatenate two lists?
Sorry, but elisp is not my best.
I need to combine two lists of strings in this way:
("a" "b" "c") + ("d" "e" "f") -> ("a" "b" "c" "d" "e" "f")
Well, the order is not important, so I wrote this code:
(while lista
(add-to-list 'listb (car lista))…

Daniele
- 637
- 1
- 5
- 14
22
votes
7 answers
How do I patch an Emacs package?
I wish to alter a package, test it and hopefully submit a pull request afterwards. How do I do it in a safe and efficient way? The question might feel too broad, I will accept the answer that covers the following issues:
I'd expect to install a…

akater
- 321
- 2
- 5
22
votes
1 answer
What's the difference between setq and defvar
What is the difference between setq and defvar in Emacs lisp?
I see common lisp version of the same question at https://stackoverflow.com/questions/3855862. Are they same in Elisp?

Yasushi Shoji
- 2,151
- 15
- 35