Questions tagged [elisp]

Emacs Lisp is the extension language for the GNU Emacs text editor, and in fact, most of the functionality of Emacs is implemented using Emacs Lisp. Users generally customize Emacs' behavior by adding Emacs Lisp statements to their `~/.emacs`, or writing separate packages.

Emacs Lisp is the extension language for the GNU Emacs text editor, and in fact, most of the functionality of Emacs is implemented using Emacs Lisp. Users generally customize Emacs' behavior by adding Emacs Lisp statements to their ~/.emacs or ~/.emacs.d/init.el file, or writing separate packages. A guide to learning Emacs Lisp for non-programmers can be found here.

Emacs Lisp differs from most other lisps in two main ways:

  1. It has special features for scanning and parsing text, as well as features for handling files, buffers, arrays, displays, and subprocesses. This is due to the fact that it is designed to be used in a text editor.
  2. It uses primarily dynamic scope as opposed to lexical scope. This was done very intentionally, the reasons are well explained in the 1981 paper on Emacs. Lexical scope has been introduced only recently and, while not yet widely adopted, is expected to become increasingly important in future versions according to the manual.

Wisdom from the Stack

Emacs on Stack Exchange

3773 questions
20
votes
2 answers

Emacs :TODO indicator at left side

I want to have sort of indiacator at left side of the line wherever I have in the source code #TODO: some comment //TODO: some comments The indicator could be a just mark and I already enabled line numbers displayed at emacs.
user90150
20
votes
3 answers

Emacs lisp: Concise way to get `directory-files` without "." and ".."?

The function directory-files returns the . and .. entries as well. While in a sense it is true, that only this way the function returns all existing entries, I have yet to see a use for including these. On the other hand, every time a use…
kdb
  • 4,098
  • 26
  • 49
20
votes
6 answers

Guile and Emacs?

I'm learning Emacs Lisp and I came across this decade old post saying that at some point Guile (Scheme) will replace Emacs Lisp, or Emacs will be rewritten with Guile.…
anon
20
votes
3 answers

Let Emacs move the cursor off-screen

Is it possible to let Emacs have the cursor be moved off-screen, like most GUI text editors work? This is one of the biggest things that bothers me when I use Emacs over any GUI editor. When I scroll down, the cursor is "pushed forward" by the top…
asmeurer
  • 86,894
  • 26
  • 169
  • 240
19
votes
2 answers

Mapping a function over two lists in elisp

In common lisp I can do this: (mapcar #'cons '(1 2 3) '(a b c)) => ((1 . A) (2 . B) (3 . C)) How do I do the same thing in elisp? When I try, I get an error: (wrong-number-of-arguments mapcar 3) If elisp's mapcar can only work on one list at a…
Tyler
  • 9,872
  • 2
  • 33
  • 57
19
votes
7 answers

How to automatically do org-mobile-push org-mobile pull in emacs

Since I am using org-mode to track my todo list in emacs, I like the iPhone app: MobileOrg, with it, I can access my todo list all day. But here's the problem: I have to manually org-mobile-push my changes from local file to mobile phone through…
user1087032
  • 755
  • 1
  • 6
  • 8
19
votes
1 answer

Java Coding Style & Emacs cc-mode configuration

I'm using GNU/Emacs HEAD with the included cc-mode (c-version 5.32.2) on a GNU/Linux Debian machine. I'm trying to define a custom style to manage the Code Conventions for the Java Programming Language, Android's Code Style Guidelines for…
Renaud
  • 8,783
  • 4
  • 32
  • 40
19
votes
4 answers

Emacs - how to see/how to debug a single elisp function/emacs command

There is one thing that I don't like on table function in Org-mode for emacs. I would like to see all the functions that get executed by function that I run as Emacs command. What is the best way to do that? Any tips how to get started with debuging…
Jarek
  • 7,425
  • 15
  • 62
  • 89
19
votes
5 answers

Make Emacs ESS follow R style guide

I've been using Emacs/ESS for quite a while, and I'm familiar with Hadley's R style recommendations. I'd like to follow these conventions in ESS, like those nice spaces around operators, space after comma and after if statement, before curly braces,…
aL3xa
  • 35,415
  • 18
  • 79
  • 112
19
votes
4 answers

what does the dot in the following emacs command mean

Here is some doco I'm creating but... I'm not sure what the dot '.' between the extension and the mode is for though in the following: File Associations Example: Associate *.mmd with markdown-mode: (setq auto-mode-alist (cons '("\\.mmd$" .…
ftravers
  • 3,809
  • 3
  • 37
  • 38
19
votes
2 answers

elisp macro to write a function?

I have written a few nearly identical functions, except for their names. For example: ; x is name, such as function/paragraph/line/etc. (defun my-x-function (interactive) (mark-x) (do-more-stuff) (modify-x)) Is there a way to automatically…
Anycorn
  • 50,217
  • 42
  • 167
  • 261
19
votes
4 answers

Emacs: highlighting TODO *only* in comments

This question is related to another one, Emacs :TODO indicator at left side. I recently came across a minor mode I like a lot called FixmeMode. It supports auto highlighting of TODO marks, and navigating between them. However, I think it makes more…
Wei Hu
  • 2,888
  • 2
  • 27
  • 28
19
votes
2 answers

Can I detect the display size/resolution in Emacs?

I'd like to change the window/frame size of my XEmacs based on the current display resolution. This is useful when I run my laptop either by itself or attached to a docking station with an external monitor. In either situation, I'd like Emacs to…
David R Tribble
  • 11,918
  • 5
  • 42
  • 52
19
votes
3 answers

emacs marmalade: "Cannot open load file", "package"

I'm using emacs 24 and would like to install marmalade. I've tried adding the following to my ~/.emacs file, as per the instructions on http://marmalade-repo.org/: (require 'package) (add-to-list 'package-archives '("marmalade" . …
The Unfun Cat
  • 29,987
  • 31
  • 114
  • 156
19
votes
1 answer

Why use #' before function arguments in emacs-lisp?

I'm familiar with Emacs Lisp, but not Common (or any other) Lisp. Some Lisp programmers suggest (e.g. A basic function for emacs) that it's good to use #' in front of function arguments in Lisp code. For example: (mapc #'my-fun '(1 2 3)) In Emacs…
seanmcl
  • 9,740
  • 3
  • 39
  • 45