Damien Cassou
  • Member for 7 years, 2 months
  • Last seen more than a month ago
Is there a function like `assoc` that returns all matching values?
5 votes

Another solution involving seq-filter: (seq-filter (lambda (elt) (equal (car elt) 'foo)) '((foo . 5) (bar . 6) (foo . 7)))

View answer
Javascript ES6, React, and EMACS
3 votes

I suggest you install Indium (https://indium.readthedocs.io/) to get a stepping debugger, REPL and object inspector. Tern, company-tern, and js2-mode, js2-refactor, xref-js2, eslintd-fix, gulp-task-...

View answer
How to use an external program as the default way to open PDFs from Emacs?
3 votes

I'm using runner. Here is an excerpt of my configuration file (defun my:open-file-with-dired (file) "Ask dired how it would open FILE. This code is useful if dired is well configured to ...

View answer
Custom theme based on major mode or file type
Accepted answer
2 votes

A theme is mostly a set of variable names and values. Enabling a theme means setting each variable to its correspond value in the theme. The variables are changed globally, i.e., for every buffer, ...

View answer
Org-mode calendar integration?
2 votes

When in org-agenda, you can press c to open a Calendar on the date at point. In a calendar, you can press c to open org-agenda on the date at point.

View answer
How can I pass the NO-LINE-BREAK argument to base64-encode-region in M-x?
Accepted answer
2 votes

You must add this function to your initialization file (either .emacs.d/init.el or .emacs): (defun my/base64-encode-region-no-break () (interactive) (base64-encode-region (mark) (point) t)) This ...

View answer
Is it possible to have a global prettify-symbols-alist that other modes add to?
2 votes

Modes usually inherit from each other. For example, java-mode inherits from prog-mode which inherits from fundamental-mode. Similarly, many modes inherit from special-mode. If you add a function to ...

View answer
How can I view accent characters natively?
2 votes

I guess the encoding of your file is not properly detected. Typing C-x RET r windows-1252 RET should display your file properly as it forces Emacs to interpret the file as windows-1252 and not utf-8 ...

View answer
Email Code Snippets through Emacs (with Mutt)
2 votes

You might want to use HTML for that. I advise you to use Org-mode's syntax to write your email and then use the org-mode's HTML exporter. Because you are a lucky guy, you can use org-mime to do just ...

View answer
Lexical binding in a process filter
1 votes

In a private email, Christopher Wellons answered my question. The problem is that server-process is a special variable defined in server.el. Special variables are always dynamically bound. As a result,...

View answer
Setting Default Font in Emacs 26.1
1 votes

Try to add the following to your init.el file and change the font family and height to whatever you want. (defun my/setup-frame (&optional frame) "Configure look of FRAME. If FRAME is nil, ...

View answer
"File error" when using xclip
Accepted answer
1 votes

The xclip Emacs package depends on the xclip command-line application: https://github.com/astrand/xclip. The xclip application is usually provided by Linux distributions so you should look at your ...

View answer
smart code generation macros
Accepted answer
1 votes

Emacs packages usually don't directly implement what you suggest because that requires a deep understanding of the language semantics which they typically don't have. A common approach is to get an ...

View answer
Using an advice to set default parameters in a interactive function
Accepted answer
1 votes

You can create your own command to set all variables before starting ERC: (defun my/erc-freenode () (interactive) (let ((erc-plist (car (auth-source-search :host "irc.freenode.net"))) (...

View answer
JSON file folding and step-by-step unfolding
Accepted answer
1 votes

The json-navigator Emacs package displays any JSON document in a tree-like structure. It uses the hierarchy package.

View answer
Getting a org link to an mu4e message
0 votes

Open any Org buffer, type C-c C-l (org-insert-link, as suggested by Heikki) and then RET to select the default link. This will insert the latest copied link. No need to capture anything :-).

View answer
How to override projectile keybind for custom one?
0 votes

Load order matters. The latest global-set-key overrides the former ones. Make sure yours is evaluated after the one you want to override.

View answer
How to unbind a key from a command in general.el?
0 votes

To unbind SPC in dired-mode, you can write something like this: (define-key dired-mode-map (kbd "SPC") nil) I don't know general.el but I guess you should be able to do something similar.

View answer
How to use helm to complete sources which are lines in a buffer?
Accepted answer
0 votes

Here is what I came up with: (defun my--helm-source-init () (helm-candidate-buffer <buffer containing data>)) (defun my--helm-source-select-action (candidate) (loop for candidate in (helm-...

View answer
Why does GUI emacs take longer to start?
0 votes

I'm not sure you can optimize emacs -Q that much. But if you want to know which packages take time to launch and optimize at this level instead, I strongly advise you to have a look at use-package: ...

View answer
Replacing buffer content without losing point
-1 votes

You may try using Markers, their purpose is to remember position when text is modified.

View answer