Most Popular

1500 questions
34
votes
5 answers

Can I avoid outdated byte-compiled elisp files?

Occasionally, when I start Emacs, I get a message like. Source file `/home/USER/.emacs.d/elpa/....el' newer than byte-compiled file Also, I sometimes edit a package I'm developing and forget to recompile it. When I try to load the new file, it…
Malabarba
  • 22,878
  • 6
  • 78
  • 163
34
votes
3 answers

How do I checkout a file from another commit in Magit

I've got a file foo.txt in branch A, and I want to check out foo.txt from branch B into the index. On the command line, I would do this: $ git checkout B -- foo.txt I want to be able to do this in magit by going to log, finding the commit I'm…
Emoses
  • 573
  • 5
  • 8
34
votes
1 answer

What is the difference between ' and #' in front of a symbol?

I'm a little new to Emacs. When looking at some of the configurations, I found there are two types command in "add-hook". (add-hook 'LaTeX-mode-hook #'LaTeX-math-mode) and (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) This has confused me for a…
X.Arthur
  • 443
  • 4
  • 9
33
votes
3 answers

Untrack file without deleting it?

I have a tracked file in a git repository. How do I untrack this file without deleting it using magit?
deadghost
  • 807
  • 1
  • 7
  • 13
33
votes
4 answers

How do I measure performance of elisp code?

How do I measure the performance of my elisp code? What tools / external packages are available for me to measure time taken? In addition to total time, can I see a profile that shows time taken per-function? Can I profile memory usage too?
Wilfred Hughes
  • 6,890
  • 2
  • 29
  • 59
33
votes
5 answers

How do I automatically save org-mode buffers?

I regularly use org-mode and the agenda to keep track of my to-do list. Since I use Dropbox to sync my list, I need the same tasks to be available on all computers. Sometimes during the course of my cleanup I will forget to save my changes, leaving…
Ryan
  • 3,989
  • 1
  • 26
  • 49
33
votes
3 answers

Org-mode on the phone or on Evernote?

I use Org mode for keeping track of everything; ideas, notes, to-do lists, code snippets, etc. You name it. One problem I have though, is that I can't easily pull up my Org-mode data on my phone, even if it is only for quickly checking my notes or…
Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47
33
votes
3 answers

When should I use autoload instead of require?

From what I understand require is used to load large chunks of code (something like modules) although it can also load individual functions. Autoload on the other side, only registers functions and defers the loading to execution time. I've recently…
caisah
  • 4,056
  • 1
  • 23
  • 43
33
votes
2 answers

org-mode: how to generate clock report for hours worked each day?

org-clock-report is awesome; however, it reports time spent on each task. Is there any custom command that you use to generate a clock report showing hours worked, across tasks, for each day? The trouble I've encountered is that, I file my TODO…
Covi
  • 495
  • 1
  • 4
  • 8
33
votes
5 answers

Easiest way to downgrade a package installed via MELPA

Sometimes, package updates from MELPA can break some part of emacs and when that happens I'd like to be able to revert back to using an older version of the package. Right now, I can do it in two ways: I've set emacs to delete files by moving to…
Chakravarthy Raghunandan
  • 3,132
  • 2
  • 18
  • 42
33
votes
1 answer

how to move/rename a file within Magit?

The manual's introduction says: Magit wraps and in many cases improves upon at least the following Git porcelain commands: add, am, bisect, blame, branch, checkout, cherry, cherry-pick, clean, clone, commit, config, describe, diff, fetch,…
Jorge Israel Peña
  • 1,265
  • 9
  • 17
33
votes
10 answers

Kill or copy current line with minimal keystrokes

I do C-a C-k C-k to kill the entire line point is on. If I want to copy the line instead of killing it, I can hit C-/ C-/ right after typing the sequence above. Alternatively, I can do C-a C-SPC C-n M-w. Is there a faster way to kill or copy the…
itsjeyd
  • 14,586
  • 3
  • 58
  • 87
33
votes
6 answers

How to prettify/format an XML buffer?

I have a file with xml all on one line. Does the functionality already exist to reformat this buffer to be somewhat user-readable?
wdkrnls
  • 3,657
  • 2
  • 27
  • 46
33
votes
8 answers

How to select non-contiguous regions in Emacs?

Suppose that I have already selected some text in the current buffer. Is it possible to select another stretch of text, while keeping the previous selection (and so on)? Added: One motivation for this functionality is as follows: Assume that I have…
Name
  • 7,689
  • 4
  • 38
  • 84
33
votes
7 answers

Copy text from Emacs to OS X clipboard

When I run Emacs in a text terminal instead of the normal GUI mode, I can copy in Emacs by activating the start of a region with C-SPC, and then select what I want, and then do M-w. Is there any way to get a region copied this way be available in…
Galder Zamarreño
  • 1,527
  • 2
  • 12
  • 21