Most Popular

1500 questions
35
votes
2 answers

package-initialize: wrong type argument : arrayp , nil

while going through the emacs as a c/c++ editor , I came across the following lines of code to include in my ~/.emacs file, to connect to melpa archives for package installation (require 'package) (add-to-list 'package-archives '("melpa" .…
lazarus
  • 453
  • 1
  • 4
  • 8
35
votes
2 answers

Reverse a hunk in Magit 2.1.0

I just upgraded to magit 2.1.0. (And also to emacs 25.0.50 and git 2.3.1.) Previously, in the *magit* buffer I could: Select a hunk in the Unstaged area. Type v and answer yes to reverse it. This was handy. But now in magit 2.1.0 it gives an…
Greg Hendershott
  • 1,493
  • 12
  • 17
35
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
  • 453
  • 4
  • 9
35
votes
4 answers

Understanding SCHEDULED in Org mode

I've read the various manual pages about DEADLINE and SCHEDULED, and have used them both. I understand that DEADLINE is used in the Agenda to alert in advance about an upcoming deadline, and to continue to alert after the deadline if the item is not…
SabreWolfy
  • 1,418
  • 1
  • 14
  • 26
34
votes
2 answers

Is there a way to resize margins when exporting PDF in org-mode?

I want to export my org document as a PDF, but its margins are way too big. I would like to re-size them as I wish. I am using #+LaTeX_CLASS: report I do not know if there is a way. Any help?
makeMonday
  • 475
  • 1
  • 5
  • 9
34
votes
2 answers

what does "let*" ( let asterisk) mean in elisp

I've used let before, but never used let* what does let* ( let asterisk) mean in elisp? fyi this one was hard to google because of the asterisk.
american-ninja-warrior
  • 3,903
  • 2
  • 24
  • 44
34
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,096
  • 1
  • 24
  • 43
34
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,192
  • 2
  • 19
  • 43
34
votes
6 answers

Opposite of fill-paragraph

Emacs has the function fill-paragraph. Is there any function which will do the opposite of that? I have a paragraph which is already filled and instead I want it in a plain single line?
Sibi
  • 3,683
  • 2
  • 24
  • 35
34
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,666
  • 3
  • 59
  • 87
34
votes
6 answers

Running spacemacs alongside regular emacs: how to keep a separate .emacs.d

I would like to try spacemacs. But I don't want to switch from my regular emacs configuration just yet, so I would like the configuration that's currently in my .emacs.d to be in one directory, and the equivalent configuration for spacemacs to be…
Croad Langshan
  • 3,332
  • 18
  • 44
34
votes
1 answer

How do I associate a file extension with a specific mode?

I would like emacs to switch to gnuplot-mode when I open a file ending in .g or .gnuplot. I tried ;; gnuplot mode-name (add-to-list 'gnuplot-mode '("\\.g\\'" . gnuplot-mode)) or ;; gnuplot mode-name (add-to-list 'gnuplot '("\\.g\\'" .…
Stein
  • 581
  • 1
  • 5
  • 11
34
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,707
  • 2
  • 28
  • 46
33
votes
2 answers

Is it possible to export content of subtrees without their headings?

I draft documents in org-mode and export them to LaTeX, HTML, etc. as needed. I frequently use the tag :no_export: whenever I don't want a certain subtree to show up in the output. What I also want is want is for the export to completely ignore…
Brian Z
  • 2,913
  • 17
  • 22
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,920
  • 2
  • 31
  • 60