wasamasa
  • Member for 7 years, 4 months
  • Last seen this week
match-data fails to consider only last search with string-match and persists across sessions
Accepted answer
4 votes

The match object you're accessing is global and may be changed by any piece of lisp code. Therefore you should immediately check its state. The following piece of code shows how and exhibits the ...

View answer
Invalid read syntax "#"
Accepted answer
4 votes

Use a straight quote ('), not a typographically correct one (’). This goes for programming in general, nearly all languages out there stick to the ASCII character set. Emacs helpfully displays the ...

View answer
How can I get RET to follow org-mode links when using evil-mode?
4 votes

The easy way out is to unbind RET for Evil as it isn't bound to a useful command anyway. This will let Emacs look it up in keymaps with less priority. You can do the same with SPC and TAB (keep in ...

View answer
Does `car` on an non-lazy function generated list evals the whole list?
Accepted answer
4 votes

The question misses the point. Sure, suppose you do (car huge-list), the evaluator will eval huge-list by checking for its type, finding that it's a symbol, looking it up in the environment and ...

View answer
How do I automatically enter evil-insert-state after running the org-add-note command?
Accepted answer
4 votes

Your example is almost correct, but uses a non-existent hook. This is not considered an error by the interpreter because hook variables don't have to be defined before adding a function to them, this ...

View answer
Error with helm-swoop
4 votes

This is a known issue caused by a breaking change in Helm: https://github.com/ShingoFukuyama/helm-swoop/issues/123. Feel free to manually apply a fix from https://github.com/ShingoFukuyama/helm-swoop/...

View answer
Show tooltip even if there is only one candidate in company-mode
Accepted answer
4 votes

company-preview-if-just-one-frontend is one of three frontends in company-frontends. To not use it, you'll need to remove it from that list and replace company-pseudo-tooltip-unless-just-one-frontend ...

View answer
Installing Emacs from source: no 'configure' file
Accepted answer
4 votes

This line only applies to release tarballs (hence why it says "unpacked") which come with a configure script. For the git checkout you'll need to generate it with ./autogen.sh. Be sure to check out ...

View answer
What's the most reliable way to get the start and end positions of current symbol under cursor?
Accepted answer
4 votes

The thingatpt.el API works as follows: (thing-at-point 'symbol) ;=> foo (beginning-of-thing 'symbol) ;=> 42 (end-of-thing 'symbol) ;=> 45 (bounds-of-thing-at-point 'symbol) ;=> (42 . 45) ...

View answer
(Evil) Binding "q" to "View-quit" in view mode (instead of "evil-record-macro")
Accepted answer
4 votes

Interestingly enough, Evil does define an initial state for view-mode, but it won't do anything because view-mode is a minor mode and initial states are for major modes only. The correct way to ...

View answer
Is http://tromey.com/elpa/ deprecated?
Accepted answer
4 votes

Tom Tromey, who happens to be the author of package.el, put up the very first ELPA which is still available on his domain. However you should no longer use it and instead just refer to GNU ELPA which ...

View answer
Why does this straightforward use of a closure fail?
Accepted answer
4 votes

There's a few pitfalls here: Using eval with lexical-binding will fail unless you pass it an alist environment argument holding the bindings in question (see F1 f eval) Looking up symbol slots only ...

View answer
How can I switch whitespace-mode enabled/disabled by key?
Accepted answer
4 votes

There is a set of conventions for minor modes documented in the docstring of define-minor-mode: The defined mode command takes one optional (prefix) argument. Interactively with no prefix ...

View answer
Whitespace-mode tab mark disturb my indentation
Accepted answer
4 votes

This is a known problem as made evident in a comment in whitespace.el: (defcustom whitespace-display-mappings '( (space-mark ?\ [?\u00B7] [?.]) ; space - centered dot (...

View answer
Use colors specified in terminal emulator for emacs
4 votes

If you run emacs -nw, you can list all valid color names that can be used in the terminal. Here's an extract from M-x list-colors-display: black #...

View answer
Using 'jk' to exit insert mode with key-chord or anything else
Accepted answer
4 votes

FWIW, I cannot reproduce the condition as reported above. It would be helpful if you could share a minimal configuration that can reproduce this error of yours. An alternative way of solving this is ...

View answer
Move evil tag to beginning of mode line
Accepted answer
4 votes

Evil does modify the mode line on its own and refreshes it regularly (according to the code at activation and state changes). The placement of its tag depends on evil-mode-line-format, theoretically ...

View answer
How to browse through the gdb command history in gud?
Accepted answer
4 votes

Emacs does generally use C-p and C-n for moving the cursor up and down, <up> and <down> are usually bound to the same command. That's why you get the unfamiliar behaviour of the arrow ...

View answer
Word wrap that preserves indent from previous line
Accepted answer
4 votes

word-wrap is pretty special variable as it's a variable that controls how Emacs' display engine operates when showing a buffer in a window. It is accompanied by wrap-prefix which allows you to ...

View answer
File name autocomplete with dropdown
Accepted answer
4 votes

company-mode has a files backend:

View answer
Distinguish between blank lines at end of buffer and bottom of window?
4 votes

Someone wrote a package that manages an overlay spanning the area after the end of the file: https://github.com/jmickelin/vim-empty-lines-mode Keep in mind though that while this solution behaves ...

View answer
classify and determine maximal element
Accepted answer
4 votes

While the extent of Emacs packages may suggest otherwise, Emacs Lisp is pretty small for historical reasons. To remedy this situation, one can use packages like the built-in CL library or the ...

View answer
?? in the modeline instead of the line number
Accepted answer
4 votes

I did replace the value of line-number-display-limit-width with something substantially smaller eventually and that fixed the issue for me. Judging by the code in xdisp.c Emacs is using a heuristics ...

View answer
Variable not parsed inside other variable definition
Accepted answer
4 votes

The quote (') causes the following expression to be not evaluated, therefore blog-username and blog-password are not evaluated to their string values, but instead taken as symbols. One way of getting ...

View answer
Display other text centered
Accepted answer
4 votes

While my solution doesn't really center, it comes close enough I hope. There is a display property that adjusts the width of all spaces, if I use the string ≡ and make its spaces half the width, it ...

View answer
How to get the server-name?
4 votes

In a client instance the variable server-name is bound and contains the server name. (and (boundp 'server-name) server-name)

View answer
Major mode map in emacs
Accepted answer
4 votes

That information is a F1 v auto-mode-alist away which displays the variable auto-mode-alist that holds the associations between file names and major modes. As its docstring points out similiar lists ...

View answer
Interrupt ELisp interpreter from outside Emacs?
Accepted answer
4 votes

It's possible to unconditionally enter the debugger by sending the value of debug-on-event (should be USR2 by default) as signal as documented in the Error Debugging section in the Emacs Lisp manual. ...

View answer
How can I stop emacs from highlighting whitespace?
Accepted answer
4 votes

You should generally start Emacs with emacs -q to make sure it's not your configuration. If that doesn't get rid of it, but emacs -Q does, chances are it's the way your Emacs was packaged or a site ...

View answer
How can I read a single character from the minibuffer?
4 votes

call-interactively is what interprets the (interactive "cPROMPT") specification, the c option is dispatched to read-char. Therefore, the following should work in a non-interactive context: (read-...

View answer
1
3 4
5
6 7
13