All Questions
25,720
questions
8
votes
2
answers
541
views
Why does Emacs org-mode ask for master file?
When opening .org files, Emacs asks for a master file.
Why is that and how can I disable this feature?
I guess it is because of using latex-related packages like ox-latex and ox-beamer.
Is there ...
12
votes
2
answers
5k
views
Make web-mode always indent with spaces
I am using emacs web-mode, and the tabbing in JS files seems to be acting strangely.
I have tab set to indent 2 spaces, but when the indent reaches 8 spaces, web-mode turns them into a tab, and then ...
14
votes
2
answers
575
views
Can a function or macro specify byte-compiler warnings?
I'm writing a function which, in principle, takes an arbitrary number
of arguments. In practice, however, it should only ever be passed an
even number of arguments, and will produce undesirable ...
17
votes
2
answers
17k
views
How to toggle fullscreen in Emacs GUI mode (`Full Screen` option is greyed out in Kubuntu)?
This is such a basic question but I am really at a loss (a google search only revealed solutions for OS X).
Until recently, I primarily used terminal mode (which I can make full-screen using my ...
33
votes
10
answers
11k
views
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-...
11
votes
3
answers
3k
views
How can I display the parent directory of the current file in the modeline?
I would like to be able to see the location of the current file's parent directory, independent of the current buffer name.
8
votes
1
answer
964
views
How can I set face for echo-area message
When I print messages using (message (propertize "text" 'face 'some-face)) properties get printed as text:
#("text" 0 4 (face some-face))
How can I have faces displayed properly?
4
votes
1
answer
330
views
Add more symbols to haskell `haskell-font-lock-symbols-alist`
I'm trying to add more symbols to haskell-mode's haskell-font-lock.
The documentation for haskell-font-lock-symbols-alist says:
Alist mapping Haskell symbols to chars. Each element has the form
(...
21
votes
2
answers
5k
views
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 ~/...
5
votes
1
answer
1k
views
What is the difference between setq-mode-local and setq-local
I don't understand how setq-mode-local works (mode-local is a package from cedet).
The macro's documentation says:
setq-mode-local is a Lisp macro in `mode-local.el'.
(setq-mode-local MODE &...
10
votes
3
answers
1k
views
Can I change the background color of the inactive minibuffer?
I tried it with the following settings:
(add-hook 'minibuffer-setup-hook
(lambda ()
(make-local-variable 'face-remapping-alist)
(add-to-list 'face-remapping-alist '(default (:...
15
votes
1
answer
1k
views
How to run multiple versions of emacs for package development?
Is there a set of tools to enable testing a package on multiple Emacs versions.
For example 24.4 is almost released. Can I install it and still safely test my package in 24.1?
How would I deal with a ...
6
votes
1
answer
1k
views
How can I have Org use `sidewaysfigure` in LaTeX export?
I am writing an Org document with some large figures (images) which I would like to place on a separate page in landscape orientation when exporting to LaTeX. In LaTeX I can achieve what I want by ...
5
votes
2
answers
206
views
Info: Display the current node name in the buffer-list or uniquify *info* buffers
Is there a way to get info to display the current node in any of buffer-list/ibuffer/helm-buffers, especially when there are multiple info buffers ? Ideally uniquify should be sufficient to ...
29
votes
2
answers
2k
views
Can functions access their name?
In C there is the magic variable __func__ that holds the current function name. In Bash, there is an array FUNCNAME holding the names of all functions in the calling stack !!!
Is there a similar ...
2
votes
1
answer
1k
views
How do I set `gnutls-verify-error` to not check if certain hostname matches the certificate?
I have the host chat.deshackra.com pointing to tigase.im (with a CNAME entry), and I want to use the starttls connection type for my jabber.el account, however the connection fails:
gnutls.c: [1] ...
7
votes
2
answers
739
views
query-replace in keyboard macro
Let me define a keyboard-macro: I enter C-x (, then go to beginning with M-<, then type M-% to query-replace some occurrences of foo by bar. Out of 3 occurrences found, I replace only the last 2, ...
8
votes
2
answers
2k
views
Alternative Org Mode Implementations [closed]
Has the org-mode text syntax been adopted anywhere besides emacs?
The only place I can think of is that Github allows you to write readmes in org mode and can display it like it can markdown. Are ...
11
votes
3
answers
1k
views
Making an image (ie. image-mode) auto reload changes from disk
I have an image generated by plantuml which I open in an Image mode buffer. I want to use Auto-Revert mode so it auto-refreshes, but it doesn't seem to work on Image mode buffers for some reason. Is ...
27
votes
5
answers
4k
views
How do I force re-evaluation of a defvar?
Suppose I have an Emacs lisp buffer that contains:
(defvar foo 1)
If I call eval-last-sexp or eval-buffer, foo is bound to 1. If I then edit this buffer to:
(defvar foo 2)
eval-last-sexp and eval-...
4
votes
3
answers
558
views
How to show the sticky(lock) window status in the mode line?
I got the following snippet in my init.el:
(define-minor-mode sticky-buffer-mode
"Make the current window always display this buffer."
nil " locked" nil
(set-window-dedicated-p (selected-window)...
9
votes
1
answer
949
views
Change syntax highlighting without changing major mode?
I want to start a python-shell M-x python-shell. If I'm not happy with the syntax highlighting, is it possible to improve it (put more colors in the buffer) without changing major mode? In vim this ...
35
votes
2
answers
4k
views
ESS plot directly to an Emacs buffer?
Q: how can I get ESS (R) to plot directly to an Emacs buffer?
When interacting with R through ESS, R defaults to spawning a separate graphics window outside of Emacs to draw its plots. (One can, of ...
16
votes
1
answer
1k
views
How do I create a dynamic regexp with rx?
I want to use rx to create regular expressions with runtime values.
Currently, I'm doing this:
(setq strings '("foo" "bar" "baz"))
(eval `(rx symbol-start (or ,@strings) symbol-end))
However, I'd ...
45
votes
3
answers
5k
views
What can I do to speed up my start-up?
What are some basic things I could do to reduce the start-up time?
Is there anything in particular I should pay attention to, for that matter?
Note: Startup time can be mitigated by starting Emacs ...
7
votes
2
answers
866
views
Org-mode -- sub-TOCs for individual sections?
Inside my org-mode documents, I'd like to do sub-TOCs for individual
sections and subsections.
For example:
#+TOC: headlines 1 # This is the "main" table of contents,
...
6
votes
1
answer
344
views
Have table.el insert space after vertical separator for reStructuredText
I am using Emacs's table.el mode to fill a lot of tables in rst documents.
table.el is really fine to do the job, but it lacks the possibility to have one space between vertical separator and cell ...
11
votes
1
answer
1k
views
Attach to running remote shell with eshell/TRAMP/dtach
I often use GNU Screen to keep remote sessions alive. Since I live in Emacs, I'd really like to be able to resume a running remote shell session from within Emacs.
GNU Screen implements all sorts of ...
6
votes
1
answer
603
views
backword-sentence and forward-sentence are moving over paragraphs
I use markdown-mode to edit markdown, but it's missing one very useful feature. Whenever I press M-a (backward-sentence) or M-e (forward-sentence) it takes me to the start or end of the paragraph, ...
11
votes
2
answers
5k
views
Equivalent to --no-wait for emacs
The emacsclient program allows a flag --no-wait (abbreviated as -n) which will cause the emacs server to visit the specified file, and return immediately.
emacsclient -n ~/.bashrc
If I provide an ...
10
votes
6
answers
16k
views
How do I get my initial frame to be the desired size?
I have the following in my .emacs file:
(when window-system
(set-frame-position (selected-frame) 0 0)
(set-frame-size (selected-frame) 91 63))
The value of 63 is supposed to make my ...
20
votes
1
answer
572
views
how to prevent faces from bleeding onto surrounding areas of buffer?
Q: How do I keep org-mode link faces from bleeding over into the ... selective display characters at the end of a folded header?
This is a visual tick that drives me a little nutty. When, in org-...
19
votes
1
answer
3k
views
Are there any benefits of compiling Emacs with one graphical toolkit opposed to another?
It seems the options are gtk, gtk2, gtk3, lucid or athena, motif. Of course, there are visual differences and one toolkit may be more to your tastes than others. Apart from that, are there any other ...
1
vote
3
answers
750
views
How do I keep all emacs dotfiles in one directory?
I would like to keep all emacs related stuff (backup files, emacs-places, ido-last, etc.) in one place, namely ~/.emacs.d directory.
Is there general option for this or I have to set it individually ...
8
votes
2
answers
3k
views
How do I ediff a buffer against a revision?
I want to run ediff to compare my current version of a file (in git) with a version of the file on a different branch.
I run M-x ediff-revision from within an open buffer for the file in question. I ...
23
votes
1
answer
3k
views
How to export top-level headings of org-mode buffer to separate files?
How can each top-level heading of an org-mode buffer be exported to a separate file named after the value of the corresponding CUSTOM_ID + (sanitized) title?
Let's say a buffer contains:
* Title of ...
4
votes
2
answers
2k
views
Emacs flickers when I run certain commands (gif screencast included)
After I did an overhaul of my .emacs file yesterday (adding/removing packages, organizing, etc.), I'm left with an annoying screen flicker. It happens when I move the cursor to the edge of the buffer ...
8
votes
2
answers
875
views
Sleep in an kbd macro
I was completing the python koans in emacs, and I was using a kdb macro to test my changes in a shell buffer and jump back into the python code. I wanted to take the line number of the next error from ...
13
votes
1
answer
396
views
Are there Emacs tools for the visually-impaired?
I have a client, a Ph.D. candidate in Computational Chemistry, that is visually impaired. He's pretty self sufficient and he's had some success learning the content by directly reading source, when ...
2
votes
1
answer
129
views
Highlight abbrev upon expansion
I don't really like the feeling of not being in control when using emacs' abbreviations feature. On the one hand, I don't want to be asked all the time but on the other hand I'd like to know when an ...
9
votes
2
answers
2k
views
How can I change Org-mode time format for one buffer?
In general all timestamps in Org-mode appears as [YYYY-MM-DD Day]. I have one file (buffer) where I would like the format to be different. Either just [YYYY-MM-DD] or [YYYY-MM]. How do I tell Org-mode ...
6
votes
1
answer
382
views
Applying major-mode font locking to exported org-babel snippets
Currently I have a bunch of code snippets in my Org-based presentation. I'm exporting them with ox-reveal, but the exported code doesn't have any syntax highlighting. Is there any way to:
have syntax ...
4
votes
2
answers
265
views
Show siblings of visible headers after hide-other
I'm using Outline mode (usually the minor mode, but it shouldn't matter) or Org mode. I have a file that looks like this:
-*-outline-*-
* Chapter 1
** Section 1.1
*** Subsection 1.1.1
foo
*** ...
13
votes
3
answers
1k
views
Prevent org-mode from swallowing file-local variables
It is sometimes convenient to define file local variables with
comments such as the following, which must be at the end of a file.
# Local Variables:
# fill-column: 80
# End:
However, in org-mode ...
2
votes
1
answer
89
views
How do I run elisp code on a filtered email in Gnus?
I am downloading mail using fetchmail from a pop account and using gnus to read mails from the maildir.
I would like to run elisp code on emails that are matched by fancy split rules, or something ...
5
votes
1
answer
380
views
How can I make encrypted messages readable in my sent folder
I'm using Mu4e to send emails. When I encrypt a message, it is encrypted with the receiver's public key and since I don't have the corresponding private key I can't read the message. Naturally, I ...
5
votes
1
answer
3k
views
Show current function in header line
I have used a package before which used the header line to show the name of the current function being edited. Whatever package it was, I don't have it installed now. What are my options for getting ...
9
votes
2
answers
2k
views
Running Emacs from Windows taskbar
When I want to switch between programs in Windows, I ordinarily use the windows key plus a number key to run a program from my taskbar. Most programs will either start running or, if there's already ...
26
votes
3
answers
4k
views
What's the difference between the different vim implementations?
I'm aware of several different vim implementations in Emacs. There's evil-mode, viper, vimpulse and vim-mode. Are there others? How do they compare?
I note that there are a lot of evil-* packages on ...
20
votes
3
answers
5k
views
Track "TODO" items when writing code
Is there an easy way to create a list of "to-do" items on-the-fly when writing code? For example, suppose that I am writing a function write-this-now when I realize that I am also going to need to ...