Most Popular

1500 questions
9
votes
6 answers

Selecting text without moving the cursor

I would like to grow a selection without moving point (the cursor) from its location. I know I can always use C-u C-spc to move to the previous location, but I would like to avoid that. More specifically, I would like to do both of these…
Amelio Vazquez-Reina
  • 5,197
  • 5
  • 33
  • 47
9
votes
2 answers

How do I filter kill-ring contents?

Is it possible to prevent kill-ring from storing whitespaces/empty lines? Right now after I do a couple of changes and then go to browse-kill-ring I often see something like this: ------- ------- merchant_uuid: "some_uuid" ------- it…
Ignacy Moryc
  • 185
  • 6
9
votes
2 answers

How can I fill the entire line number bar with a custom background color?

In the screenshot below I have simply set the background of the linum face to some color, however there is a blank region at the end of the buffer and there are gaps between the lines when line wrapping (global-visual-line-mode) is enabled: …
Lenar Hoyt
  • 1,173
  • 7
  • 25
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,829
  • 17
  • 40
9
votes
1 answer

How does Emacs compile the regular expressions?

I'm writing code that will have to do a lot of regular expression matching. I understand that a function like string-match or re-search-forward needs to process its regexp argument given as a string and turn it into a data structure that will be…
phs
  • 1,227
  • 7
  • 13
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
3 answers

Lambda in `defun` Captures the Lexical Environment, But in `let` It Doesn't

My example is simplified: (defvar wtf 10) (defun f (wtf) (lambda () (cl-incf wtf))) (setq f (f 20)) (setq g (let ((wtf 30)) (lambda () (cl-incf wtf)))) (list (funcall f) (funcall g) wtf) ;; ==> (21 11…
shynur
  • 5,253
  • 1
  • 4
  • 25
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,849
  • 4
  • 41
  • 87
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,849
  • 1
  • 14
  • 24
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,197
  • 5
  • 33
  • 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
  • 203
  • 1
  • 6
9
votes
2 answers

How to modify-face for a specific buffer?

I work with a lot of tabular data files and use stripe-buffer.el make them easier to read. But I also work with more than one, so I'd like to make it easier to distinguish among them as well and want to change the stripe colors per buffer. I can…
wdkrnls
  • 3,707
  • 2
  • 28
  • 46
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,040
  • 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,221
  • 20
  • 53
1 2 3
99
100