All Questions

41
votes
1answer
2k views

How is the GNU Emacs source code organized?

How is the source code of GNU Emacs organized? What are the main modules and their functionality? Where can I find an official, up-to-date description of the architecture and its source code?
23
votes
3answers
3k views

How can I run an async process in the background without popping up a buffer?

I have defined some functions to run async background process using async-shell-command in my .emacs, but everytime I run the commands a new window (not frame) is created and the process' buffer is ...
61
votes
8answers
4k views

What should/shouldn't I do when keeping .emacs and .emacs.d in version control?

Like many people, I manage a lot of my dotfiles via a version control repository (Mercurial on Bitbucket, private, in my case). This is handy when setting up a new machine or propagating ...
3
votes
1answer
79 views

What is catdvi used for in AucTeX?

In Ubuntu, AucTeX has an addon called catdvi. What is its use by AucTeX? Some other questions I have include: How can I invoke catdvi in my gnome-terminal? C-c C-c will invoke a GUI viewer. For TeX-...
9
votes
2answers
2k views

How to call pdflatex under TeX-PDF-mode?

I am already in TeX-PDF-mode. When C-c C-c and type in pdflatex, it doesn't run. How can I run pdflatex in TeX-PDF-mode? Note: I don't change my emacs configuration file. Thanks.
22
votes
1answer
4k views

Synchronized scrolling in two windows

Is there a way to reflect the navigation commands in the current window in another visible window. I have two related LaTeX files displayed in two windows and would like to scroll through them ...
20
votes
2answers
3k views

Command that formats (prettifies) Elisp code

Let's say I have a function that looks like the following (as is often the case when printing elisp output). (defun my-example-function () (let ((a (do-something)) (b (do-something))) (setq someone ...
87
votes
4answers
33k views

How do I get a fancier mode line that uses solid colors and triangles?

People occasionally post screenshots with modelines that have solid colors and triangles: How do I replicate this effect?
25
votes
5answers
15k views

How do I display line numbers in emacs (not in the mode line)?

I know how to display line numbers (and columns) in the mode-line, but I'd like emacs to display the line numbers for all the lines on the left-hand side. I've seen this done in vim and other text ...
19
votes
7answers
1k views

Dired “quick-view” key to preview the file at point

I would like to create a function that does a "quick view" of a file the is under point in dired. The way that I would like for this to work is that I hold down a function key, which then makes the ...
96
votes
4answers
39k views

What is the difference between Aquamacs and other Mac versions of Emacs?

Macintosh users have several choices of pre-built Emacs. I am aware of the following versions: YAMAMOTO Mitsuharu's version David Caldwell's version Vincent Goulet's version David Reitter's Aquamacs ...
118
votes
4answers
15k views

What are the practical differences between the various Emacs Package Repositories?

I notice that there are several different repositories that often contain the same software. Why would I want to prefer: GNU ELPA Marmalade MELPA over the others? Since any one repository does not ...
25
votes
4answers
2k views

How to auto-save buffers when Emacs loses focus?

I recently had a Sublime Text user try out Emacs for a while, and he was interested in getting the same auto-save behavior in Emacs. Basically, he wanted all buffers to be saved whenever the frame ...
9
votes
2answers
259 views

How can I download a web page's source from Emacs?

I want to use Emacs as an enhanced way to view the source of a page (say http://example.com). Is there some easy way to download the page directly from Emacs, maybe even through C-x C-f? I remember ...
9
votes
2answers
569 views

Override `show-trailing-whitespace` in `diff-mode`

I have show-trailing-whitespace set to t globally in my .emacs file, and this is generally not a problem except for when I'm in diff-mode looking at a patch which has mandatory trailing white space ...
25
votes
2answers
4k views

New line in Title of an org-mode exported html document

I use org-mode to document stuff and usually export it to pdf (via latex) and html. If the \\ characters are at the end of a line, it forces a newline character when exporting to both pdf and html. ...
20
votes
4answers
3k views

Line height with unicode characters

Some Unicode characters cause the line they are displayed on to be quite large. For example, a grave accent "̀ " adds about 2.5 lines of space above and below it. Other characters that cause this ...
15
votes
5answers
3k views

How to search and replace in the entire buffer?

Search and replace, by M-% and !, is done from current position to the end of the buffer. How can I do it for the entire buffer? Thanks.
3
votes
1answer
69 views

How can I reclaim “nth” for bash in eshell?

In bash I commonly use an alias 'nth' (hint: it makes sense as a key-combo if you use Dvorak layout). When I type this in eshell, I see: ~ $ nth usage: nth: (N LIST) How can I get eshell ignore nth ...
25
votes
1answer
564 views

What are all the ways of launching a shell from inside emacs and what are their various properties?

I know of at least four possibilities: eshell term ansi-term shell What's the complete list of tools built-in to emacs to launch a shell, and what benefits and drawbacks do they offer?
7
votes
1answer
221 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-...
7
votes
2answers
704 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 ...
12
votes
2answers
760 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 + ...
12
votes
2answers
4k 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 ...
16
votes
1answer
635 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 +---------------+ | ...
10
votes
1answer
88 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 ...
3
votes
1answer
257 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 ...
15
votes
2answers
1k 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 ...
8
votes
1answer
504 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 ...
14
votes
1answer
2k 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 ...
31
votes
5answers
3k 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 ...
14
votes
2answers
417 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 ...
8
votes
2answers
75 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) "...
20
votes
8answers
3k 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?
26
votes
4answers
3k 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 ...
11
votes
3answers
99 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 ...
4
votes
1answer
2k 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 ...
5
votes
1answer
651 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 ...
97
votes
9answers
56k 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?
6
votes
2answers
516 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 ...
11
votes
1answer
228 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 ...
8
votes
2answers
832 views

Automatically add recipients' mail address to the BBDB database

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?
10
votes
3answers
671 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, ...
73
votes
5answers
21k 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 ...
18
votes
3answers
4k 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 ...
11
votes
2answers
318 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 ...
6
votes
2answers
414 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 ...
25
votes
5answers
7k 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 ...
14
votes
1answer
260 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 ...
3
votes
2answers
1k 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 ...

15 30 50 per page