Most Popular

1500 questions
10
votes
4 answers

Deep copy a string in Elisp?

I have a propertized string. I want to make a deep copy of it to add more properties, while preserving the properties in the original string. How can I do that (easily)? Example Evaluate one-by-one : (setq test-str-1 #(";; This `is' a test" …
abo-abo
  • 14,113
  • 1
  • 30
  • 43
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
  • 16
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,651
  • 29
  • 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,194
  • 10
  • 42
  • 63
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,413
  • 17
  • 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,648
  • 1
  • 22
  • 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
  • 576
  • 1
  • 5
  • 16
9
votes
4 answers

How can I visualize VCS status in dired?

I'm particularly concerned with git, but I imagine this is a good place to use vc. I want to emulate Atom's git integration with its file explorer: How can I get something like this in dired? I understand there are other tools for simulating a…
Sean Allred
  • 6,921
  • 18
  • 86
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
1 answer

How to install a package manually

I would like to install the projectile package manually since the repository is blocked by a firewall. I have downloaded the file projectile.el from the [package homepage][1] put it together with helm-projectile and helm-projectile into the folder…
Beginner
  • 2,711
  • 3
  • 18
  • 25
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,370
  • 15
  • 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,651
  • 4
  • 80
  • 183
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
1 2 3
99
100