Most Popular
1500 questions
21
votes
2 answers
Using a different font for each major mode
Is it possible to set different fonts following the major mode? Say Inconsolata-12 in org-mode buffers and Symbola-12 in all remaining modes.
Or at least, is it possible to do a
(set-frame-font "Inconsolata" t)
after switching to org-mode buffers?

csantosb
- 1,045
- 6
- 15
21
votes
3 answers
Convert between numbered and unordered lists in org-mode
Is there a function to convert between numbered and unordered lists in org-mode? The lists may or may not be nested.

bernie
- 569
- 3
- 11
21
votes
2 answers
Using Org Babel to tangle to a variable file name
If I have a code snippet that I tangle to a file, but I expect the file name to change over time, Is there a cleaner way to change the filename than Query-replace?
For example, say I tangle code to ~/dir/my-file.el:
#+BEGIN_SRC emacs-lisp :tangle…

Gambo
- 929
- 5
- 14
21
votes
3 answers
Using magit for the most basic add, commit, push
I normally use only a few git commands each time I want to commit changes to a repository:
$ git add --all .
$ git commit -m "update."
$ git push -u origin master
Can magit be useful in this regard? M-x magit-status seems helpful but I am not…

hatmatrix
- 1,046
- 9
- 18
21
votes
3 answers
Hide \author, \date, and \title when exporting to pdf with org-latex-export-to-pdf
I am very new to LaTeX and exporting org-mode files to pdf. When I run the command org-latex-export-to-pdf it adds a title, author name, and date to the top of the exported pdf. Looking at the generated LaTeX, I assume that comes from the…

elethan
- 4,755
- 3
- 29
- 56
21
votes
4 answers
Different themes for terminal and graphical frames when using Emacs daemon
I'm trying to achieve the following behavior in Emacs24:
I like to use a different theme (solarized-dark vs. solarized-light) depending on whether I connect to the running
server with a terminal frame
% emacsclient -t
or with a gtk frame
%…

andreas-h
- 1,559
- 13
- 22
21
votes
1 answer
Org Mode: Prevent editing of text within collapsed subtree
Is it possible to prevent editing of text within a collapsed subtree in Org Mode? That is, I would like to make it impossible to edit the hidden text. This seems like something that should exist but I haven't seen a way to do it.

Chris
- 699
- 3
- 13
21
votes
2 answers
How to move an org-mode file together with all attachments?
I have a couple files, e.g. file-1.org, file-2.org in the same directory sharing the data/ directory for attachments.
I'd like to move file-1.org to a different location, create a new data/ directory in that location and move all attachments that…

abo-abo
- 13,943
- 1
- 29
- 43
21
votes
2 answers
how to setup Knitr workflow in Emacs?
RStudio provides a one-button way for produce PDF file from LaTeX+R source with Knitr. It looks great for doing reproducible research. And I am trying to configure my Emacs for:
at left buffer LaTeX+R code in Knitr way;
at right buffer PDF output…

drobnbobn
- 575
- 4
- 15
21
votes
1 answer
evil-mode visual selection copies text to clipboard automatically
Setup:
GUI version GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-07-25 on KAEL
Compiled from EmacsW64.
Package Evil, using the latest version of Evil from MELPA
Windows 7 x64 bit.
Situation:
Tested with empty Emacs configuration with only Evil…

ReneFroger
- 3,855
- 22
- 63
21
votes
3 answers
Swap two variables in Elisp
Suppose I have
(setq a 1 b 2)
How can I elegantly swap the values of a and b without using a temporary variable?

PythonNut
- 10,243
- 2
- 29
- 75
21
votes
5 answers
How can I evaluate elisp in an orgmode file when it is opened?
I have elisp code I'd like to run in orgmode files when they load (different for different files, and defined in the file itself). Is there a way to do this? I didn't see anything in http://orgmode.org/manual/In_002dbuffer-settings.html
If I can add…

avv
- 1,563
- 10
- 24
21
votes
6 answers
How do I set a different location for the dot emacs .emacs file on Windows 7?
I am using a Windows 7 computer and do not have administrator access. Therefore I can not place a dot emacs file in the root directory. Is there a way for me to specify a different location for the dot emacs file?

Startec
- 1,354
- 1
- 13
- 30
20
votes
1 answer
What is the difference between TAB and ?
I was reading the the documentation for Yasnippet mode, when I came to the section where the trigger key is defined:
It seems like Yasnippet minor mode defines the TAB key to run yas-expand using:
(define-key yas-minor-mode-map (kbd "")…

Håkon Hægland
- 3,608
- 1
- 20
- 51
20
votes
2 answers
Is it possible to remove '\emsp' from clock report but preserve indentation?
Is it possible to replace '\emsp' with just plain spaces?
I.e,
In Clock reports, there are a lot of these '\emsp's. (See example below.)
I'm able to get rid of them by setting ':indent nil'. But this removes all indent altogether, which is…

Leo Ufimtsev
- 4,488
- 3
- 22
- 45