Linked Questions

28
votes
2answers
5k views

What's the difference between a buffer, a file, a window, and a frame?

When posing questions on this site, people sometimes talk about "windows" when they mean "frames," and "buffers" or "files" when they mean "windows." So: Q: What is the difference between a buffer, ...
14
votes
2answers
2k views

How can I prevent a command from using specific windows?

Typically, I have a frame split into four windows, where two at the bottom are dedicated to my *compilation* and *grep* buffers. When browsing compilation errors, next-error will eventually replace my ...
6
votes
2answers
190 views

How to move point to new window, within a function?

I'm trying to write a simple function to divide the Emacs frame into four quadrants. Once I get the splitting to work, each window will have Dired for a different directory. The splitting isn't ...
5
votes
2answers
331 views

Searching all installed mode maps for a specific keybinding

When deciding on which keybinding I want for a specific command, it would be very nice to know if any of my installed mode maps (global, major and minor) have already used this keybinding for some ...
4
votes
2answers
357 views

Bind `C-x 8 l` to typing lambda (λ)

When I try to do this: (global-set-key (kbd "C-x 8 l") (lambda () (insert "λ"))) It just doesn't work: Wrong type argument: commandp (lambda nil (insert "λ")) Does anyone know a decent way to do ...
1
vote
2answers
233 views

What does the (interactive …) form mean?

I want to write a function that will write the output of wc -l <file-name> next to each file in dired mode. I got to this point: (defun my-dired-insert-add-wc (beg end) (save-excursion (...
12
votes
1answer
932 views

Why can't I bind my function to a key or call it with M-x?

I wrote a function, and I want to call it via M-x, and bind it to a key. This is my function: (defun my-function () (message "This is a great function")) If I try to call it with M-x my-function,...
10
votes
1answer
1k views

How to right align region and/or line?

We can center text with M-x center-region and M-o M-s. Is there something similar for right-alignment? Example before: Item 0: value | Item 100:...
8
votes
1answer
3k views

Evil cursor change by state

Until today, when I was in the normal state in evil, the cursor was a block, and it would switch to an I-beam when in insert state. Something changed, however, and the cursor is now always the I-beam....
5
votes
1answer
3k views

Wrong number of arguments on lambda key binding

I am not able to figure out what is wrong in this elisp form: (define-key ggtags-mode-map (kbd "M-.") (lambda () (interactive) (ggtags-find-tag-dwim) (recenter))) I keep getting this ...
3
votes
1answer
1k views

What is the difference between reftex-citation and org-reftex-citation?

What is the difference between reftex-citation and org-reftex-citation? And where can I find the documentation for org-reftex-citation referenced in this answer? [1] Emacs manual: Creating citations
2
votes
1answer
161 views

buffer-file-name is a function, so why doesn't M-x buffer-file-name work? [duplicate]

When trying to run it I get M-x buffer-file-name [No match] But it has a function help entry via C-h f and I can evaluate it with M-: buffer-file-name. So why isn't it accessible via M-x?
1
vote
1answer
108 views

Moving CLOCK entries from one header to another?

Suppose we have two entries: Header One and Header Two: * Header One :PROPERTIES: :ID_LOG: TARGET :END: :LOGBOOK: CLOCK: [2018-07-04 Wed 00:00]--[2018-07-04 Wed 0:30] => 0:30 :END: * Header Two :...
0
votes
1answer
84 views

Why can't I bind tab to multiple spaces? [duplicate]

I'm trying to bind tab to either a tab or multiple spaces in Latex/ESS-noweb mode but I can't get it to work. I tried (local-set-key (kbd "<tab>") 'self-insert-command) which didn't work, and ...
0
votes
0answers
235 views

Bind a key to a lambda: what am I doing wrong? [duplicate]

I'm reading about some concepts of Emacs Lisp. The lambda's seems interesting to me. After reading the manuals about lambda's in Emacs Lisp, I decided to play with it. For example, I have this ...