All Questions

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
207 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
477 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
493 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 ...
7
votes
1answer
785 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
301 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
64 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 ...
19
votes
3answers
980 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
886 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
404 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
1k 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
116 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
691 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
187 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 ...
61
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
513 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
973 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 ...
14
votes
1answer
1k 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 ...
5
votes
5answers
3k views

How to run a previous command in an Emacs shell?

Of course when I am in Terminal and I press the up arrow key, it goes to the previous command. However, when I hit the M-x keys and type shell an integrated shell comes up in Emacs: However, if I ...
4
votes
4answers
329 views

Prevent abbrev-mode from expanding on underscore

Abbrev-mode seems to think an underscore signals a new word, which is not the case in many programming languages. I want it to expand after spaces, newlines, and tabs; not after underscores. Is there ...
5
votes
3answers
377 views

Cycle between windows in all frames

I currently use the following custom command to navigate between windows and frames: (defun nispio/other-window (&optional arg) "With prefix argument, select the next frame. Otherwise, select ...
4
votes
1answer
396 views

ESS indentation of parentheses after =?

Indentation in ESS is occasionally a little kooky, and I'm trying to figure out if the kookiness is a bug or a feature. How does one get proper indentation of parentheses after an "=" sign in ESS (...
16
votes
3answers
1k views

Set column widths in `ibuffer`

Is there a way to customize the widths of the columns in ibuffer? Specifically, I want to widen the Name column to be able to read more of the buffer names before they get truncated. I have tried ...
7
votes
1answer
125 views

Batch loading binary files

I just discovered vlf-mode (View Large Files) and I am using it to view a large binary file in hexl-mode and read certain metadata from headers within the file. It works great, with one exception. ...
7
votes
1answer
663 views

Creating permalinks for sections in HTML exported from org-mode

By default when org-mode documents are exported to HTML, the section and sub-section links look like file:///path/to/export/location/doc.html#sec-1-1 The problem is that the above link won't point ...
9
votes
4answers
2k views

Recursively open files matching regexp in marked directories

Generally speaking, I would like to be able to open all files within a given set of directories (and their subdirectories) where the filename matches a given regexp. For example /home/nispio/...
13
votes
7answers
4k views

Evil: map keybindings the vim way?

I am trying to make the Evil function evil-jump-to-tag, C-] behave like the Emacs binding M-.. The normal behaviour is fine for browsing Tags files, but I want it to work also for Slime's slime-edit-...
4
votes
2answers
624 views

Problems installing packages via elpa that require cl-lib-1.0

I'm having problems installing package from (m)elpa which require cl-lib-1.0. My emacs version is 24.3, hence I have a builtin copy of cl-lib-1.0, however, the only version available via elpa is 0.5. ...
1
vote
1answer
425 views

How to diagnose why semantic-imenu does not correctly parse a file?

When spelunking through Java code, I rely heavily on the semantic integration through the use of helm-semantic-or-imenu to navigate to different functions in a file. This works great for simple to ...
65
votes
10answers
8k views

How do I prevent extremely long lines making Emacs slow?

I see hugely varied performance depending on how many newlines there are in the file I'm visiting. Here's an example. I have two JSON files: $ wget https://github.com/Wilfred/ReVo-utilities/blob/...
18
votes
4answers
12k views

Best ways of generating UML from within Emacs

There are a bunch of integration options between Emacs and UML tools, like org-mode's plantuml embedding, a plantuml major mode etc. Of course I can try them out but I'm wondering what other people ...
21
votes
1answer
965 views

How to implement Markdown style link IDs in org-mode?

At times, I need to use the same link at multiple places in a long document. For those cases it would be useful to have link IDs like in markdown. From markdown syntax ref, You can optionally use ...
2
votes
1answer
435 views

Show breakpoints when debugging Matlab

I am using matlab-emacs to debug a matlab script from inside of emacs with GUD. Everything seems to be working as expected except that I don't see any breakpoint indicators in the fringe. This is ...
8
votes
2answers
315 views

Split Window at outermost border

I'm looking for a way to add a new full-height window split to an existing (splitted) window configuration. Because I don't know how to explain it properly I'll just post some ASCII graphics showing ...
10
votes
5answers
4k views

How to Change size of split screen emacs windows?

If I have Emacs split horizontally and on top I'm editing elisp code and on the bottom I am in the shell. By default, Emacs makes the two windows equal in size, but I'd like the shell buffer smaller. ...
5
votes
1answer
211 views

Inadvertent paste when correcting spelling mistakes using flyspell

When I click with the middle mouse button that usually inserts the primary selection at the point where I clicked. However, the same button opens flyspell's context menu when I click on a misspelled ...
4
votes
3answers
107 views

Inconsistent point when inserting into a buffer that is visible in another frame

While working on a sort of "background processing" function, I noticed that my logs would print backwards if the buffer was in another frame. I cannot seem to figure out why it is happening. I am not ...
2
votes
1answer
1k views

How do I reduce spacing between lines to less than zero?

Using the Emacs GUI, I get a certain amount of spacing between each line of text. By default this spacing seems to be zero, but can be increased by customizing line spacing. This is the default of ...
6
votes
2answers
610 views

Elisp function to see a date for next Wednesday

Admitting up front that I am not capable of much Lisp, I have found ways to produce the current date or a number of seconds from a date, but I am looking for a simple equivalent to shell command like ...
17
votes
2answers
2k views

How can I toggle displaying images in eww without a page refresh?

I use eww to browse the internet and more often than not I do not want images to load, there doesn't seem to be much in terms of customizations built in for eww and none dealing with images. ...
5
votes
1answer
227 views

Get Emacs to indent fluent builder inside argument list

So emacs's java-mode handles indenting continued method invocations at the function body level out of the box, but it doesn't seem to handle them inside of an argument list. I'd like to override this ...
5
votes
1answer
642 views

Tramp: killing all buffers

Whenever I use ssh over Tramp to get to my local server (either with dired or pointing directly to a file), another buffer is also created: #<buffer *tramp/ssh user@local_server_address*> When ...
7
votes
1answer
1k views

How to have org-publish automatically publish generated images?

I use org-publish to publish HTML exports of org-mode files quite often to share documents with my coworkers, however, I generate a lot of diagrams with plantuml and gnuplot. These diagrams aren't ...
26
votes
2answers
9k views

exec-path and $PATH

I have seen examples online where people add paths to the default path in Emacs with: (add-to-list 'exec-path "/usr/local/bin/") I am new to Elisp, and I think I understand what the statement above ...
12
votes
1answer
493 views

how to detect if inside a LaTeX math environment?

Q: is there a way to detect if point is inside a LaTeX math environment? How would one detect whether point is or is not inside a LaTeX math environment, whether delineated inline by $...$ or by ...
13
votes
2answers
343 views

Magit pushing / pulling show progress

I'm missing some visual indication of the push / pull progress. After executing the appropriate command, magit prints Pushing to domain.tld:repo.git however, no further indication of the ...

15 30 50 per page