All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
225 views

Keeping track of a pdf viewer spawned via AUCTeX?

When using AUCTeX with pdflatex, one can run C-c C-c (TeX-command-master) or C-c C-v (TeX-view) to spawn a PDF viewer. I use Evince on Debian Wheezy, in case it's relevant. This might sound a ...
8
votes
1answer
6k views

How can I prevent GNU Emacs from splitting windows on startup?

Whenever I try to open an existing file with GNU Emacs, the window always split horizontally so as to show two buffers: one buffer containing the file and the GNU Emacs buffer. How can I set up Emacs ...
6
votes
1answer
401 views

Easy way to insert Org options?

I really cannot bear to memorize so many options' name for Org-mode just like learning English vocabulary. For example: #+ATTR_LATEX:, #+tblname:, #+CAPTION for tables, #+ATTR_HTML: for HTML exporting....
3
votes
1answer
455 views

Org headlines are never exported to \paragraph in LaTeX

I want to export an Org file into PDF, with any depth titles showed in TOC; however, cannot works. Even though adding \setcounter{tocdepth}{5}, TOC still only contains the title of 3rd depth (\...
4
votes
1answer
359 views

Openwith doesn't work in dired

Here is my openwith settings: (require 'openwith) (setq openwith-associations '(("\\.mov\\'" "smplayer" (file)))) (openwith-mode t) When I press enter in dired mode on a .mov file, it still open it ...
21
votes
1answer
3k views

Curiosity: What does progn stands for?

According to Emacs documentation: progn is a special form in `C source code'. (progn BODY...) Eval BODY forms sequentially and return value of last one. What does progn stands for (or its origin)? ...
6
votes
2answers
184 views

Programmatically controlling the order of functions within a hook

I am looking for an example, please, to programmatically control the order of functions within a particular hook: First in time, which is easy -- i.e., don't append using add-hook. Last in time, ...
8
votes
1answer
1k views

Force a single font for all unicode glyphs

I'm using GNU Emacs 24.4.1 in a GUI on OS X. I want to force every character to be displayed using just a single font rather than allowing Emacs to choose a supposedly most appropriate. I understand ...
5
votes
2answers
2k views

How to strip invalid UTF-8 characters from a string?

TL;DR: I have a string with characters that are unencodable in UTF-8, and I need to remove these characters before writing the string to a file. For instance, the following snippet creates a file ...
1
vote
1answer
303 views

How to force the variable 'bidi-paragraph-direction' taking the value 'left-to-right' in a math environment in LaTeX-mode

One of the great features of Emacs is its ability to handle bidirectional support for the right-to-left languages (like Hebrew, Arabic and Persian). Note that even in these languages mathematical ...
3
votes
2answers
107 views

After (set-buffer-modified-p nil), the first undo command doesn't set the buffer modified flag to true

If I modify a buffer and then save it, the buffer modified flag resets and the subsequent undo commands set the buffer modified flag to true. However if I use (set-buffer-modified-p nil), the flag ...
1
vote
1answer
2k views

Matching any printable character but whitespace

I would like to match a word (that can contain any printable characters except space) separated on the left side by whitespace and on the right side by a newline or whitespace. What is the ...
4
votes
2answers
171 views

What's the differences of binding key?

(global-set-key [?\S- ] 'set-mark-command) (define-key global-map (kbd "C-c SPC") 'ace-jump-mode) What's the differences and when to use what?
1
vote
1answer
198 views

How to deal with packages when manage .emacs.d file with version control system? [duplicate]

I'm trying to use git to manage my .emacs.d directory. I occur this problem: Some package files are already managed by package-tools such as el-get,package.el via git. If I add them into my git ...
4
votes
2answers
643 views

Which version of magit am I installing?

Here is a snapshot of my list-package result related to magit: Question: There's nothing in my init.el on marmalade, why the package from marmalade are also listed? If I run M-xpackage-...
9
votes
2answers
2k views

How to save a copy of a buffer to a file?

I would like to be able to save a copy (or a snapshot) of a buffer into a file. The behavior would be similar to write-file, except that it would not set the buffer to visit this file. For a usecase, ...
6
votes
3answers
759 views

How to view files ordered by extension in dired?

Instead of viewing dired buffers with files sorted by name, I want to view it with directories at the top followed by files grouped by extension (and then filename). Is there any package to install to ...
0
votes
1answer
40 views

Debugging a custom find-function

Emacs is freezing when running the following custom find-function and I'm looking for some assistance, please, to debug it. I'd like the prefix argument C-u to make the difference between switch-to-...
3
votes
4answers
808 views

Autocomplete environments like in TeXStudio

TeXStudio autocompletes environments. How can I get AUCTeX to do the same? I can begin typing an environment name (say myenvironment) and, after entering a part of it (my, myenv, etc.), I hit ...
3
votes
1answer
1k views

“Error in process sentinel: Selecting deleted buffer” when exiting Emacs?

I am getting the following message when I do C-x C-c to exit Emacs: error in process sentinel: Selecting deleted buffer So instead of exiting Emacs like normal, I am forced to close it through ...
6
votes
1answer
315 views

Has anyone else encountered gui-get-selection: (error “Timed out…”) bug?

When trying to paste into Emacs from my Linux system GUI, I'm getting a 10-15 second Emacs freeze and: gui-get-selection: (error "Timed out waiting for reply from selection owner") I would post a ...
8
votes
2answers
2k views

How to format/fill poorly-formatted bullet items in org-mode?

Q: how can I format/fill poorly-formatted items in an org-mode bulleted list? I'm trying to figure out how to make fill-paragraph work on poorly formatted bulleted items in an org-mode list. By "...
3
votes
1answer
86 views

In Gnus, for a specific group, can I have all incoming messages automatically marked as read?

My specific use case concerns the "All Mail" folder exposed by Gmail over IMAP. I keep the folder permanently visible so I can search it when I need to, but I'm tired of pressing c (gnus-group-...
1
vote
1answer
37 views

How to programatically retrieve help strings for mode-line % constructs?

I'm looking for a way to programmatically retrieve documentation for mode-line-format %-constructs; this is part of a little project I'm working on to help with mode-line customization. So for ...
7
votes
2answers
529 views

What to do to make orgmode faster?

I have org-mode file with more than 10k lines of notes and traversing through the tree (just basic up/down movements) is very slow (to the point that it's unusable). What can i do to make it work ...
10
votes
3answers
4k views

before-save-hook for cc-mode

I want to customize cc-mode to execute a function before saving. One solution would be to modify cc-mode keymap to bind C-x C-s to a function which performs the work I need and then saves it. My ...
9
votes
1answer
3k views

How to change helm's highlight color

I'm using Monokai theme. When I start helm, the current selected line are highlighted in gray. It's not easy to spot,especially with the title information in blue. How can I change this gray ...
5
votes
2answers
871 views

Split a string without consuming separators?

I frequently need to split strings, while keeping the separator. Researching the elisp manual, I am not finding a way to split a string according to a separator, without consuming the separator itself....
1
vote
2answers
194 views

Recompile a .gz file in emacs' progmodes directory

c-electric-lt-gt in cc-cmds.el.gz treats > as a closing paren only if it isn't immediately followed by another >. This behaviour is incorrect for C++11 and I tried to modify it by changing the ...
3
votes
3answers
776 views

Open buffer in a specified frame

Do frames in emacs have a handle the way buffers do? In particular, can I specify that a particular file should be opened in a specified frame? I would like to have two frames where I use one for ...
2
votes
1answer
301 views

call-process and Hunspell (in Emacs 24.4)

I am having problems running ezwinports Hunspell 1.3.2-3 in Emacs 24.4.1 for Windows. When calling ispell-buffer with debug, I see the following functions are called. ispell-buffer -> ispell-...
1
vote
1answer
150 views

using ace-jump-mode inside shell in Emacs

I am using shell in Emacs (M-x shell). Often, when I try to copy-paste a particular snippet of text from the output (say the output of a ls), I want to use ace-jump-mode to jump to a particular point ...
4
votes
2answers
261 views

Temporarily set the `default-directory` for `start-process`

Is it possible to set the default-directory temporarily (e.g., let-bound) when using start-process? If so, how please. (let ((default-directory "/Users/HOME/Desktop/tmp")) (start-process "touch-...
3
votes
1answer
211 views

How do I add a keybinding to a keymap that is on a prefix key

I just installed the pt.el package and now I want to bind projectile-pt to the default projectile search prefix (which is C-c p s). The goal is to have it as C-c p s p to begin with but also to have ...
3
votes
1answer
54 views

Prevent DOS prompt when using emacs as an 'alternate editor'

I have activated in Alpine email client the following setting in order to use Emacs as an editor when composing emails: [X] Enable Alternate Editor Implicitly Editor = ...
2
votes
1answer
92 views

package-install doesn't pick up dependencies that are already in site-lisp

I have a bunch of software git-cloned into my site-lisp/ directory. It and all of its sub-directories are in my load-path. The problem I noticed is that package-install sometimes insists on pulling ...
8
votes
1answer
2k views

Quicker way in Find-file with helm?

In emacs with helm, I can C-x C-f find file. After type part of the folder name, helm find the right folder. At this point, I can hit Enter to enter Dired mode. and C-s to search a second level ...
13
votes
1answer
1k views

Flexible org TODO dependencies?

I'd like to have org-mode do what OmniFocus does; when the bottom task in a sequential list is completed, the next task in the list becomes visible in an Agenda. Any thoughts on how I might try to ...
10
votes
3answers
606 views

How to modify a buffer without undo noticing?

Q: How do I insert/modify text in a buffer without undo noticing? Here's the use case. I have a comment block at the start of every file that, among other things, updates a timestamp for the most ...
8
votes
1answer
607 views

How to hook into buffer modified state?

Such as in the built-in variable mode-line-modified which displays an asterisk in the mode line if the buffer is modified. Specifically, I want to turn hl-line-mode off when the buffer is modified ...
1
vote
1answer
555 views

How to use global prefix command key in define mode-map keybinding?

I have a global prefix command key define like following: (unless (boundp 'help-document-map) (define-prefix-command 'help-document-map)) ;; (define-key my-programming-prefix-k (kbd "h") 'help-...
34
votes
7answers
5k views

How to add a prefix to every line?

I have the code below: Hello There I am some code And want to add code in front of it, like: I said Hello I said There I said I am some code So how would I add a prefix to each line?
7
votes
1answer
158 views

Getting the key binding for the current command

this-command-keys and this-command-keys-vector return the entire key sequence that fired the current command. However, such sequence will contain any prefix argument, too. Is there a function or ...
0
votes
1answer
98 views

How to interactivelly pass a `listp arg` to `yank`

Is it possible to interactively pass an argument that matches listp to the function yank so that current-kill receives an argument of 0? If so, how please can that be achieved? Background: I am ...
9
votes
2answers
711 views

ORG-MODE - Trigger TODO status on a certain date?

Rather than manually check a tickler file or calendar every morning, how can I create a trigger that will set the status of an item to TODO on a certain date?
0
votes
1answer
136 views

Variables not shown in company-mode

I use company-mode for auto-completion and sometimes I have a strange problem with Emacs-Lisp. Variables are not shown among the completion candidates. Sometimes, if shown, pressing <f1> doesn't ...
3
votes
2answers
4k views

Starting a virtualenv for emacs to use

I am starting a Python virtualenv through init.el (or so I would like): (require 'virtualenvwrapper) (venv-workon "my-python-project") However, flycheck does not find flake8 or pylint, which are ...
1
vote
2answers
443 views

helm-semantic-imenu doesn't identify pointers and references in C++ code

With semantic-mode enabled and reading a C++ source file in cc-mode, running helm-semantic-or-imenu correctly shows all the classes, variables and functions defined in that file. However, all the ...
1
vote
1answer
57 views

Alias doesn't work for aptitude search in Eshell

alias works very well in Eshell. I've used it like this: alias sau sudo aptitude update However, it doesn't work for the search command: $ alias aps aptitude search $ aps emacs search: You must ...
11
votes
1answer
2k views

in term-mode, how do I run regular emacs commands?

Upon starting term-mode, Emacs delegates all keypresses to the terminal you're running. That's great for compatibility purposes, but leaves Emacs functionality behind. How do I get back to Emacs ...

15 30 50 per page