Most Popular

1500 questions
20
votes
3 answers

How can I find the path to an executable with Emacs Lisp?

My current use case is to find where the Cask executable is (it can be installed in at least two places, and there's an issue open about this). I need to require cask this way: (require 'cask "~/.cask/cask.el") But I need to find the correct path to…
Trevoke
  • 2,375
  • 21
  • 34
20
votes
2 answers

support for regex look behind and ahead?

I need to perform regex query replace, such that foo in foo bar is matched, but foo in foo baz is not. Normally I would use regex look ahead, e.g. foo(?=bar). However, it seems like Emacs cannot do this? Vim seems capable, but evil mode in spacemacs…
Heisenberg
  • 433
  • 4
  • 9
20
votes
1 answer

How can I use eww as a renderer for mu4e?

Emacs 24.4 came with native eww browser. What is the proper way to use eww as a renderer for mu4e messages?
aholub7x
  • 303
  • 2
  • 5
20
votes
2 answers

Save current file with a slightly different name

My files have long filenames and a part of the filename is a date and a version number. Often I'd like to save the file in the buffer using nearly the same name, just change version number or date. This would be much easier, if I had a command…
Keks Dose
  • 508
  • 4
  • 19
20
votes
3 answers

Can I have two views on a file - one narrowed one not?

I am editing some file, abc.org, and call org-narrow-to-block to narrow to a code block that I want to edit. For the editing process I have to access another part of abc.org and just want to show it in another window. So I do "C-x 2" and find that…
Matthias
  • 745
  • 3
  • 14
20
votes
6 answers

Way to hide SRC block delimiters

is there a way to keep only source code inside source code, that is make #+BEGIN_SRC and #+END_SRC invisible? It's cosmetic but it makes things clearer when one have to deal with a lot of short code snippets. For exemple: (defun org-xor (a b) …
loukios
  • 815
  • 1
  • 8
  • 19
20
votes
2 answers

How can I set directory local variable in relative to .dir-locals.el file location?

I often find myself in the situation where I'm told to put absolute paths as directory local variable. For example cmake-ide's cmake-ide-project-dir and cmake-ide-build-dir. Of course this is not very portable. So instead of .dir-locals.el: ((nil .…
Flow
  • 564
  • 6
  • 17
20
votes
3 answers

Is there a way to change color of active window's fringe?

To better distinguish between focused window and rest that are not I would love to change this window's fringe color. Discovering customize with fringe keyword I found only how to change its bg color without ability to set different colors for…
sandric
  • 1,221
  • 9
  • 19
20
votes
1 answer

how to prevent faces from bleeding onto surrounding areas of buffer?

Q: How do I keep org-mode link faces from bleeding over into the ... selective display characters at the end of a folded header? This is a visual tick that drives me a little nutty. When, in org-mode, a link is the very last thing on a line, the…
Dan
  • 32,584
  • 6
  • 98
  • 168
20
votes
3 answers

Track "TODO" items when writing code

Is there an easy way to create a list of "to-do" items on-the-fly when writing code? For example, suppose that I am writing a function write-this-now when I realize that I am also going to need to write a support function write-this-later. (defun…
nispio
  • 8,175
  • 2
  • 35
  • 73
20
votes
1 answer

I want to have the tags for my blog written in org-mode

I write and publish my blog with org-mode and org-page. The thing is that I want to write about Emacs and, I would like to have the keystrokes highlighted as Stack Exchange does with the tag. Getting this: C-x C-f instead of something else! In…
shackra
  • 2,702
  • 18
  • 47
20
votes
2 answers

What options are there for doing spell-checking in emacs

Because I'm currently doing a lot of non-programming tasks in Emacs, spell-checking became one of my major concerns once again. I noticed that there is no question related to the options for spell-checking in Emacs yet, so here we go: What are my…
elemakil
  • 2,517
  • 1
  • 18
  • 26
20
votes
2 answers

Spell check with multiple dictionaries

How can I use multiple dictionaries with the Emacs spell checker? Specifically I want to use a British English dictionary and a medical English dictionary at the same time.
Divinenephron
  • 519
  • 3
  • 11
20
votes
8 answers

How can I have the latest version of emacs always

I love using Emacs and I want to have the latest version of Emacs always. But on my Ubuntu machine Emacs won't be upgraded automatically during the regular software updates. Even when I run sudo apt-get upgrade emacs it says I have the latest Emacs…
samsri
  • 331
  • 1
  • 2
  • 8
20
votes
1 answer

How to automatically create neat C comment blocks while typing?

Some code editors such as eclipse automatically form neat blocks when you start typing a multi-line comment: Is there some package or another way to do this in emacs too? Edit: To clarify: I do not want a key-combination that inserts a comment…
Geier
  • 692
  • 5
  • 15