Tom Tromey
  • Member for 7 years, 3 months
  • Last seen more than a month ago
Writing Emacs Packages in Java
Accepted answer
11 votes

You can't directly write an Emacs package in Java. There is currently no way to extend Emacs in Java, nor is there a Java to Elisp transpiler. It's common, though, to have Emacs run other programs ...

View answer
Heredoc or equivalent multiline string syntax in Elisp?
Accepted answer
7 votes

Ordinary Emacs Lisp strings are multi-line-capable. You can simply put newlines in them. Glancing at cl-heredoc, it sounds like what you are looking for is "raw" strings. There was a proposal to ...

View answer
Set variables based on path without using directory-local variables
Accepted answer
6 votes

Directory-local variables were actually designed for this use case as well. Read the docs, especially at the end, where it discusses dir-locals-set-directory-class. The idea here is that you can ...

View answer
Emacs wrongly indent else expression in Python code
5 votes

This is just a bug. It's fixed in Emacs trunk. Maybe you can grab a newer version of the mode from there, or dig the bug fix out of the git history.

View answer
How do I check if two regions have identical content?
4 votes

Interactively, I do this one of a few ways, depending on the scenario. First, if the regions are small -- e.g., lately I've been comparing some test output with the expected results, and both are ...

View answer
Creating an association list with element evaluation
3 votes

An alist is just a list. So, you can use all the normal list-constructing functions like cons or list. Or, if you want to write one that looks like a constant, you can use backquote: `((,(rose) . ...

View answer
Using different gdb in emacs
Accepted answer
3 votes

When you M-x gdb, Emacs will present you with a command-line in the minibuffer, like: Run gdb (like this): gdb -i=mi something You can edit this to supply a path to gdb, like: ~/my/install/bin/gdb -...

View answer
When to use transaction queues?
Accepted answer
3 votes

One thing to know about Emacs is that there are a lot of obscure libraries that come with it. And, far from being a historical oddity, more go into the tree all the time. Many times these were ...

View answer
How does emacs mark the stack for GC
2 votes

but what happens when by pure chance a block of memory stores a valid Elisp object even when it is not supposed to be one? Emacs conservatively marks the stack, which means that it examines each word ...

View answer
Emacs indent with tabs to 2 columns
2 votes

The Ruby editing mode defines ruby-indent-tabs-mode and sets indent-tabs-mode to that value when the mode is invoked. The default for this is nil. To fix your problem, set this variable instead. ...

View answer
why is emacs indenting when I type an open paren
2 votes

Without more information it is hard to say why the indentation level is incorrect. The reason some keys indent in some modes is that those modes rebind them. For example, the open paren in C (and C-...

View answer
Octave-mode disable octave-sync-function-file-names on save
Accepted answer
1 votes

There's no such variable. However, you can still do this, by removing the function from before-save-hook. This is untested, but try: (remove-hook 'before-save-hook 'octave-sync-function-file-names ...

View answer
Read process output line by line
1 votes

The only thing I know of for this is setting process-adaptive-read-buffering to nil before starting the process. I don't know whether this will help with your situation or not.

View answer
Change Default Compiler Within Emacs?
1 votes

I think this is more of a shell question than an Emacs one. One way to do this is to put a shell script named "cc" early in your $PATH and have it invoke your preferred compiler. Make sure Emacs has ...

View answer
Debugging a "binding stack not balanced" bug?
Accepted answer
1 votes

Here is how I would debug this: First, find the failing bytecode. This ought to be the function on the stack just before the call to error. In this case it seems to be open-network-stream. ...

View answer
Signal a buffer was evaluated in an inferior process?
Accepted answer
1 votes

Looking at the code, I didn't see an obvious hook that is run. However, the problem can still be solved using advice. I would suggest using "after" advice on python-shell-send-string. You could ...

View answer
Make the mode-line display percentage and not "Top/Bottom/All"
0 votes

The built-in code for %p just looks at window-start and point-max and computes the percentage that way. You can find this out using C-h f format-mode-line and then following the link to the Emacs C ...

View answer
Is it possible to have word-wrap as standard but truncate some lines in a buffer at the same time?
0 votes

It depends on exactly what you want to do. In the comments, Malabarba links to a blog post that may show the way. However, I think this approach relies on (programmatically) modifying the buffer ...

View answer
How can I split paragraph into one-line-per-sentence but still keep it wrapped visually?
0 votes

If I understand the problem correctly, it is that you would like to preserve all the newlines in the buffer as they are; but you would like to display some of them as spaces. Then, you'd like word-...

View answer