Most Popular

1500 questions
9
votes
2 answers

How to implement the piping operator %>% in ESS mode?

Recently, R witnessed the smart introduction of the piping operator %>% or then operator in code which I use quite frequently nowadays. I wonder if this has already been implemented in the newest version of ESS. If not, it shouldn't be a problem to…
doctorate
  • 1,789
  • 16
  • 39
9
votes
2 answers

Default commit comment for magit

Is there a simple way to have default text pre-populate in the comment buffer when commiting code with magit?
qhfgva
  • 91
  • 2
9
votes
1 answer

How to cancel the minibuffer from the main buffer

Suppose that I do M-x blabla without pressing return and then I switch to the main buffer. If the curser is at minibuffer I can cancel the mini-buffer by the shortcut C-g. But if the cursor is at the main buffer, this shortcut doesn't cancel the…
Name
  • 7,689
  • 4
  • 38
  • 84
9
votes
3 answers

Set region to include enclosing parentheses

Starting with the point or active region, how do I quickly (in one keystroke / command) 'expand' to include the next set of enclosing parentheses? If I start with: (| means point) (defn foo [x] (+ x |42)) Or if I start with: (< and > bracket the…
David J.
  • 1,809
  • 1
  • 13
  • 23
9
votes
2 answers

Restoring windows and layout after an Ediff session

Looking for a solution on how to restore my window layout after an Ediff session, I found a blog post, where the author suggests: (winner-mode) (add-hook 'ediff-after-quit-hook-internal 'winner-undo) This seems to almost work well for me. I say…
Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47
9
votes
2 answers

case-sensitivity of word completion using dabbrev

I sometimes use M-/ to complete words but it is not case sensitive. For example : the word is : showPublic and when I write show and then put M-/, It completes as showpublic. How can I fix this ? Or at least, how can I see the possible completion ?
Vivian Maya
  • 787
  • 1
  • 6
  • 17
9
votes
6 answers

When is the first element in the argument list regarded as a function symbol and when not?

I'm learning elisp, and I just learned that the first element of a list is interpreted as a function symbol. I then learned how to define a function with defun. Here's the example from An Introduction to Programming in Emacs Lisp (defun…
norio
  • 191
  • 4
9
votes
2 answers

Org: Add front cover for LaTeX/PDF export?

I want to add a front cover for my Org document which will export as a PDF (#+LaTeX_CLASS: article). I don't want to modify my org-latex-classes and apply globally. I tried to add the following block before first outline of the Org document, but it…
kuanyui
  • 1,020
  • 6
  • 16
9
votes
3 answers

in org-mode, how to insert timestamp with today's date?

In a Lisp function, how do I instruct org to automatically insert a timestamp with today's date? I found the function org-insert-time-stamp, but I don't know how to provide an argument for it that will return today's date. The documentation for the…
incandescentman
  • 4,111
  • 16
  • 53
9
votes
3 answers

Recursively find all files from a folder containing a regexp in the filename, using helm

How can I find all files from a folder and its subfolders recursively, containing a regexp in the filename, using helm? For example: how to search for all files with the extension .el and containing the string dired in the directory emacs-24.3 its…
caisah
  • 4,056
  • 1
  • 23
  • 43
9
votes
1 answer

How to prevent tramp locations from interfering in history?

I have an issue where if I try to perform some random Emacs operations such as org-capture, or renaming a file to a different (local) directory in dired, Emacs attempts to contact a different machine using tramp, presumably for some sort of…
Lee H
  • 2,697
  • 1
  • 16
  • 31
9
votes
3 answers

How can I make python-mode correctly indent python's match statement?

Python 3.10 added a match statement. When I try and type one in emacs 27.2, it does not indent it correctly, presumably because it does not yet have support for it. How do I get python-mode to indent the match statement correctly?
Rob Gilton
  • 221
  • 1
  • 4
9
votes
1 answer

Error retrieving: https://elpa.gnu.org/packages/archive-contents

This is with the latest Emacs Version 27.2 (9.0) for Mac OS X: error in process sentinel: Error retrieving: https://elpa.gnu.org/packages/archive-contents (error connection-failed "connect" :host "elpa.gnu.org" :service 443) [2 times] I can access…
clay
  • 193
  • 3
9
votes
3 answers

Package cl is deprecated, is there any easy fix for it?

For the warning of Package cl is deprecated is there any easy fix for it? Here is a piece of code I copied from somewhere (that I don't know how to fix): (eval-when-compile (require 'cl)) (defun sanityinc/add-subdirs-to-load-path (parent-dir) …
xpt
  • 447
  • 3
  • 16
9
votes
1 answer

How to make `C-x 9` the same as `C-x 8 "`

For typing german text with an english keyboard layout the binding C-x 8 " is very valuable. After typing it I can insert umlauts easily. Here is what which-key shows me after typing C-x 8 " I use this so often that I would like to use C-x 9 as an…
Kaligule
  • 319
  • 3
  • 10