# All Questions

22,875 questions
Filter by
Sorted by
Tagged with
465 views

### How do I create a simple syntax table for a major mode?

I'm trying to understand how syntax tables work, but my minimal major mode doesn't highlight anything. I've written the following elisp, which is just supposed to highlight comments: (defconst my-...
1k views

### Run ssh-add from Emacs and enter a passphrase

I want to call the ssh-add shell command. So I invoke M-x shell-command RET, and in the minibuffer, I type: ssh-add .ssh/id_rsa The only thing I get is: ssh_askpass: exec(/usr/bin/ssh-askpass): No ...
1k views

### Aligning multi-lined equations and tables in latex-mode

Let's say I'm editing a latex in Auctex's latex-mode, and I have the following equation. This is just indented with indent-region. \begin{align} \phi & = a + b + c + d \\ & = a + ...
29k views

### How to proceed on package.el signature check failure

I just tried to install ascii-art-to-unicode from the gnu repository (http://elpa.gnu.org/) via list-packages. I get the following error: package--check-signature: Failed to verify signature ...
1k views

### How can I draw in unicode with artist-mode?

I'd like to produce unicode art with artist-mode. But it appears that artist-mode only supports ASCII art. How can I configure artist-mode to produce instead of +---------------+ | ...
133 views

### Speed up TeX-insert-macro on \input

In latex-mode when I use TeX-insert-macro to type a \input{...} macro, Auctex conveniently offers filename completion, which is great. However, it seems to search a lot of places to compile the ...
329 views

### Is it possible to sort dired tabs in tab bar-mode by directory structure?

I am using tabbar-mode and I love it. I have only one thing which is irritating me: the sorting order of tabs of fired windows. As in other modes, they seem to be sorted by time opened. But in case ...
2k views

### How to bind C-i as different from TAB?

I want to make Control-i perform indent-region (basically since Xcode has built that muscle memory already). I realise that Control-i and tab are indistinguishable in the Ascii sense, but they are in ...
740 views

### Proper TERM type for eshell

Is there a way to make eshell behave better? By default printenv TERM returns dumb. For example brew often complains about the terminal type and causes eshell to "jiggle" while the progress bar is ...
3k views

### How can I preview TeX formulas inline in arbitrary modes?

How can I get TeX previews inside modes other than AUCTeX or org-mode? I'd love to see TeX equations in jabber, erc and markdown. If I ever switch to Emacs for email, I'd presumably like to see ...
4k views

### Is there a way to use query-replace from grep/ack/ag output modes?

I'm aware of find-grep-dired, marking the corresponding files and then pressing Q to run dired-do-query-replace-regexp on the marked files. Unfortunately that requires restarting the grep and no ...
780 views

### How to find out what a key sequence really does

From time to time I observe unexpected behavior when editing text. My first recourse is usually to use C-h k to find out what functions are being called by a given key sequence. However, sometimes ...
86 views

### Why is my function not identifying the end of the region correctly?

I have the following function, adapted slightly from here: ;; Insert text around a region. In this case, it's ;; the LaTeX code environment from the listings package (defun wrap-code (start end) "...
6k views

### Close all dired buffers

Sometimes my buffer list has 10+ dired windows, and I end up using buffer-menu to manually mark and kill all of them. Is there a faster way to close all open dired windows?
7k views

### Can I avoid outdated byte-compiled elisp files?

Occasionally, when I start Emacs, I get a message like. Source file /home/USER/.emacs.d/elpa/....el' newer than byte-compiled file Also, I sometimes edit a package I'm developing and forget to ...
133 views

### fill-paragraph marks file as changed, even if it didn't do anything

Whenever I call fill-paragraph, the buffer is always marked as modified, even if the command had no effect (i.e. if the paragraph was already filled). It also creates an empty undoable action (easily ...
3k views

### Magit on Windows: "searching for program: permission denied, git"

I installed Magit on Windows, but every time I use it, it give me the error: searching for program: permission denied, git even though I already installed the git software on windows. (it seems ...
1k views

### controlling display of latex equations in org-mode

By default org-mode will overlap images of the latex equations for a given section, or for the whole document. If I press C-c C-c on an equation with an image overlay, all the images are removed. Can ...
93k views

### How do I reload a file in a buffer?

I usually work on files which are updated in the file system via version control. What's a quick way to reload a file without having to C-x C-f the file again and getting asked if I want to reload it?
677 views

### Prevent whitespace-mode from overzealously highlighting blank lines at end

When using Whitespace Mode with the empty style enabled, the blank lines at the end of a file aren't highlighted if I'm on the very last line. However, I also don't want them to be highlighted if I'm ...
324 views

### Configuring Emacs and especially undo-tree-mode for tiling window managers

I want to use Emacs in a frame-oriented fashion and let my tiling window manager handle buffer organization. For example, following this tutorial. By default, Emacs packages such as undo-tree-mode ...
1k views

I am using BBDB3 with Gnus. I want to make BBDB to update the recipient address in its database for each mail I send (just like Gmail does). Is it possible?
962 views

### Emacs function to convert an arbitrary ORG PROPERTY into an arbitrary string (namely, a LaTeX label)?

I have many documents as org-files which have a CUSTOM_LABEL property, like * Introduction :PROPERTIES: :CUSTOM_LABEL: AP 1 :END: In this case, the files need to be exported as LaTeX, ...
38k views

### How can I get a ruler at column 80?

As a programmer, I want to see a ruler at a specific column (usually 80), both so I see when I cross that column, but also to see how close I am getting to it so I can reformat my code early. The ...
6k views

### Set up Emacs on Windows to start a single instance and open files in the existing instance

I am particularly interested in the full Windows experience including: Automatically starting a server if one is not already started How to call emacs so that it utilizes the server (e.g. from ...
384 views

### What are some built-in packages with nice source code? [closed]

I'm trying to get familiar with Emacs Lisp, its syntax, data structures etc, so I was wondering what are some built-in packages whose source could help me better understand how to use the language and ...
608 views

### Stop dired opening second window of already open directory

When I open a directory using dired and there is already the same directory opened in dired, a second one is opened with <2>. How can I inhibit this creation of the duplicate window and switch ...
9k views

### Emacsdaemon and Emacsclient on Mac

OS: OS X 10.9.5, Mavericks GNU Emacs 24.3.1 (x86_64-apple-darwin13.1.0, Carbon Version 1.6.0 AppKit 1265.19) of 2014-04-03 on Rainers-MacBook-Pro-3.local I installed emacs via homebrew from ...
362 views

### In dired buffers, place point on the most important file of that directory

90% of the time I visit a directory in Emacs, the first thing I do is move point to a specific file and open it. A lot of times, the file I need to open is very predictable. For instance: If there ...
2k views

### How can I use Gnus to access Gmail IMAP through http(s) firefwall?

My company's firewall only allow http and https connections. To access internet, I have to specify the proxy before connecting the internet: export http_proxy=http://my-company.com export ...
254 views

### Why does ERC add  to my nickname

Weirdly when I try to log onto freenode using ERC, a  is added to my nickname, which results in the name not being found on the server. I get the following output in the Messages buffer - I have ...
1k views

### Is there a mode for viewing keystroke lossage in realtime?

C-h l shows the lossage help buffer, which shows recent keystrokes. Pressing g appears to revert it, causing it to update. Unfortunately, enabling auto-revert-mode does not change it to update ...
980 views

### Per Frame Buffers

How to make buffers accessible only from one frame(window) and not accessible from another and vice versa? So I want to have each frame with its own buffers. I'm on OS X.
1k views

### Actionable code folding in Emacs fringe

I would like to configure my Emacs fringe to show code folding sections. For example, BBEdit on the Mac would show the following when editing a JSON file: The marks themselves are actionable: ...
640 views

### How do I disable ffap (find file at point) when the first two non-space characters in a line are '//'?

In Verilog/C/C++, comments can begin with //. Here's an example comment, //This is a comment I like to use the find-file-at-point feature. If my cursor is on the file name in include "some_file.v"....
16k views

I see a lot of people (extension authors and others) give configuration examples with setq: (setq foo 'bar) These parameters are often defined with defcustom, making them available for customization ...
1k views

### How can I create an Org link for each email sent by mu4e?

I'm using org-mode and mu4e. I'd like to have each email become the active link so that I can link to it in Org. When viewing an email, I can C-c C-l (bound to (org-store-link)) to make a link to it, ...
603 views

### 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 ...
294 views

### List of GNU Emacs enhancement requests, bugs, and milestones at any given time

In GitHub one can often find, for a given open-source project, the list of issues that have been reported and the estimated time-horizon that is considered for a given fix or enhancement. Is there an ...
2k views

### How to sometimes but not always add a note to an Org TODO state change?

I have this in an Org mode projects file: #+TODO: TODO(t!) WAITING(w!) DONE(d!) CANCELED(c@) When I move something from TODO to WAITING, it adds a timestamp without asking for a note. That's fine 8 ...
578 views

### How do I search Info for help on a given keyword or function?

Occasionally looking up a function with C-h f will cross reference to an Info node in the manual, but that is pretty rare. I often want a way to jump from the help documentation on a given function to ...
551 views

### 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? ...
411 views

### Predictive mode, Auctex not playing nicely

I have predictive, auctex installed. I want predictive mode to work with my .tex files but I keep getting a warning of: Warning (emacs): Predictive major-mode setup function predictive-setup-latex ...
988 views

### How can I quickly toggle between a file and a *scratch* buffer having the same major mode?

At times while working on a code, it's useful to quickly open a *scratch* buffer to paste a snippet from that code file. If I am working on a Perl script, I would like to quickly open a *scratch* ...
1k views

### Exporting beamer with org-mode

How do I generate a beamer presentation from an org-mode file? What beamer features can I use in my file?
130 views

### How to convert a series of lines into a working HTML list?

Right now, this is a task I find a lot easier in something like gedit, because I can just replace "\n" (the line break) with "</li>\n<li>" and then I have a list. One of the few little ...
5k views

### How to save a keyboard macro as a Lisp function?

Very frequently I would need to perform the set of steps requiring multiple key strokes. For the same session those steps can be recorded in a keyboard macro. An example is saving a frequently ...
838 views

### How can I test and use a Perl regular expression interactively?

Say I have a buffer with text. I would like to test a regular expression (ideally Perl type) against my buffer and have Emacs highlight the matches on it. For example, the following regexp (taken ...