# All Questions

20,735 questions
Filter by
Sorted by
Tagged with
274 views

### Programmatically controlling the order of functions within a hook

I am looking for an example, please, to programmatically control the order of functions within a particular hook: First in time, which is easy -- i.e., don't append using add-hook. Last in time, ...
3k views

### Find out backend used in company completion

When using custom company backends, company-complete ends up returning no completions due to a misbehaving backend. In such cases, it would be helpful to know out which company backend was used to ...
1k views

### Shell bash completion window

I am in shell-mode with bash-completion enabled. When I attempt tab completion, Emacs creates a new window to display completions. For example, if I am in a directory with subdirectories foo and ...
803 views

### restclient errors “failed with code 111”

When I run GET http://localhost/ with restclient.el, I get the following error in the *Messages* buffer: GET http://localhost:80/] Contacting host: localhost:80 error in process sentinel: restclient-...
7k views

### How do I use org-mode's checkboxes?

I'm unsure how to use checkboxes in Emacs. I'm using Emacs 24.3. The documentation suggests the use of org-toggle-checkbox as "With a single prefix argument, add an empty checkbox..." I've tried ...
629 views

### Sort file names (numbered) in dired

When Dired sorts files by name, it sorts in alphabetical order. That's fine with letters; however, when the file names start with numbers, it would be better to sort in numerical value. Example: ...
10k views

### How to input special character, such as Celsius symbol, and common greek letters?

I want to input: Celsius degree symbol Common Greek letter: Alpha, Theta, Omega
1k views

### Display battery information only when unplugged?

display-battery-mode displays battery information, but I only want to use it when my computer is unplugged and running off battery power. Is there a way to set the display mode according to the power ...
584 views

### How to prevent ispell from checking inside mathematical formulae

By invoking M-x ispell, ispell says that 'ij' in the following formula is incorrect. How to permanently prevent ispell from this behavior. $\phi_{ij}$
751 views

### when installing a package with package.el, How to never show the compile log buffer?

This buffer annoys me every time I install a new package or update one with package.el: How can I tell to emacs that never ever show that buffer unless I need to know something really important from ...
2k views

### How to input number-series (with appointed amount) in Emacs?

I want to input 90 number-series starts from 1, here is what I did: set-mark type enter 90 times C-u C-x r N Enter %3d Enter The output is like this: 1 2 3 4 5 6 7 .... 90 Is there a way to ...
719 views

### js2-mode customizations not applying

No matter what I do, the customizations I apply to js2-mode are not going into effect. The mode is on and working, but with default settings. I've tried changing the default-tab-width to 2 and ...
317 views

### Using ESS in console Emacs

When I start Emacs 24.4.1 for Windows with the -nw option, I am unable to start R via Meta+R. Emacs becomes unrensponsive and I have to kill the process. The problem seems connected with the call ...
970 views

### Autocomplete environments like in TeXStudio

TeXStudio autocompletes environments. How can I get AUCTeX to do the same? I can begin typing an environment name (say myenvironment) and, after entering a part of it (my, myenv, etc.), I hit ...
620 views

### Keep ERC buffers in the background on reconnect

I'm using ERC (with ZNC) as my IRC client. I'm joined to quite a few channels and when I run znc-all all my buffers are restored and the logs are replayed. This is all great. What I find very ...
5k views

### How to convert lines to an org-mode checklist?

Suppose I have the following list. I'd like to convert it to a checklist. Lec 1 | 1:20:36 Lec 2 | 1:10:32 Lec 3 | 1:08:33 Lec 4 | 1:20:33 Lec 5 | 1:16:50 Lec ...
205 views

### How to turn off iedit-mode quickly after finishing an edit?

I like how multiple-cursors is turned off when pressing RET, and this is not the case for iedit-mode, how can I emulate that behavior?
2k views

### How to let eshell remember sudo password for two minutes?

In a general term runing bash, when I run a sudo ... command, bash will remember my password for a while. This makes package management task easier. For example: sudo apt-get update # password .........
3k views

### How to fill (wrap) an org mode heading?

I would like to fill (wrap) a long heading in org mode. I don't see mention of how to do so in the org manual. If I manually wrap the line by inserting a newline, org mode does not recognize the ...
2k views

### Variables in Babel evaluation with SQL blocks

According to the org-mode manual, you can set variables in code blocks as follows: #+HEADERS: :var foo="blah" #+BEGIN_SRC elisp (message foo) #+END_SRC #+RESULTS: : blah However, when I try to do ...
17k views

### How to quickly copy/move file in Emacs Dired?

In Dired mode, I can m mark files and R to move them to a destination. Some times the destination path is too long. With the destination open in a split window, is there a way to move files quicker? ...
352 views

### Restore desktop frames for Emacs server

The version of desktop.el that comes with Emacs 24.4 allows restoring frames as well as windows and buffers. This works fine for an Emacs server (i.e., daemon) with at least one open frame. However, a ...
166 views

### How can I perfectly simulate an automatic package install?

There is a nefarious bug in a project stored locally in ~/my/project/path. This project is on MELPA, but installing from MELPA fails for some reason for some users. It's unknown why it fails, but I ...
780 views

### org-table alignment issues in osx

I am used to my tables aligning nicely when I hit C-c C-c in Linux. In Emacs for OS X (emacsforosx.com) this does not behave on my system. It works in Aquamacs.
2k views

### Automatically update default-directory when PWD changes in shell-mode and term-mode

Are there any options or packages which cause default-directory to be updated if the working directory changes in shell-mode and term-mode? I.e. when using cd, but the solution would have to be more ...
951 views

### What tool shall I use to make a personal note book?

When I learn to use linux, Emacs, and programming, I asked and googled a lot of How-to's. I would like to note them down for furture reference. The tools should be: Use plain text file, perhaps with ...
738 views

### How to copy command output in ansi-term mode?

In ansi-term mode, is there a way to copy the command output? This is quite easy in eshell, but sometimes eshell behavors not exactly the same with bash. For example: eshell doesn't know how to auto-...
5k views

### Are there color pickers for Emacs?

I use the excellent rainbow-mode to highlight colors in CSS files. However, this assumes I know what color I want. Are there any color pickers that I can use for CSS editing inside Emacs? Ideally, I'...
672 views

### Easiest way to set keybindings for strings

I use strings like "include/lib-one", "include/lib-two", "src/lib-three" all the time. Is there an easy way to set shortcuts for these strings, e.g. as C-c 1, C-c 2 and so on?
1k views

### Disable minor mode in all open buffers

Often I have many buffers open and, for whatever reason, I no longer wish to use a particular minor mode with them. Is there currently a built-in way to disable a particular minor mode for all open ...
155 views

### org-capture crashing Emacs

Running org-capture crashes my Emacs (both 24.3 and 24.4 for Linux). This thread reports the problem is due to cdlatex not being installed. But installing it does not solve the problem on my ...
480 views

### Emacs indent with tabs to 2 columns

Current with C, Javascript, Ruby, etc. when inserting a block with { <RETURN>, Emacs automatically indents the next line, but it does so with spaces. How do I change this behavior to tab ...
331 views

### Display list of words along bottom of frame?

I'd like to display 3 lists of words on separate lines horizontally along the bottom (although top would work too) of every emacs frame I have open. I've thought of 6 ways to do this, and they all ...
279 views

### Disable mic-paren in the minibuffer (or at least in ido)

I'm replacing a buggy code that was suppose to show a matching brace in the minibuffer in case it was off-screen with the following: (paren-activate) ;; activates mic-paren (setq paren-match-face '...
5k views

### Why do regular expressions created with the regex builder use syntax different from the interactive regular expressions?

So, using the regular expression builder (M-x re-builder), finding lines that end in \ takes "\\$", while in search and replace by regex, it only takes "\$". I would have expected the regex builder ...
201 views

### Why does GUI emacs take longer to start?

I care about the time it takes to start emacs. I bounce around a lot and edit many files. I cannot use emacsclient due to some limitations in my workflow and machine. In the terminal emacs -nw -Q M-x ...
2k views

### Wildcard in org-agenda-files

I have a project base folder, ~/prj, inside of which I have many individual projects, 2014_prj1, 2014_prj2, ..., inside of which I have, among others, a doc folder. The layout looks like this: ~/prj ...
1k views

### Async shell process buffer always clobbers window arrangement

I frequently launch external programs from emacs using M-!, such as Firefox or Evince, etc. Whenever I do, a buffer pops up full of results for the process, which clobbers whatever else I've got going ...
1k views

### Emacs on Android - org-mode - error - (wrong-type-argument stringp (require . t-mouse))

I'm running Emacs in Android under ZShaolin, with whatever the default configuration is. When I open an org-mode file (or try to enable org-mode), I get an error: (wrong-type-argument stringp (...
512 views

### Why is `user-full-name' returning “”?

I'm running Emacs on a linux system and the function user-full-name, when called with no arguments, always returns an empty string. How can I fix this? I assume it's something I need to configure on ...
2k views

### How to prevent slow-down when an inferior processes generates long lines?

I use Emacs with Geiser to hack on some Scheme code. As I'm playing around in the REPL I sometimes evaluate expressions that result in a lot of output, often all on one line. For example, I just ...
1k views

### How to make ordered lists collapsed by default in org mode

Suppose, we have this org file: * Header1 ** Header1-1 ** Header1-2 * Header2 1. Item 1 1. Item 1-1 2. Item 1-2 2. Item 2 When I open it by default it looks like this: * ...
3k views

### How to use the calendar

I know that there is a calendar in Emacs and I want to use it. After a lot of Google searches, and also after reading Emacs' manual, I still have no idea how to use it. The only thing I have succeeded ...
472 views

### Viewing answers in StackExchange for Emacs

StackExchange for Emacs is exactly what it sounds like. After authenticating and loading sx-tab-topvoted emacs, I see a buffer of question headings. 46 3 Are there any advantages to using ~/....
3k views

### How to right align some items in the modeline?

Given the following modeline configuration: (setq-default mode-line-format (list ;; Current buffer name "%b " ;; Major mode "[%m] " ;; Modified status "[%*] " ;; Cursor ...
681 views

### How to change octal sequences into utf-8 text

When I copy non-ascii text from Windows and paste into Emacs, it shows up as an octal sequence. For example, if I paste ä into Emacs it shows up as \344. I could type C-q 344 to get the ä back in ...
613 views

### Is there a way to daisy chain .dir-locals.el files?

Suppose I have a directory with these files. /foo/bar/baz/.dir-locals.el /foo/bar/.dir-locals.el /foo/.dir-locals.el When I go to create a file in /foo/bar/baz/, I'd like to daisy chain them ...
3k views

### Customizing a default indentation style for C++

I use the default style linux (snippet from here) ;; set indentation style linux for c++ (setq c-default-style "linux" c-basic-offset 4) But I can't get it to work with the style setting ...