All Questions

43
votes
6answers
53k views

How to get intelligent auto-completion in C++?

Emacs cannot compete with another other IDE if it doesn’t have an auto completion function. Auto-complete simply makes me a more efficient programmer. I know of the Auto Complete Mode extension, but ...
35
votes
5answers
2k views

Recording a GIF screencast of Emacs

I see lots of folks posting animated GIF's showing off Emacs features, but I haven't seen a nice walk through on creating one. Is there any code that tries to link the keyframes of the gif to ...
1
vote
2answers
574 views

Interactive pop-up dialog?

Is there a popup input dialogue box for Emacs, which returns the string that a user enters? Maybe something that can be launched through the mini-buffer? Or through an elisp command/function?
14
votes
3answers
842 views

Closing all pending parenthesis

When writing lisp codes, sometimes I'm deep in a nested expression and all I want is to insert all the missing closing parenthesis. Right now I'm just inserting them until I get a mismatched paren, ...
13
votes
2answers
447 views

Why does emacs come packaged with games and amusements?

This question has confounded me ever since I was a freshman in college trying to subtly bludgeon my way through Dunnet in the lab without my professor noticing. Why in the world does emacs come with ...
11
votes
4answers
545 views

Preview fields in org table

Sometimes it is convenient to set a manual column width when creating a table in org-mode. This makes it so that columns do not have to grow to the size of their longest entry. When an entry in and ...
3
votes
1answer
381 views

Adding table headings to #+RESULTS: tables

I'm using org-babel to generate a result I want to export in my table. However I can't find a way to easily control the heading of the table. At the moment the best I can manage is echo'ing some CSV ...
16
votes
2answers
415 views

how to detect if inside a matched pair?

Q: is there a general way to detect whether or not point is inside a matched pair of characters? That is: is there a general predicate function (or something) that can determine if point is in-...
24
votes
2answers
3k views

Add operating system clipboard to kill ring

Often I find myself copying a code snippet into my operating system's clipboard from the internet. Then, I take the following simple steps: Switch to my Emacs window Find the place where I want to ...
11
votes
2answers
412 views

For what languages is `syntax-ppss` appropriate?

I've been looking at a way of detecting whether point is on a comment by looking at how the current buffer is fontified. Smartparens defines sp-point-in-comment, which relies on syntax-ppss. However, ...
8
votes
6answers
680 views

How to search the Emacs Lisp Reference Manual?

Sometimes describe- or apropos- are not enough. How can I search the Emacs Lisp Reference Manual (C-h i m elisp) from within emacs?
54
votes
4answers
12k views

Fundamentals of multiple-cursors

I recently learned about multiple-cursors, and it looks like a very useful package. I went through the documentation on the original repo, but the commands still look a bit obscure to me. I then ...
29
votes
7answers
6k views

How do I find text across many open buffers?

Lets say I have 10 buffers open, and I want to find all occurrences of blah in all 10 buffers. How would I do this?
3
votes
3answers
1k views

How do I connect to IRC using Emacs?

I want to get onto the #Emacs channel on Freenode. How do I do it?
27
votes
6answers
10k views

How do I list all key-bindings available in a given buffer?

I am trying out a new major mode, how can I take advantage of Emacs' documentation system to get a listing of key bindings available in that specific buffer?
61
votes
17answers
28k views

How do I switch buffers quickly?

In vanilla Emacs, I have to do C-x b and then manually type out the buffer name to switch. If I forget the name of the buffer, I have to hit TAB to list possible completions. Is there anything I can ...
0
votes
3answers
560 views

How do I bind Caps Lock to Control on Windows? [closed]

What are my options for making my Caps Lock key a Control key? Can this be done within Emacs?
10
votes
1answer
355 views

Truncate beginning of right-aligned column in org table

I have a column in an org-mode table that contains long file names. The interesting part of the filename is the last few characters rather than the first. For example, given the files below: /data/...
17
votes
2answers
485 views

How can I use the SE flavor of Markdown in emacs?

I would like to use the SE flavor of markdown in my emacs. The default Markdown mode has some features (backticks and indentation mark code, # makes a header and > also changes the font) but I ...
13
votes
1answer
732 views

How to control in which window a buffer is displayed?

Q: how can I control which window org-deadline uses to display the calendar? org-deadline temporarily pops up the calendar buffer in a window when setting a deadline, and then closes it again after ...
2
votes
1answer
163 views

Can I toggle fringe-mode when entering / exiting edebug?

Paraphrasing a question I previously asked on SuperUser because, IMO, the answer found there does not resolve the issue. Question For the most part I prefer to disable Emacs' fringe. (I customize ...
28
votes
3answers
4k views

How to know when or when not to use the single quote before variable names?

I have the below: (setq some-variable "less") I am confused why I have to use the single quote with boundp but not with bound-and-true-p. Example 1: (when (boundp 'some-variable) (message "...
5
votes
3answers
4k views

Recursively find all files from a folder containing a regexp in the filename, using helm

How can I find all files from a folder and its subfolders recursively, containing a regexp in the filename, using helm? For example: how to search for all files with the extension .el and containing ...
48
votes
2answers
12k views

What are the differences between autocomplete and company mode?

There seem to be two major autocompletion extensions for emacs: autocomplete and company mode. What are some of the practical differences between the two and when would I want to use one over the ...
6
votes
1answer
256 views

Make AUCTeX compile each \include to a separate file

In LaTeX it is customary to put the content of different chapters into different files which are then pulled into a master file using \include{FILENAME} statements. One can then use the \includeonly{...
9
votes
1answer
263 views

How to prevent tramp locations from interfering in history?

I have an issue where if I try to perform some random Emacs operations such as org-capture, or renaming a file to a different (local) directory in dired, Emacs attempts to contact a different machine ...
1
vote
1answer
541 views

How to use global prefix command key in define mode-map keybinding?

I have a global prefix command key define like following: (unless (boundp 'help-document-map) (define-prefix-command 'help-document-map)) ;; (define-key my-programming-prefix-k (kbd "h") 'help-...
9
votes
2answers
1k views

project specific init file

I have some customizations for emacs that I'd like to use for a single project, but not affect emacs globally. Is there any way I can have emacs load a specific init file when launched from a certain ...
1
vote
2answers
2k views

What are possible real use cases of the Emacs “psychotherapist” mode? [closed]

It is well known that when you type M-x doctor, a kind of AI program prompt you to write about your problems, as a psychotherapist does. Some said it's an easter egg, but it seems it goes beyond the ...
11
votes
1answer
3k views

Get content of a buffer

So buffer-string gets the content of the current buffer. But it doesn't allow specifying other buffers. How can I get around that? Do I need something like save-window-excursion to make it work?
3
votes
1answer
205 views

Can I modify whitespace mode to distinguish hard and soft newlines?

Currently, whitespace.el shows me newline characters by changing the display table to show a $ at the end of lines. I don't actually find this useful, so I disable it while I enjoy the many other ...
12
votes
1answer
1k views

Asynchronously wait for output from a comint process

First of all, a disclaimer. I have researched this many times, and I am pretty sure that I have already found the answer one way or another, but I just don't understand it. My problem is the ...
8
votes
2answers
3k views

How can I customize the compile command?

In one of my projects I need to run make package install when building instead of make. It remembers the last compile command I used, but resets to make -k every time emacs starts up. How can I ...
4
votes
2answers
455 views

How to remove alias from the eshell?

I recently created the alias in eshell: alias hello 'echo "Hello World"' So now whenever I type hello: I am very used to creating temporary alias in the Terminal for more subtle use. And then ...
2
votes
1answer
480 views

How to better control Emacs buffers in StumpWM?

I have been using Emacs more and more, to the point that I would like to start using StumpWM as my default window manager with it, so that I can integrate the missing bits of my workflow that ...
6
votes
1answer
769 views

Listing SCHEDULED headlines from an org file ordered by date

A few months ago, I converted my init file into an org file, and I’ve since been using it as a way to organize my blog posts. I won’t go into too much detail here, suffice to say that this is a huge ...
5
votes
1answer
300 views

elisp widgets: Modifying an editable-field's value real time when changing another one

This is cross-post from Stack Overflow I have a simple widget setup: (setq gobgen-widget-name (widget-create 'editable-field :size 25 :format "Name: ...
5
votes
0answers
63 views

In what circumstances will edebug produce different behaviour?

I'm trying to debug this julia-mode indentation issue using edebug. The elisp I'm running is here and the bug only occurs on Emacs 23.3. TAB is bound to julia-latexsub-or-indent. I can reproduce the ...
18
votes
3answers
884 views

How to gracefully handle errors in init file

I would like a way to catch errors when running my init file, and then handle them gracefully. A lot of my most important customizations and keybindings show up at the end of my init file to make sure ...
4
votes
2answers
846 views

Supporting images/diagrams in exported org-mode presentations

I'm currently preparing a presentation which I've outlined in org-mode and I'm having difficulty in including diagrams in the exported HTML. I'm currently using org-reveal but I'm happy to use another ...
5
votes
2answers
390 views

What is the best way to reload git stashed changes you've popped while file is open in buffer?

When I'm viewing a file and then pop a stash which modifies that file in the working tree using git stash pop in either bash or eshell, what is the best way to immediately see those changes in the ...
7
votes
1answer
975 views

yasnippet: how to expand a snippet from a string and have the fields recognized?

Q: how do I get yasnippet to expand a text string correctly (recognizing snippet fields) from inside elisp code? A very simple snippet is a just a string of characters with some control characters ...
5
votes
1answer
115 views

Difference between posix-search-forward and search-forward-regexp (need example)

In emacs lisp, there's the function posix-search-forward http://www.gnu.org/software/emacs/manual/html_node/elisp/POSIX-Regexps.html. Does anyone have a full example showing its difference from ...
4
votes
1answer
676 views

Why do sql-mode and sql-interactive-mode not highlight strings the same way?

Here is a screenshot showing the difference between sql-interactive-mode (top) and sql-mode (bottom). Why does the string not get highlighted properly in sql-interactive-mode? (Note - this also ...
10
votes
1answer
182 views

Are there any pre-existing benchmark suites for Emacs itself?

(This question is not about writing benchmarks/profiling elisp code, for that, see this question.) Do any benchmark suites exist for Emacs performance? I'm looking for something equivalent to the V8 ...
60
votes
4answers
7k views

How can I find out in which keymap a key is bound?

I have rebound a the 'd' key in gnus-article-mode, but its old behavior is still active when the point is on an attachment. I can see that the rebinding did not take effect there by doing C-h k d, but ...
4
votes
1answer
503 views

Make helm window the only window

Sometimes when I am using helm, I want to make the helm completion buffer as big as possible. I know that helm-enlarge-window will make the window grow by 1 line, but this is awkward and still doesn't ...
17
votes
1answer
931 views

How can I restart emacs and preserve my open buffers and interactive history?

As a follow-up to What's the fastest way to reload my .emacs file when I make changes so all my affected buffers will pick up those changes? It was suggested that the restart question should be ...
13
votes
1answer
934 views

How do I automatically load a mode for a specific set of file extensions?

I'd like to load the yaml-mode for any files named *.yml or *.yaml.
27
votes
2answers
2k views

What's the fastest way to reload my .emacs file when I make changes so all my affected buffers will pick up those changes?

I'm aware of C-x C-e which is eval-last-sexp and M-x eval-buffer, but these aren't always sufficient to pick up all changes. Sometimes you need to actually close buffers that are in the modes who have ...

15 30 50 per page