All Questions

17
votes
3answers
2k views

What's the point of delaying SCHEDULED items from displaying in org-mode Agenda?

One may set org-deadline-warning-days to have DEADLINE items show up a default number of days before the deadline in the agenda, or one may do it on a case-by-case basis by adding, e.g., -3d to the ...
3
votes
2answers
235 views

How can I refer to an already open eww buffer without knowing its current name?

Say I open a new buffer by eww-browse-url "emacs.stackexchange.com". Then, I navigate for a while, so the eww-se buffer updates its name to the current url. Same history for another buffer eww-ew, ...
4
votes
1answer
40 views

message-mode: delete recipient easily

When I'm composing a message in message-mode I sometimes want to remove a recipient from a long list of recipients on the To: line. It seems that there is no semantic kill command that would delete a ...
13
votes
2answers
2k views

Compose key in Emacs: <Multi_key> is undefined

I set the Alt Gr key on my keyboard as compose key in my system (Ubuntu 14.04) in order to type letters like éóèàùçü and so on. But when I am on Emacs and try to press the Alt Gr key, I have a message ...
12
votes
1answer
350 views

Macro with defcustom leads to “Symbol's value as variable is void” error when byte-compiled

In two of my packages I have a macro where the body depends on a variable defined in a defcustom form. When installing the packages from Melpa, the byte-compilation ends with: Error: Symbol's ...
2
votes
1answer
94 views

How to know the first and second level heading above the cursor?

I'm editing a 4.7M pure-text document, the task is simple, every book have chapters, and every chapter have each of its lines enumerated at the begin of the line, what I'm doing it putting the name of ...
7
votes
2answers
98 views

How can I make customize use single quote for quotation?

Is it possible to teach customize to save its variables using single quote ' instead of quote? Example: … '(package-archives '(("gnu" . "http://elpa.gnu.org/packages/") ("...
6
votes
2answers
150 views

How can I fill-paragraph a string according to its value rather than its input syntax?

I have a docstring to a simple function, but the docstring uses many escape sequences to explain the reasoning for the function. (defun sx-encoding-normalize-line-endings (string) "Normalize the ...
1
vote
0answers
183 views

org :PROPERTY: “read only” and “no spell check”?

I have a very long document inside one org file, I plan to add more documents to it making many top level headers in it. I was wondering if there is a way to set a property to an org section making ...
10
votes
1answer
779 views

How to retrieve docstrings from functions and variables?

I'm trying to write a function that will retrieve the docstrings from any sexps in a file that match (def.*). I'd want to both be able to retrieve any functions/macros, as well as any variables ...
7
votes
1answer
125 views

Can Occur center the found text in the buffer?

When selecting an item from the occur buffer, the highlighted line is at the very bottom of the visible screen. This is less useful than having it 25-50% of the way down the screen(so it's easy to ...
12
votes
3answers
3k views

Using emacs with thunderbird to compose and respond to mail

There is a lot written for using emacs as a full-blown primary email program. I am looking for something with a simple setup so that I can keep Thunderbird as my primary email management program but ...
4
votes
1answer
633 views

Detecting variable changed outside customize

I have used "Customize" to set a value for semantic-lex-c-preprocessor-symbol-file. However, after loading up .emacs, this isn't the value I see. On opening up the "Customize" menu for this variable, ...
12
votes
1answer
2k views

after-init-hook vs eval-after-load/with-eval-after-load

I've found the rather useful How Packages work in Emacs 24, however, I'd like a definitive answer from an experienced user or a core developer as to which of these is actually preferred in the typical ...
7
votes
2answers
1k views

Use a different color theme for eww buffers

I saw this question: How to customize background color for some web pages opened with eww? but this won't work for me. I'm trying to read Wikipedia pages and in many places Wikipedia uses images to ...
9
votes
1answer
206 views

make `delete-duplicate-lines` ignore blank lines and certain words

I'm editing a text in org-mode, several lines are repeated since they where part of different files from the same topic. I want to use delete-duplicate-lines to delete the repeated lines, however, ...
7
votes
2answers
2k views

Launch emacs with ediff-files (of ediff-directories) from command line

I would like to launch emacs to ediff either files or directories. For example, I'd like something like: emacs -f ediff-files file1 file2 But when I do this, it doesn't take file1 and file2 as the ...
2
votes
4answers
1k views

Copy multiple lines?

The command kill-whole-line does just what it says. With a prefix argument, it allows me to kill multiple lines at the same time. How can I get the same functionality, but with copying instead of ...
2
votes
1answer
855 views

Get irony-mode to automatically load .config_clang

So irony-mode scans include directories through a file called .clang_complete, which looks like something like: -I./include/ However, it does not automatically load this file. Rather, I have to go ...
9
votes
2answers
705 views

Can I set a particular file to automatically and silently accept changes?

That is, can I specify for a particular file that I don't want Emacs to notify me that the file has changed on disk and prompt me about whether I want to accept changes or not? I don't want to do ...
5
votes
2answers
69 views

How can I make documents 'portable' between Emacsen?

I put 'portable' in quotes because, as we all know, Emacs works with plain text and this plain text is innately portable. However, the format of this plain text is not. My particular use-case is with ...
3
votes
1answer
3k views

How to install auto-complete via package system?

I'm trying to get work auto-complete. I've installed the package from MELPA successfully. However, it just does not work. When I enable auto-complete-mode the mode seems to be active (I see AC in the ...
1
vote
1answer
340 views

Problems with font in the Startup Screen

When I start Emacs 24.4.1 (with -Q parameter), my welcome screen looks quite strange: This text is in plain English, right? What is so special about it that causes this peculiar rendering? For all ...
5
votes
1answer
158 views

Recognize LaTeX partial files (with no preamble) as LaTeX

I installed auto-complete and also auto-complete-latex so to be able to use it with LaTeX files. Because in a document I use an external file with the preamble commands in it, Emacs recognises only ...
30
votes
4answers
3k views

When to sharp-quote a lambda expression?

Q: When, if ever, is it useful to sharp-quote a lambda, and when, if ever, must we not sharp-quote a lambda? People use lambdas in three ways: plain: (lambda (x) x) quoted: '(lambda (x) x) sharp-...
2
votes
1answer
102 views

Move cursor with respect to indentation

Is there any way to enable the following behavior. Let's say i have some code: def main(args: List[String]): Unit = { } Of cause the blank line between braces is indented, but when i move cursor to ...
8
votes
2answers
3k views

Splitting windows on startup

How do I split my windows on startup like so: _____________ | A | B | |_____|_____| | C | |___________|
8
votes
1answer
551 views

How to display a visual seconds clock counter — 10, 9, 8, . . time's up!

Q: How, please, can I incorporate a visual seconds counter that will disappear when an option is selected, or when the clock runs out. Example -- *Messages* buffer You have 10 seconds to make your ...
1
vote
1answer
291 views

Problem with installed color themes

I re-installed Emacs and I tried to change the color theme. I saved the changes and the .emacs file was updated but when I restarted Emacs the theme was not active! I want to point out that the ...
10
votes
1answer
1k views

How do I specify a custom face with font-lock-defaults?

If I define font lock keywords using existing faces, I can highlight the string 'foo'. (defconst my-mode-font-lock-keywords (list (cons "foo" 'font-lock-type-face))) (define-derived-mode my-...
4
votes
1answer
149 views

Sporadical change of permissions of file being edited

I have a strange behavior - sometimes while editing, permissions of .rs files are changed from 0644 to 0755. I'm not sure if it is specific for rust-mode or not as so far it is the only mode I ...
2
votes
1answer
63 views

Detect whether a new file has been visited by user or by lisp code

I would like to check whether a new file has been visited by an interactive command (e.g. visited using C-x C-f) or if it has been visited programmatically by some Lisp code. Use case: I cooked my ...
5
votes
1answer
437 views

How do I pass all the output of process to a function?

I want to call a command asynchronously, and define a function that handles output from that command. I don't want to simply write output to a buffer. According to the Elisp info (36.9.2 Process ...
1
vote
1answer
509 views

Emacs client starts in no windows mode

I have the following in .bashrc. export ALTERNATE_EDITOR="" export EDITOR="emacsclient -t" When I run, for example emacsclient something.tex & when running X, in a Konsole terminal (Konsole is ...
7
votes
1answer
1k views

In regular expressions, what's the difference between [:blank:], [:space:], and \s-?

I've been playing around with rx lately, and I just noticed there are (at least) 3 different ways of indicating whitespaces in regular expressions. [:blank:] [:space:] \s- What are the differences ...
-1
votes
1answer
159 views

Emacs won't enable auto-indent-mode at startup

I am trying to set up auto-indent-mode. I added it to my init-file like this, but it won't run: (auto-indent-mode) How can I tell Emacs to enable auto-indent-mode at startup?
3
votes
1answer
746 views

auto-insert a skeleton and run a function when creating a new file

auto-insert-alist by default matches files created in .../bin/ directories and enables sh-mode. There are examples on the wiki showing how to use a skeleton to insert some text, but I want to both ...
4
votes
1answer
74 views

How can I enable my modifications to a library/package without modifying its source?

I have been using a forked version of python.el for some time in which I have changed the indentation rules so that instead of something.method1()\ .method2() and stuff = (1, 2, 3, ...
10
votes
2answers
3k views

How to switch keyboard layouts for different languages?

Q: how do I switch between input methods for different languages when using a non-standard keyboard layout? I have to edit text in two different languages. I would like to be able to use my ...
34
votes
1answer
2k views

What is the difference between a function and a command?

When posting questions and answers here, people sometimes use the terms "function" and "command" interchangeably. In other cases, people only use one of the two terms to discuss specific pieces of ...
2
votes
3answers
97 views

Why is emacs attempting to connect to remote bookmarks after I deleted them?

I had bookmarks to some files on windows servers for quick and easy access. Well, I lost access to the server (the account's password changed), so I 1) removed those entries from my bookmarks list and ...
8
votes
1answer
356 views

How to prevent shr from making network connections

Recent versions of Emacs have a really good renderer for HTML written entirely in Elisp. This renderer (shr) can be used for displaying HTML emails, documentation, etc. However, it seems that shr ...
10
votes
1answer
300 views

How to debug errors in sentinels and during font-lock

When an error occurs inside a process sentinel or during font-locking, then Emacs doesn't show a backtrace even though debug-on-error was previously enabled. I understand why these errors are caught, ...
3
votes
1answer
204 views

How to change key bindings for Calendar mode?

How to change key-bindings for Calendar Mode only? I'm trying to do something like this: ; original bindings require pressing alt and shift simultaneously ; alt+shift change keyboard layout, so I ...
2
votes
2answers
190 views

Typing two quote characters in a LaTeX document?

I'm working with a LaTeX document. I want to type "" since I need this for german.sty in LaTeX. Starting some time ago, Emacs thinks this is not a good idea. I do not agree. Right now I have to ...
4
votes
1answer
471 views

Is there a more convenient key binding for RETURN?

Navigation with C-n, C-p etc. is quite easy in emacs, but I have to stretch my hand a lot to hit RETURN. Is there another standard key binding with the same effect as the RETURN key? background of ...
9
votes
1answer
1k views

How to right align region and/or line?

We can center text with M-x center-region and M-o M-s. Is there something similar for right-alignment? Example before: Item 0: value | Item 100:...
8
votes
2answers
1k views

How do you run pry from emacs

While writing RoR code I often need to run drop into a pry session or a debugger. So I place my binding.pry line in the implementation code and run my spec(s). That works fine if I run the specs in a ...
11
votes
4answers
301 views

How to make M-x and C-h f share the history?

It's quite common that I'll look through a command's documentation with C-h f, and then invoke the command with M-x immediately afterwards. Right now, the shortest way I've found to “invoke the last ...
1
vote
1answer
371 views

How to use different fonts based on the language of the currently active keyboard layout?

I want to make Emacs aware of the language I input -- in my case, Arabic, English, German -- so that I can use different fonts for each of them. So, for example, I'd like Emacs to use the following ...

15 30 50 per page