# All Questions

16,150 questions
33 views

### can I use .dir-locals.el to set a default mode for files, and still allow dired?

I have a directory that is all little shell code snippets for being sourced. Tried creating an auto-mode-alist, that does not seem to be effective, so tried creating a .dir-locals.el thusly: ((nil . ...
22 views

### Org mode: control whether M-<RET> inserts a newline or not for plain lists?

In the following text: foo - s - sdljk with point at the end of the block, pressing M-<RET> will alter the buffer to then look like this: foo - s - sdljk - Same situation, but with ...
30 views

### install solarized theme

I can not get this package installed using package-install solarized theme http://melpa.org/#/solarized-theme please throw me a bone
30 views

### Set org-duration-units for org-mode scheduling

I'm trying to set org-duration-units that's used by org-mode effort estimates for formatting times in 8 hour days instead of 24 hours days. I'm in no way an emacs and lisp expert, currently learning ...
24 views

### Org Agenda schedule number of hours allocated to a task

Is there a way to tell Org Agenda to schedule X number of hours for a task without a specific start-end time? Presently, the standard format is this: SCHEDULED: <2019-06-20 Thu 9:00-12:00>
10 views

### ivy counsel-find-file doesn't change selection as more characters typed

I have (setq ivy-sort-matches-functions-alist '((t . ivy--prefix-sort))) If I am in a directory with files mc_multiword.txt and multiword.txt and am using counsel-find-...
55 views

### How to copy and cut multiple lines in Emacs correctly?

I have researched it. Most post said this way: C-SPC C-n M-w It works. But in my case. It only copied a block where the cursor moved. Not the whole lines area I want. For example, the source below: ...
24 views

### How to turn typopunct minor mode on globally

I want to be able to use typopunct minor mode globally. I have tried to add (global-typopunct-mode 1) to my init file, like so ;; Typopunct mode (require 'typopunct) (typopunct-change-language '...
18 views

### org-capture fails: base buffer has been killed

I am trying to set up GTD for org-mode by Nicolas Petton. I have a very simple org-capture-template: (setq org-capture-templates '(("t" "Todo [inbox]" entry (file+...
15 views

### emacs: cannot open terminfo database file

I've created a new terminfo entry to enable italics in my terminal, as described here. The new terminfo entry looks like: xterm-256color-italic|xterm with 256 colors and italic, sitm=\E[em, ritm=\E[...
50 views

### How to execute a shell script inside of emacs?

I simply want to execute the whole file I am editing right now in a small shell buffer just like I can run my python script. How can I do this?
13 views

### How to make linked word in org-beamer stands out?

I am using org-mode with Beamer. Using the Barkeley theme, I wrote something like this: To [[http:www.google.com][Google]] However, the outputed slide doesn't indicate any hint of the word "Google" ...
38 views

### Setq org-agenda-files in Windows

I'm just looking to add files to my org-agenda-variable. I added a single file successfully but am unable to use multiple. With the code below in my .emacs.el file, the agenda buffer shows 0 TODO's ...
20 views

### Save buffer immediately after org-archive-location

Question How do I immediately save the .org buffer created by org-archive-location? Context and what I've tried so far Current .emacs settings: FILE: .emacs (setq org-archive-location (concat "~/...
50 views

19 views

### Can't use .bashrc file on remote server from ssh within emacs

Login to remote server with ssh in Emacs, general commands run well. Such as ls, docker ls, etc. C-x C-f /ssh:... But when I tried to run a command which alias to another which set in the .bashrc ...
5 views

### Can we get inline results with polymode for Rmd files?

As a new Emacs user, I've recently learned how to use polymode to handle R code in org-mode. I'm happy with it, since I get the same features than those implemented for example in Rstudio for Rmd ...
20 views

### formatting dates in Emacs when run as a daemon

I run Emacs on a Linux (actually Xubuntu 19.04) machine and my localization settings call for an Italian locale. When generating timestamp, however, I'd like to have English months and weekday names....
34 views

A code base I work on has the macro #define when break; case to make switch statements 'cleaner' However this causes problems with indentation, Is it possible to set the behavior of 'when' to be ...
18 views

### Chinese Text commentary syntax highlighting

Plain text inherited from ctext.org contain the following syntax: {{...}} 堯年十六，以唐侯升為天子，遂以為號。{{《論語·泰伯》疏 案曰：堯典正義云：徧檢書傳無帝堯卽位之年，則此似非伏生大傳文，疑出書緯。}} 辯章百姓。{{見《毛詩·采菽》正義、《史記·五帝紀》索隱、《後漢書》注}} ...
42 views

### ELPA list is missing markdown-mode according to list-packages

I'm trying to install markdown-mode using instructions on https://jblevins.org/projects/markdown-mode/, according to which I put into my init.el file (require 'package) (add-to-list 'package-archives ...
23 views

Have recently upgraded to Ubuntu 18.04 which required an emacs reinstall of version 24 Now I've noticed that my symmetrically encrypted org mode file (file.org.gpg) no longer requires me to enter the ...
45 views

### How do I get byte-compilation warnings about undefined variables?

The following code works fine with M-x eval-buffer, and byte-compiles without any warnings. (eval-when-compile (defconst demo-one 1)) (defvar demo-some-var (foo bar ,demo-one)) However, if I ...
20 views

### org-insert-link sometimes produces “wrong type argument: stringp, nil” after prolonged use of emacs

It usually happens after a couple of days of use that C-c C-l / org-insert-link inside .org files does not allow me to insert new links anymore. What I want to do is interactively insert link ...
36 views

### How can I get flush left text in org-indent-mode?

I open an org file in emacs and it displays thus: I enable word wrap with M-x visual-line-mode and get: But I prefer the extra indenting of headlines provided by org indent mode, so then do M-x org-...
15 views

### Outline minor mode + mouse

XEmacs had outl-mouse that used outline-minor-mode plus a few pixmaps and mouse keybindings to let old lazy guys to hide and show (in my use case) sections and subsections etc of my AUCTeX buffers, ...
245 views

### How to modify a string without altering its text properties

If I propertize a string and save it to a variable, how can I change the string within that variable without altering its text properties? For example: (setq myvar (propertize "testing" ...
40 views

Is there a way of calling (end-of-buffer) that excludes trailing empty lines?
43 views

### Directed Acyclic Graphs in Org mode, and Cloned Nodes

By default, Org-mode headers form trees. That is, every header can have an arbitrary number of sub-tasks, and this relationship is recursive to an arbitrary depth. However, a task in practice can be a ...
31 views

### How Do I Create a Popup Window?

I would like to create a (read-only) popup window with some text in it, such that the user can close it by pressing 'q'. You know - the kind you see when you try compiling and get errors. Any ...
35 views

### Use Helm for Org Refile Completion

I want to use helm for org-refile completion when determining which heading to refile under. Here are some excerpts from my initialization script. (setq org-refile-targets '(("~/Documents/GTD/Gtd....
14 views

### Org-mode tell paragraph position in subtree

Is there a quick way to show where a paragraph is sitting in the document structure hierarchy? * Chapter 1 ... * Chapter 5 ** Section 4 ... paragraph X I would like to tell that paragraph X is ...
34 views

### org-mode numbered list across headings

I have a list of items. * Heading 1 1. Item 2. Item * Heading 2 1. Item 2. Item 3. Item Is there an easy way to make the numbers run across the headings like this? * Heading 1 1. Item 2. Item * ...
66 views

### How can I quit from multiple-cursor mode by ESC

I want to bind ESC to quit from multiple-cursor mode. This code doesn't work: (define-key mc/keymap (kbd "<ESC>") 'mc/keyboard-quit) How can I do it?
27 views

### How to use recover-session and dired-omit-mode?

I have enabled dired-omit-mode globally with (add-hook 'dired-mode-hook #'dired-omit-mode). When using recover-session, I don't see any files. How to fix this? Creating a .dir-locals.el containing ((...
19 views

### After setting bookmark: Wrong type argument: listp, "~/.spacemacs`

So I did just M-x bookmark-save in my original .spacemacs file, which lead to the case that when I booted Spacemacs, I get the following error: Upgrading bookmark format from 0 to 1... mapcar: Wrong ...
13 views

### Synchronised scrolling in Evil mode

Is it possible to do synchronized scrolling of two windows in Evil mode, similar to what :set scrollbind does in Vim? sroll-all-mode doesn't quite achieve this. For example, it doesn't scroll on G or ...
49 views

### Why an error when calling a command in a specific buffer?

Q: why do I get errors when calling a command from a specific buffer, but not in any other buffer? Scratch all of what I had previously said about call-interactively (see strikethrough below for ...
30 views

### How to use a org-capture template expansion several times in a captured note

I am trying to create a org-capture template that re-uses some text given with the ‘%^{PROMPT}’ expansion along several points of the created note. I have looked in this link and in stack overflow ...
27 views

### Align statement breaks on rhs with equal sign

Is there a way to have rhs statement breaks align with the equal sign on the lhs line? e.g. some_value = a * b + c / some_other_value * x; becoming some_value = a * b + c / ...
40 views

### Custom indentation for macros in C mode

I'm working in a codebase with an extensive use of function macros and I'm having some difficulty finding the correct way to set indentations with them. Specifically, we pass a lot of statement lists {...
55 views

### How replace either of two words using a regexp to find them?

Text How are you? I'm just fine. I need to add some suffix to the next words: are and fine. I try this: $$are$$|$$fine$$ but it doesn't help.
25 views

### Mapping new command involving <escape> clear all predefined <escape> commands

I have the command fill-paragraph mapped to key <escape> q, it is mapped by default in emacs. Now I want to map the opposite command, unfill-paragraph, to key <escape> p. However, when ...
15 views

### Speedbar opens a normal text buffer, not dired like

I'm trying to use Speed bar when coding C++. My problem is, when I type M-x speedbar it opens an already opened code file instead. Here you can see the effect:
18 views

### Missing color support (for exa) in eshell

I just started using eshell. But the color support for some commands seems to be missing. For example I like to use the command exa, because of its nice colors. But in eshell it is all black.
33 views

### Org-ref not communicating with Tex-live?

Org-ref cannot tell that I have biblatex-caspervector installed. Is this because of some packages that I missed?
29 views

### org-mode internal link works only in some cases

I have an .org document with the following structure. * Headline 1 This is some text * Headline 2 :Custom_id: h2 This is heading number two ** Sub heading 1 <<target>> ** Sub heading ...
35 views

### Is it possible to apply a function to every region between two “marker” lines?

I have a .tex file that looks something like this: \$ cat foo.tex \begin{document} \begin{question} lots of multiline text with several paragraphs of information \end{question} other text \begin{...