Most Popular
1500 questions
10
votes
4 answers
Org-mode: No images to display inline
I am trying to display images in org files. I have used links such as
[[file:~/path/to/image.png]]
When I click on the link, it gives me another buffer in which there are only symbols. When I put the cursor on the link and type C-c C-x C-v, there…

aymenbh
- 101
- 1
- 4
10
votes
2 answers
How to better align tags in Org Mode using variable-width font
I prefer using variable-width fonts in Emacs whenever I can. That said, Org Mode tags are horribly aligned when headings use variable-width fonts, even if the tags themselves use fixed-width fonts. Is it possible to continue using variable-width…

kgo
- 532
- 3
- 15
10
votes
3 answers
How can I defer loading elpy using use-package?
I've been updating all my use-package calls now that :idle is no longer a decent way to defer stuff. At the moment one of the biggest hits on my load time is elpy which loads a whole bunch of additional modules. At the moment my invocation is rather…

stsquad
- 4,626
- 28
- 45
9
votes
2 answers
How do I save a cursor position?
How can I save the cursor position for every file I have opened? So, next time I open the file, the cursor will be at the position I last opened it.

programking
- 7,064
- 9
- 41
- 62
9
votes
2 answers
Interpolate nil argument to `format` as the empty string?
I understand that this is trivial with an if, but is there an option, like %S or %s that interpolates nil as no string at all?
Example:
(format "%?.el" nil) ; ".el"
(format "%?.el" "beginner") ; "beginner.el"

The Unfun Cat
- 2,393
- 16
- 32
9
votes
1 answer
Yasnippet not working with auto-complete-mode
I am just starting to experiment with Yasnippet, and it worked very well until I tried to combine it with auto-complete-mode. The problem is that Auto-Complete is taking over completely. For example, in c-mode I can type pr and then press TAB to…

Håkon Hægland
- 3,608
- 1
- 20
- 51
9
votes
1 answer
Simulating mouse operations with keyboard
Is there a way, via some command that can be invoked by the keyboard, of making Emacs think that I clicked at a particular point (so that it does whatever it would have done if I clicked there, e.g. follow link or pop up a menu)? Or that I hovered…

ShreevatsaR
- 880
- 6
- 19
9
votes
1 answer
Overriding fill-paragraph in LaTeX mode
I would like to change the behavior of fill-paragraph in certain modes (e.g. LaTeX-mode provided by AucTeX).
I could just rebind the key M-q, but I am also using evil-mode whose implementation of evil-fill-and-move uses fill-region. Ideally, my…

Kevin
- 534
- 1
- 5
- 15
9
votes
2 answers
How can I jump to a file and line number from a list in a buffer?
I have a buffer with content like:
src/file4.rs:9
src/file4.rs:33
src/file4.rs:64
I'd like to be able to put my cursor on a line and jump to the appropriate file / line in the other window, just like compilation-mode would. However, this buffer…

Shepmaster
- 267
- 1
- 6
9
votes
3 answers
Get git repo root directory, preferably with magit
How can I get the root directory of the current git repo? I could run shell-command-to-string on something like git rev-parse --show-toplevel. Is there a better way? Does magit or any other git front-end expose this info?

Pradhan
- 2,330
- 14
- 28
9
votes
2 answers
How to overwrite a copied rectangle instead of inserting it (which is the default behavior of yank-rectangle)?
After copying a "rectangle" using C-x r M-w, doing C-x r y yanks or pastes the rectangle. But that inserts the copied rectangle.
How can I paste the copied rectangle so that it overwrites the text?
Example:
a b c d e f g
h i j k▮l m n
o p q r s t…

Kaushal Modi
- 25,203
- 3
- 74
- 179
9
votes
1 answer
Is it possible to have word-wrap as standard but truncate some lines in a buffer at the same time?
I'm working with large LaTeX tables in AucTEX and it would be helpful to display them in truncated lines, like here:
The red marks are the "&" characters which separate the columns of the table. In case of tables with many columns the latex source…

MostlyHarmless
- 1,395
- 2
- 13
- 14
9
votes
6 answers
Selecting text without moving the cursor
I would like to grow a selection without moving point (the cursor) from its location. I know I can always use C-u C-spc to move to the previous location, but I would like to avoid that.
More specifically, I would like to do both of these…

Amelio Vazquez-Reina
- 5,157
- 4
- 32
- 47
9
votes
2 answers
How do I filter kill-ring contents?
Is it possible to prevent kill-ring from storing whitespaces/empty lines? Right now after I do a couple of changes and then go to browse-kill-ring I often see something like this:
-------
-------
merchant_uuid: "some_uuid"
-------
it…

Ignacy Moryc
- 185
- 6
9
votes
2 answers
How can I fill the entire line number bar with a custom background color?
In the screenshot below I have simply set the background of the linum face to some color, however there is a blank region at the end of the buffer and there are gaps between the lines when line wrapping (global-visual-line-mode) is enabled:
…

Lenar Hoyt
- 1,163
- 7
- 25