FAQ Database Discussion Community

## Emacs open run command save exit

shell,emacs
I use google-c-style.el for C/C++ projects in Emacs. Like many Emacs modes, the indentation is automatically set. For any given file I can open it, select the whole document, then press Tab to reset all indentations, save it, then exit. I have a large code base that I'd like to...

## Italicise word in emacs

emacs,elisp
I am slightly new to emacs. I am editing a document in latex and I have words that I would like to put in italics. I would like a simple macro where if I place a cursor on the word, and hit a key combination the word is sorrounded with...

## How to insert a number sequence in Emacs with multiple cursors?

emacs
How can I insert a number sequence with the multiple-cursors plugin in Emacs? For example, aa| aa1 aa| => aa2 aa| aa3 ...

## emacs cannot load file highlight-current-line file-error

Emacs version : GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-18 on MARVIN Copied the code for highlight-current-line from here. Created a text-file in .emacs.d, pasted the entire text on page in the text-file and saved it as highlight-current-line.el in the same folder. Added the following lines to .emacs : (add-to-list 'load-path...

## How to remove the temporary files starting and ending with '#' created by Emacs when it closes?

emacs,backup,kill-process
When Emacs is closed with modified buffers present, it creates a file with the format '#file_name#' for recovery purpose in its parent directory for each modified buffer (except for scratch). When recover-file command is used when Emacs opens the next time, the previously modified buffer of the file is recovered....

## Automatically turn on enriched mode and make newlines between paragraphs hard in Emacs

emacs
I want to turn on enriched-mode in Emacs by default, so that my *scratch* buffer would always open in that mode. I've got my *scratch* persistent across sessions (http://dorophone.blogspot.com/2011/11/how-to-make-emacs-scratch-buffer.html). I added (enriched-mode) to my .emacs file, but then every start up I need to answer the question: Make newlines between...

emacs,org-mode
I am trying to setup org-capture or org file for following issue: Task A is the major task. It depend upon minor tasks B and Task C. Now in org-agenda view, I should be able to see Task B and Task C. When they are done, I should be able...

## word-wrap — using 'cursor t when overlay 'after-string at end of visual line

emacs,elisp,overlay
PROBLEM:  When point is at the end of a visually wrapped line (but not at the very end of the line), the cursor does not respect the cursor t setting of the overlay after-string -- i.e., the cursor appears at the beginning of the next visually wrapped line, instead of...

## How to find aliases in emacs

emacs,alias
I want to check if there is a default\ existing aliasing for a function (in this case:x-clipboard-yank, but the question is general). Is there an emacs function that displays active aliases I can use to figure it up? The expected behavior is like the shell alias command.

## how to empty or clear the emacs minibuffer?

emacs
Sometime the content of the minibuffer shows the output of a command (emacs 24). This is not too much of an inconvenience when the output is just one line. It's more annoying when the command is multiple lines long and the minibuffer uses many lines of display that could be...

## Getting which-func-mode output as a string in Emacs lisp

emacs
I am trying to retrieve the output which-function-mode as a string in Emacs. I am going to create a keyboard binding shortcut that copies it to my clipboard. It seems like this (which-func-mode ("" which-func-format " ")) is used to insert which-function into Emacs header line. However, I can't seem...

## Emacs dired, what controls the color of the title line of a directory

emacs,dired
As the picture shown in attachment, what is the variable, if any, that controls the color of the title line of the directory? I'm trying to change the darkgreen to grey.

## idris-mode – Buffer *idris-repl* has no process

emacs,idris
I'm trying to get idris-mode to work. I am using HEAD from both idris-dev and idris-mode. Whenever I execute C-l (idris-load-file) I get this error Debugger entered--Lisp error: (file-error "make client process failed" "connection refused" :name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil) make-network-process(:name "Idris Ideslave" :buffer...

## Regular expression for latex fonts in emacs

regex,emacs
The following regular expression is taken from font-latex.el - line # 925 (auctex-11). "\$$?:{[^}]+}\$$?" I have tried to transform this expression so that it can accept the following text in Emacs. 1 - \begin{code}{} 2 - \begin{code}{{}} 3 - \begin{code}{Hello World} 4 - \begin{code}{\textbf{Hello World}} Here code environment requires 2...

## Emacs: syntax highlight for non-code files

file,emacs,syntax-highlighting
Let's us suppose I want to create a file (using emacs) to explain something about programming. For example, a mylib-tutorial.txt. Is there a way to turn on syntax highlight on specific parts of a file containing code? For example: Tutorial --------- This call behaves as follow: void foo(&resource); This call...

## How can one automatically have emacs turn on auto-fill-mode for a git commit?

git,emacs,mode
I'm wondering if there's a way to have emacs turn on auto-fill-mode when it's launched by git during a commit? I've looked at the command line options and perhaps I could use --load, or something like that to start with auto-fill-mode, but I suspect there's a better way? Also, git...

## web-mode won't start automatically in Aquamacs

emacs,aquamacs
I can't seem to get the configuration to work properly, only if I create a new HTML it goes into web-mode, any other way it goes into de default html-mode. I'm using Aquamacs 3.2 GNU Emacs 2.4.4.51.2 Though I have had this same problem with previous versions. Here's my config...

## How to match everything except a particular pattern after/before a specific string constant

regex,emacs
ATS(inline, const, unused) /* Variadic Macro */ OTS(inline, const, unused) I'm trying to match inline, const, unused keywords only in ATS macro. i tried ATS([^,]*) but it only matches inline keyword. Edit: I need to change the color of all ATS parameters. this only works on the first parameter. (font-lock-add-keywords...

## Tramp-Mode does not disconnect from sudo shell?

emacs,tramp
I used emacs' tramp-mode to edit root-owned files with the syntax /sudo::<filepath> This works perfectly well, but I cannot seem to get tramp to end the sudo session without manually killing the subprocess via htop or some other process manager. The tramp-cleanup-*-connection commands do not end the session. How do...

## Following up emacs TAB indentation with TABs, not spaces

emacs,tabs
If my .emacs contains just the lines (setq-default indent-tabs-mode nil) (add-hook 'text-mode-common-hook (lambda () (setq indent-tabs-mode t))) I am expecting that if I edit a file list.txt containing <tab> - Item 1 <tab> - Item 2 and press return after Item 2, a tab will be inserted on the next...

## org-mode agenda view matching tag and todo state

emacs,org-mode
I would like to create an agenda view with org-agenda-custom-commands, which will connect capabilities todo-tree and tags-tree. That's what I want to achieve, this sparse tree suited to such a search C-c / m JOB+TODO="NEXT"...

## How do EMACS Lisp programmers read text files for non-editing purposes?

file-io,emacs,elisp
What do EMACS Lisp programmers do, when they want to write something roughly the equivalent of... for line in open("foo.txt", "r", encoding="utf-8").readlines(): ...(split on ws and call a fn, or whatever)... ..? When I look in the EMACS lisp help, I see functions about opening files into text editing buffers...

## Emacs' autosave files and ember-cli

ember.js,emacs,ember-cli
I'm new using ember-cli and I use emacs as my editor. Anytime I modify a file, I get this error in the ember server console events.js:72 throw er; // Unhandled 'error' event ^ Error: ENOENT, stat '/home/user/projects/ember-cli-101/example-1/borrowers/app/routes/.#friends.js' and then I have to restart my server. I have read that I...

## How to define a function with a variable number of arguments?

emacs,elisp
Instead of this: ((lambda (a b) (apply '+ (list a b))) 1 2) it is possible to write this in Scheme: ((lambda args (apply '+ args)) 1 2) Now it is possible to pass more than two arguments to the function. When I try it in Emacs Lisp I get...

## elisp: defmacro with lambda

emacs,elisp
Sorry, I tried few times and I can't build simple defmacro - can anybody help me with that: So, I want define macro which will expand to: (define-key keymap "*" (lambda () (interactive) (some-func "*"))) I tried something like: (defmacro wrap-and-define-key (keymap key func) (define-key ,keymap ,key (lambda () (interactive)...

## how to use emacs tramp with ssh remote to server

emacs,sftp,freebsd
I want use emacs remote server(freebsd use sftp with ssh). I already read this and write (require 'tramp) (setq tramp-default-method "ssh") in my .emacs. I use C-c C-f RET /sftp:[email protected]/. But it does not work

## Is it possible to turn off qualification of symbols when using clojure syntax quote in a macro?

emacs,clojure,elisp
I am generating emacs elisp code from a clojure function. I originally started off using a defmacro, but I realized since I'm going cross-platform and have to manually eval the code into the elisp environment anyway, I can just as easily use a standard clojure function. But basically what I'm...

## Switching quickly between different C styles in emacs

emacs
What is the best way to define multiple different C-styles in emacs and easily? I have one project that requires the Google C/C++ style while everything else uses BSD. What I would like to have is a key combination to allow me to quickly change between the style provided by...

linux,emacs
I have a set of commonly used code bash script. I want to load up these code snippet in emacs automatically upon creating a new file, how can this be setup?

## Can I stop Emacs from resetting default-directory every time I open a file?

emacs,directory,editing
I've already asked the same question on Emacs. If it's not permitted, I'm sorry and I will delete the question. If I: Start Emacs in my home directory (~) Find a file in the ~/Projects/ruby-play directory with C-x C-f Try to find another file with C-x C-f The default directory...

## backward-paragraph skips closest paragraph

emacs
I've modified the variable paragraph-start to count lines starting with .*: as a paragraph start: (setq paragraph-start "\f\\|[ \t]*$\\|[ \t]*[0-9.]\.\\|.*:$\\|" ) However, if I have a buffer: foo: bar: baz: some stuff more _ (Where _ indicates point location) Then the first backward-paragraph skips to the beginning of the line...

## How to format regexes in find-name-dired?

emacs
When calling M-x find-name-dired you will be prompted for a root directory and a filename pattern. What's the proper find regex for multiple file extensions? Eg using *(txt|html) gets converted to find . $$-iname \*\(coffee\|html$$ \) -ls, which doesn't work. Is there any way to convert to the -o...

## How to get Emacs to sort lines by length?

sorting,emacs,elisp
I'd like to be able to highlight a region in Emacs and then sort the region by line length. The closest I've found is the following code which I think will sort by length: (sort-subr t #'forward-line #'end-of-line nil nil (lambda (l1 l2) (apply #'< (mapcar (lambda (range) (- (cdr...

## how to change the value of sp-navigate-reindent-after-up in smartparens

emacs,lisp,elisp,parentheses
I want to change the default behavior of smartparens to remove the whitespace before the close delimiter. I mean, when I type ) after (a b c |, I hope the final result is (a b c)|. Here, the | is cursor. I searched the documentation of smartparens, and find...

## Emacs: After Aquamacs update, Auto-Fill-Mode's Alt-q breaks lines at maths delimiter in LaTeX

emacs,emacs24,aquamacs
After I updated Aquamacs, using Alt-q (in the Auto-Fill minor mode) to fill paragraphs when editing a LaTeX document results in each line being broken at the first occurrence of the LaTeX maths closing delimiter, \). (Well, almost! See the example below for the one exception.) Version information: Aquamacs 3.2...

## Configuring Flycheck to work with C++11

c++,c++11,emacs,flycheck
I am having significant trouble configuring flycheck for C++11. Right now, flycheck is flagging things like std::to_string(). The checker I am using is just g++. What can I add in the .emacs file such that flycheck will assume C++11 by default?

## XHTML: how to highlight matching tag?

emacs,xhtml,syntax-highlighting
I'd like highlighting of the matching HTML tag when the cursor is on the specific tag. I'm looking for something like highlight matching parentheses in options menu. I've checked the question How can I highlight unmatched HTML tags in Emacs? which is close to what I search but I want...

## Collapse lowest level of plain lists with one command in orgmode?

emacs,org-mode
I want to use orgmode for writing a simple exam with a bunch of multiple choice questions. The structure I thought of was something like this: * Multiple Choice 1. Who was the founder of rationalism? a) Locke b) Copernicus c) Descartes d) Plato - C 2. Locke believed that...

## how to enable minor-modes for scratch buffer

emacs
I want to get rainbow-delimiters enabled for .el files as well as the scratch buffer. The installation page says that the (global-rainbow-delimiters-mode) is disabled. is there a scratch-buffer-mode-hook that I can add on to?

## Configuring gnus with gmail imap

emacs,openssl,imap,gnus
I am trying to configure gnus to work with my gmail account. My .gnus file looks like this: (setq gnus-select-method '(nntp "news.gwene.org")) (setq user-full-name "George P. Burdell") (setq user-mail-address "[email protected]") (setq smtpmail-auth-credentials "~/.authinfo.epg") (add-to-list 'gnus-secondary-select-methods '(nnimap "gmail" (nnimap-address "imap.gmail.com") (nnimap-server-port 993) (nnimap-stream ssl) (nnimap-authinfo-file "~/.authinfo.epg") ) ) (setq smtpmail-stream-type 'ssl...

## Avoid font-locking interfering inside of comments

emacs,elisp,syntax-highlighting,font-lock,major-mode
In my font-lock-defaults I have: ("\$$^\\| \\|\t\$$\$$![^\n]+\$$\n" 2 'factor-font-lock-comment) The comment character is ! and this makes it so comments get the right face. This works mostly, except when there is a competing font-locked entity inside the comment, like a string (delimited by double quotes): ! this line is font-locked...

## How can you automate a find-dired query-replace?

emacs
M-x find-dired: you will be prompted for a root directory and a filename pattern. Press t to "toggle mark" for all files found. Press Q for "Query-Replace in Files..." you will be prompted for query/substitution regexps. How can you define a function like my-find-dired that goes through steps 1-3...

## emacs org-mode language of time stamps

date,emacs,org-mode
Depending on the computer I use, abbreviation for day names changes: it would be mon, tues, wed… on an american ubuntu and lun., mar., mer.… on a french ubuntu etc. This is causing problem with the org-habit module of org-mode which stop working correctly when those format are mixed. This...

## EMACS-Live + Slime error at startup

emacs,common-lisp,slime,kubuntu
Ok, I must be missing something obvious. I'm getting stuck since yesterday to launch Emacs-live + slime. I'm using EMACS 24.3.1, installed Emacs-live and it worked well (if I start emacs-live without Slime it works), downloaded Slime-Pack from git and added this line to .emacs-live.el (live-append-packs '(~/.live-packs/slime-pack/)) I'm on a...

## What is gdb -i=mi means

linux,emacs,gdb,emacs24
When starting the gdb from emacs, emacs asks if the gdb should be started as gdb -i=mi The option -i is not defined in the manpage of gdb. If the gdb is invoked from command line with option -i=mi it works. So it must be specific to gdb. Where is...

## Putting a :map property on an image

image,emacs,elisp
I'm trying to insert an image in emacs like this: (defun image-wipe-and-insert () (interactive) (let () (with-current-buffer (get-buffer-create "*an image area test buffer*") (switch-to-buffer (current-buffer)) (erase-buffer) (insert-image (find-image '((:type png :file "/usr/share/emacs/24.4/etc/images/icons/hicolor/128x128/apps/emacs.png" :map '((rect . ((0 . 0) . (50 . 50))) anAreaID (:pointer hourglass :help-echo "You found an area!"))...

## Emacs 24.5 install auto-complete error

emacs,autocomplete
I want to install auto-complete in Emacs, but there are always warnings. I use auto-complete on GitHub. I use the default config, but wrong: (add-to-list 'load-path "~/.emacs.d/plugin/auto-complete") (require 'auto-complete-config) (ac-config-default) I tried: (add-to-list 'load-path (file-name-as-directory (expand-file-name "~/.emacs.d/plugin/auto-complete"))) (require 'auto-complete-config) (ac-config-default) but it doesn't work. Windows 8.1 Emacs 24.5...

## Error in Dired sorting on Windows (with Cygwin Emacs)

windows,emacs,cygwin,dired
In a Cygwin Emacs on Windows, in Dired, if I try to sort by time (for example), I get the error: insert-directory: Listing directory failed but access-file' worked In a Windows Emacs binary on Windows, I do not have any problem, but Emacs uses its own implementation of ls IIUC....

## Emacs code hints in minibuffer. How do I get them?

emacs,code-hinting
I've looked all over the internet for this, and since I'm new to Emacs, I don't know what to search for. I'm not looking for mini-buffer completion for commands and such. I'm looking for code hints in the mini-buffer, as shown in this gif. I couldn't care less about the...

## How to omit certain folders on ido-switch-buffers and ido-dired?

emacs,dired,ido
I would like to ignore certain folders turning up via ido-dired when changing buffers in Emacs. These folders are system folders on a Mac and should not be removed otherwise, so at least I would like to hide them (especially annoying is, for example, ~/Documents which is suggested when one...

## match-* functions not behaving?

emacs,elisp
I'm trying to write a elisp function that marks a Python test function as green or red depending on the input. The arguments are pretty self-explanatory. The navigation part works, but the put-text-property part simply does nothing. I've tried eval-ing the match-* functions, but I cannot make sense of the...

## What is a good in-emacs process for finding emacs function names and keystrokes

emacs,helm
I am learning emacs and I think developing facility with emacs's built in help features would really smooth out the learning curve for learning keystrokes. What is an efficient process, using emacs's built-in help functions, to find the name of a command and its keystroke? For example, I've forgotten the...

## custom-set-variables add blank space on subsequent uses

emacs,elisp
I followed the emacs haskell tutorial, and couldn't understand some of its language regarding the use of custom-set-variables in the text quoted below. It seems that custom-set-variables should be used in one way on first usage, and another way (with added blank space) on subsequent uses. My questions are: What...

## Emacs config for scala development [closed]

scala,emacs
Can anyone point me to a repo to get a proper scala development config for emacs? I'm pretty new on emacs and I went through some tutorial regarding how to setup ensime for emacs, but I didn't succeed.

## MELPA pointing to non-existent version of multi-term?

emacs,package,melpa,multi-term
I am trying to use MELPA to install the emacs package "multi-term". When I do package-install multi-term, I get "http://melpa.org/packages/multi-term-20141203.1658.el: Not found". However, a more recent version http://melpa.org/packages/multi-term-20150220.1320.el is on MELPA. Why is emacs not installing this version?

## Yasnippet snippet for C/C++ while doesn't work correctly

emacs,yasnippet
I have just installed yasnippet package for emacs and am trying to configure snippets. Everything works fine except one particular snipet. File: ~/.emacs.d/elpa/yasnippet-20150212.240/snippets/cc-mode/while # -*- mode: snippet -*- # name: while # key: while # -- while (${1:condition}) {$0 } The problem is that when I use the snippet...

## Is there any mode for Rails' *.js.erb in emacs or I must use TextMate?

javascript,ruby-on-rails,emacs
I googled for "emacs js.erb" and got nothing valuable, Now I use web-mode for it, but obviously web-mode is not for *.js.erb: it can not auto complete the html tag, such as </div>. For <% ... %>, <%= .. %> and so on, it can not indent them. For javascript...

## Is there a package or setting to show an org-mode link (under cursor) destination in the modeline or other area of Emacs window?

emacs,org-mode
Is there a package or setting to show an org-mode link (under cursor - without using the mouse) destination in the modeline or other area of Emacs window? It would be nice to have instead of doing C-c C-l to look at it each time.

## ESS produces “Variable binding depth exceeds max-specpdl-size”

r,emacs,ess
I am trying ESS (Emacs Speaks Statistics). The problem is: Ctrl-P and the up-arrow are disabled on any buffer because of the following error: Variable binding depth exceeds max-specpdl-size The trigger is the following line in .emacs.el (require 'ess-site) This line is needed to load ESS. If I delete this...

## Run a command after every input to minibuffer

emacs,elisp
I want to set up a sort of ISearch mode replacement in Emacs, where I can run a command after every input to the minibuffer. Is it possible? EDIT 1: The idea is to completely replace ISearch with my own mode. Ideally, I'd like it to have most of the...

## Determining in emacs the module in which function is defined?

emacs,ocaml
Say I have the following open A open List let double = map (fun x -> 2*x) [1;2;3] In emacs with merlin-mode I can place the cursor on map and execute merlin-type-enclosing to get the type of map. Is there a similar command (in merlin, tuareg, or others) that can...

## how control the time span of highlighting searched word when press “*” under evil in emacs?

emacs,evil-mode
In evil mode, when press *, it will highlight the all the words the same under the cursor, but the highlight will disapper very soon. How can I control how long to keep the highlight? I am using prelude versiosn of emacs.

## OCaml Graphics.open_graph “Cannot open display …”

emacs,graphics,ocaml,x11
The last line of this code #load "graphics.cma";; open Graphics;; open_graph " 600x400";; returns the following error: Graphics.Graphic_failure "Cannot open display My-Machine.local" Since I use Emacs 24.4 in tuareg mode, on OSX 10.9.5, I've installed XQuartz 2.7.7 and tried to tune it (looked here). I checked whether Graphics is properly...

## how to detect if emacs is running in a terminal or a window?

emacs
I'm hoping to be able to branch on a flag in emacs to detect whether it is running in a terminal or a windowed app (i.e. the OS X Emacs app) Is there such a flag?...

## the most rudimentary ipython notebook questions from a first-time user:

python,emacs,ipython-notebook
Been using the safe and easy confines of PyCharm for a bit now, but I'm trying to get more familiar with using a text editor and the terminal together, so I've forced myself to start using iPython Notebook and Emacs. Aaaaand I have some really dumb questions. after firing up...

## emacs call-interactively and key simulation

emacs,elisp
I want to write a small function that saves the cursor's current position, mark the whole buffer, indents it and then goes back to the previous cursor position. I understand there might be easier way to achieve the same result but I'd like to understand how these principles work in...

## Change the default find-grep command in emacs

linux,emacs,fish
When I execute find-grep command in emacs, I got find . -type f -exec grep -nH -e {} +, since I'm using fish shell as the default shell, to make this command work I have to execute find . -type f -exec grep -nH -e \{\} +. I tried to...

## magit for pull --rebase upstream (not origin)

emacs,magit
Let's say we have an upstream git repository which is the official home of a project, and origin is our own remote git repository (e.g. a github fork). On the command line, I would rebase to the master before issuing a PR with git pull --rebase upstream master but how...

## How do I prevent org-mode from executing all of the babel source blocks?

emacs,org-mode,org-babel
I have an org file with lots of babel source blocks in it that only need to be re-executed when the code is changed. How do I prevent org from executing all of the blocks during export? In other words, set them all to manual execution only? I would prefer...

## Escape symbols shown in “git log view” (C-x v l) in Emacs

git,logging,emacs,escaping
When doing C-x v l on a Git versioned file in Emacs, I get its recent history but with escape symbols ^[[... See http://screencast.com/t/x1YWh4GKZR. What's wrong in my config?...

## Calling ssh with system in R shell eats subsequent commands

r,vim,emacs,ess,vim-r
My workflow is to send commands from an emacs buffer to an R session in emacs via the ESS package. a=0; system("ssh remotehost ls") a = a+1; When I run the three lines above in rapid succession (i.e. submit them to the R buffer), the value of a at the...

I am use org-mode blogging, I use org-babel to evaluate the code as following : #+BEGIN_SRC haskell import Data.Function (fix) f :: Int -> Int f = (+ 1) main :: IO () main = do putStrLn $show$ f 1 #+END_SRC #+RESULTS: : <interactive>:9:25: Not in scope: ‘f’...

## How to set a single key binding for a sequence of commands in Emacs

emacs,emacs24
The Emacs manual only has an example to set a binding for a single command. How to do so for a sequence of commands. Specifically the following. [M-down] to [C-u 1 C-v] [M-up] to [C-u 1 M-v] Which is practically single line scrolling....

## Emacsclient crashes when evaluating window functions

emacs,window,eval
To not bore anyone here with specifics, whenever I evaluate an expression similar to this one: emacsclient -t -e '(set-buffer *scratch*)' the client will flash up on the terminal and crash. This seems to be happening with all window-changing functions. Is the client not supposed to work like that? Running...

## what's difference between 'delete' and 'remove' in Emacs Lisp

emacs,elisp
I am learning Elisp by reading others' code. Then I found people use both delete and remove to delete element from sequence. I checked the document and the code of remove it seams just a wrapper for delete which when the sequence is a list, do a copy-sequence. Is it...

## Implementing streams with elisp

emacs,elisp,sicp
I'm reading section 3.5 of the SICP book, and I'm trying to implement streams using Elisp. The book implements streams using the Scheme language as follows: The core structure of a stream is a pair whose car is the current value of the sequence and its cdr is the promise...

## Confused when setting an Emacs face

emacs,elisp
(set-face-attribute 'diredp-dir-heading nil '(t (:foreground blue :background dark1))) What should be the right statements to set this face? Bow//...

## Emacs bindings documentation

emacs,elisp
I am writing some bindings to lambdas in my ~/.emacs and would like to have a description of what the function does appear when I do (for example) C-c ?. I tried to put a string immediately after lambda () but that still does nothing. How do I get something...

## Org-mode: How do I fold all levels but the current in a sparse tree?

emacs,org-mode
After doing C-c / to create a sparse tree, move the cursor to some interesting place and C-c C-c to remove highlights I'd like to be able to collapse all levels but the current one. Is there some way doing it? I'd like to maintain the cursor positioned in the...

## Transpose non-word function arguments?

emacs
When writing Haskell code in Emacs, I often end up in situations where I'd like to change: (foo, []) into ([], foo) If Emacs recognized [] as a word, then I could just use M-t to transpose-words and switch them. Is it possible to do this in a way that...

## Exceed evaluation depth when forward function in Emacs Lisp

emacs,lisp,elisp
Here is just a simplified code snipped I have not managed to work. I do not understand what is wrong. (defun enumerate-indicies (func) (let ((index 0)) (while (< index 5) (funcall func index) (setq index (1+ index))))) (defun enumerate-multiplied-indicies (func) (enumerate-indicies #'(lambda (index) (funcall func (* 10 index))))) The following...

## Emacs + SLIME + SBCL (Windows)

windows,emacs,lisp,sbcl,slime
I'm attempting to get Emacs, Slime and SBCL to work together on a Windows 7 machine. I use Linux typically, so I'm not experienced with the process. The problem is that I get this error when I attempt to start SLIME: Searching for program: permission denied, sbcl Here's my Emacs...

## Shell (zsh) through Emacs?

emacs,zsh
I usually run emacs in a terminal to work. I would like to run a shell inside a emacs window. I've found the shell command, but I would like to run the zsh I usually use inside (with my own configuration). Is it possible? EDIT : I succeeded to run...

## Is there a region change hook in emacs lisp?

emacs,elisp
I'm trying to get the content of current selected region in buffer. I'm aware of idle timer, but a hook should be more efficient/cleaner...

## How to use rlwrap in Gauche running on emacs in MinGW?

emacs,scheme
I am new to Scheme, and using gosh running on emacs buffer, in MinGW on Windows. It seems that people use readline or rlwrap to use history and more, but I still cannot figure out to accomplish the setting. Though it may be easy to run one on Linux using...

## Emacs - selection not showing in windowed mode

emacs
I have Emacs on a Kubuntu 15.04 OS and I have a problem in showing the selected region; if I run emacs in the terminal windows with -nw option, I can set marks and I see the selected region highlighted; but if emacs starts in a window, the selected region...

## org-mode built-in table editor on windows

windows,emacs,org-mode
I am using org-mode version 8.2.2 and Emacs 24.2.1 on Windows 7 and have been struggling with the alignment of org-mode tables. Creating a simple table in org-mode using the build in editor gives me an unaligned table unaligned table columns | first col | second col | third col...

## How can I do “svn diff” side-by-side in emacs.

emacs,diff,side-by-side
M-x vc-diff is cool. But not enough for me. Is it possible to diff side-by-side in emacs like GUI diff tools ? (kdiff3, meld)

## Emacs Search exact word

emacs,xemacs
I'm working in verilog most of the time, and my favorite editor is emacs. There a feature in vi (vim) I like but I don't know how to do it in emacs I would like to do an exact word search, for example - let's say I have this text:...

## Emacs hotkey for diffing buffer from file without reading (confirming) buffer name

emacs,elisp
I have made a hotkey that calls the diff-buffer-with-file command but then you have to hit enter to confirm that the file you are on is the one to correctly diff: (global-set-key (kbd "C-c e") 'diff-buffer-with-file). I looked up the documentation and saw that you also give &optional BUFFER, so...

## Elisp: how to make this function short

emacs,macros,elisp
I am implementing an plugin, which a lot of project types are remembered. For example: angular, meteor, ember, rails ... And keyed arguments are used. The function creates an hash table with provided keys and values, and assign the hash table to another hash table. Code below: (defun jst-remember-project-type (type...

## Search in current folder with helm-do-grep

search,emacs,helm
I have so small problem about in Emacs. I bind helm-do-grep command for Emacs. It's really useful. I want to search something in current folder. I searched some codes about that both of them are working but I don't have ability to fix them like what I want. If you...

## looking for help in configuring .emacs file for python (python.el),

emacs,python.el
My emacs version is 24.5, using in built python. I have written these lines in my .emacs for it: (require 'python) (setq python-shell-interpreter "C:/Python34") The problem is none of the commands (when I am trying to run test.py) are working. I have tried several commands named like M-x python-shell-* and...

## How to start Emacs For Mac OS X from the command line without blocking?

osx,emacs
A tip from the website of Emacs For Mac OS X suggests executing the following script to start it from the command line: #!/bin/sh /Applications/Emacs.app/Contents/MacOS/Emacs "\$@" However, this will block the command line until Emacs.app exists. Is there a way to start it from the command line without blocking?...

## How to pipe output from one external process into another?

emacs,elisp
I’ve written a function which takes the contents of the selected region and then runs it through two external processes. Effectively the behaviour I want to replicate is M-| smartypants -2 | ascii2uni -a D -q. The following function works, but requires two calls to call-process-region and temporarily storing the...

## Emacs mode/method for logic symbol placement in text?

emacs
I would like to put actual logic symbols into my emacs buffers, e.g., the logic symbol "∀" or "∃" or "⇒", directly into my (fundamental) text or .org or whatever buffer. I found xmsi-math-symbols-input.el at ErgoEmacs, but I'm wondering if this is "best practice." Maybe the best practice is to...

## Using vim to develop instead of Emacs on Windows

vim,emacs
I have used Emacs for a long time, say, 6 or 7 years. And it seems that I got Emacs Pinky somehow. Now I am trying to switch to vim, and it's a very good editor, just like Emacs, except that I wonder how you guys develop with it. Using...

## emacs: Symbol's function definition is void: loop

emacs,elisp,emacs-prelude
I am testing on loading packages in emacs init.el (Emacs 24.3). I followed a blog by the author of emacs prelude to automatically load packages, and copied the code there into my init.el as in the bottom. However, I got an error message about the loop function/symbol, which says: Symbol's...

## Print org-mode files

emacs,printing,org-mode
I'm wondering how you guys do print your org files from emacs? Like when you have a meeting and you can't bring your laptop so you quickly print your main TODO list to have something to work on! Do you export org files to another format before printing? PDF? Latex?...

## Result value of elisp code stored in a file?

emacs,elisp,emacs24,dot-emacs
Looking for a way how evaluate elisp code stored in an external file and pass its result as a function argument. Example demonstrating what I'd like to achieve follows: ;; content of my_template.el '(this is a list) ;; content of .emacs where result of my_template.el has to be used (define-auto-insert...