All Questions

8
votes
1answer
5k views

How can I set Emacs up for iOS development with Swift?

I'm going to be doing a bit of iOS work soon, using Swift (yay!). Unfortunately, this usually involves xcode (boo!). How can I set Emacs up to build iOS apps with Swift? Ideally, they would run on ...
3
votes
2answers
254 views

Preserve window arrangement for secondary windows

I often keep a "short" secondary window below my main window with an arrangement like so: +---------+ | | | | | top | | | | | | | +---------+ | | | ...
7
votes
4answers
2k views

What are the best resources to learn Emacs? [closed]

I have learned Emacs mostly using it's own documentation and the late emacs-starter-kit. Talking with people interested in learning Emacs, I found that my approach is not appealing to them. What are ...
11
votes
3answers
2k views

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 "~/....
8
votes
4answers
160 views

How can I look up help for a key sequence that I can't type

I know that I can look up help for a key sequence using C-h k <key sequence>, but I use Emacs in the terminal, and my terminal emulator doesn't pass all key sequences through to Emacs. Sometimes ...
8
votes
2answers
1k views

How to override keybindings for `term`

For some tasks like using ruby's pry and tmux both eshell and shell do not behave well. I tried to use term, but my innability to override the keybindings in term makes its use annoying. How can I ...
16
votes
1answer
1k views

How can I block a frame from being split?

Currently I work with ruby and rspec. I really like the idea of having a separate frame in another monitor showing me the compilation buffer. My current setup uses a 'code' frame (in which I do actual ...
7
votes
1answer
963 views

How can I edit Google Docs from Emacs?

Is there a gdocs-mode or something I could use to edit Google Docs?
15
votes
2answers
564 views

Only doing whitespace-cleanup on the lines touched

For most projects I work on I use a before-save-hook to run whitespace-cleanup. This is fine when everybody on the team cleanups up their spaces but sometimes I am involved in already running ...
16
votes
1answer
1k views

Switch window split orientation, fastest way

Say you have two buffers open like so: ------------------------------------ | | buffer 1 | buffer 2 | | | ------...
10
votes
1answer
1k views

Using DeskTop for basic project management

I would like to use DeskTop for basic project management, i.e. opening a set of buffers and restore histories depending on the project I am working on. Is this possible, i.e. having one desktop file ...
5
votes
3answers
688 views

TOC of tables for org-mode long tables

Here is a super-short org mode file ready to export to pdf C-c C-e l o. It is a sample file to demonstrate long tables and the issue I am facing with the auto generated index of tables by org-mode. #+...
6
votes
3answers
154 views

Tracking when variables get updated

I have a problem with org-mode's agenda view. While I've set org-agenda-files to '("~/org/") invariably when I finally spin up M-x org-agenda I find that org-agenda-files just points to one org-file. ...
12
votes
3answers
380 views

describe-face character not under / unreachable by the cursor

I like using a combination of describe-face and customize-face to adjust the appearance of my working environment. Sometime this workflow fails when I want to change the face of a location I can not ...
40
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-...
7
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 ...
86
votes
4answers
32k 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?
24
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
38k 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
14k 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
256 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
564 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 ...
24
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 ...
13
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
68 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
560 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
218 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
690 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
736 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
624 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
252 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
493 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 ...
30
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
412 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) "...
19
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 ...

15 30 50 per page