# All Questions

22,618 questions
Filter by
Sorted by
Tagged with
2answers
1k views

### Using emacsclient as git config core.editor and invoking git commit as shell-command in Emacs?

I am trying to use Emacs 25.1.1 (graphical version, Windows 10) as both the primary editor and the editor for git operations. In my workflow, I invoke git through M-x shell-command. I tried the ...
1answer
13 views

### How to automate the test step in "debugging by bisection"?

Sometimes I run into a problem with Emacs that goes away if invoke Emacs with the --no-init-flag. In other word, I can deduce that the problem in question is caused by code somewhere in my .emacs file....
0answers
7 views

### How can I change code-sample's font color if its inside a quote

In markdown I can do following: code-sample inside a quote. Example: > code_sample output, which has white font color: How can I do similar behavior in org-mode, where keeping the code-sample's ...
0answers
11 views

### Ivy minibuffer colums not left-justified with my setup

I am following System Crafters series on Emacs from Scratch on YouTube. With my configuration as I have set it up, Ivy doesn't appear in nice left-justified easy-to-read columns. I am trying to figure ...
0answers
3 views

### How to bind a terminal command to a key for python code autoformatting using autopep8

I'd like to autoformat my python code from the buffer that contains it with a key. I was looking at this tutorial. One can autoformat the code from the terminal with the command: autopep8 --in-place --...
1answer
22 views

### Fold second-level (all methods) when opening a py-file (with hs-minor-mode)

I use hs-minor-mode currently. When point is on class Foo... a M-x hs-hide-level will fold all methods of that class. This is exactly the state I need for all *.py files when I open them. Is it ...
1answer
11 views

### font-lock not working with my custom face

I defined a custom face (defface my-face '((t . (:background "green"))) "text") that I want to use for font-lock syntax highlighting. (defvar my-font-lock-keywords ( ("^\...
0answers
5 views

### org export: including embedded table of contents in pdf file

Using the org export > latex > pdf workflow, I am wondering if it is possible to include a table of contents or outline embedded in the pdf, without necessarily printing it in the file itself? ...
2answers
26 views

### Org ref: (wrong-type-argument stringp nil)

I have just installed Emacs 27.9 on a new Mac running Monterey 12.0.1 (using https://emacsformacosx.com) I then installed org-ref by putting the following lines in my .emacs: (add-to-list 'load-path &...
0answers
10 views

### Let emacsclient try to reconnect after running alternate_editor

If I set alternate_editor to an empty string, emacsclient runs "emacs --daemon" and then tries to reconnect. However, I want to run it a specific emacs executable that is not in my path. If ...
1answer
8 views

### How can I prevent Orgmode from opening links to *.jot files using GNU less

When I open a link in Emacs Orgmode to a *.txt or *.org file, the files are opened in a new Emacs buffer. However, I have a self-created set of plain-text *.jot files. If I open an otherwise ...
1answer
202 views

### Syntax highlighting is breaking in long bibtex files (spacemacs bibtex layer)

So I have a long papers.bib bibtex file that I edit with emacs (spacemacs bibtex layer), but the syntax highlighting only ever goes about halfway down. Here it is at about line 790: Other times this ...
0answers
6 views

### How can I prevent opening URL in the browser using cmd+ret in org-mode

If I am on top of a URL and pressed cmd+ret (cmd+m), it opens the link on my default browser. I just want to have default behavior of cmd+m, which is new-line. Is it possible to prevent this while ...
1answer
238 views

### Determine if any frame has input focus?

I have a function that gets called when idle, but I would like it to run only when a frame has input focus. My current work around is to use focus-in-hook and focus-out-hook to change the behavior ...
1answer
77 views
+200

### Display relative dates in org-mode property drawers

In org-mode documents, I very often add drawer properties to hyperlinks. To illustrate, here is an example with various data attached to a GitHub repository link: * https://github.com/caddyserver/...
0answers
13 views

### itemize shortcut environment in emacs

I know that M-RET creates a \item in emacs (latex mode) even if there is no \begin{itemize} \end{itemize} around. In the case we are not within such environment I am wondering if it is possible to ...
0answers
6 views

### Syntax highlighting and formatting in org-src-mode editing mode

If I installed the correct mode and create a block like this. #+BEGIN_EXAMPLE k8s ... #+END_EXAMPLE I got correct syntax highlighting in the example block, but no syntax formatting. If I enter edit ...
1answer
367 views

### AUCTeX Preview rung error

I'm new to emacs and AUCTeX and I'm having a problem with document preview (C-c C-p C-d). My LaTeX file is the following \documentclass[11pt, a4paper]{report} \usepackage{cite} \begin{document} \...
1answer
756 views

### How to get org-mode fully support Arabic language for export?

My intention is to write Arabic document using org-mode. Please consider the following MWE, given that my configuration in init.el has below code to enable writing of Arabic script from right to left (...
1answer
188 views

### How do I set evil mode to use the normal state by default in Customize mode?

When I open the Easy Customization in Emacs, I want to be in normal mode instead of emacs mode. Is that possible?
1answer
56 views

### Nonexistent newline on display after using outorg

I'm using outorg to convert an elisp file to an org file and then back to an elisp file via (outorg-convert-to-org) and (outorg-convert-back-to-code). When I do this conversion I notice that it looks ...
1answer
24 views

### org-link-open fails with Wrong number of arguments: (1 . 1), 0

I recently added a config entry to my ./doom.d/config.el to enable Firefox as a default browser for opening links. Below is the entry I added based on this post. ;; Set specific browser to open links ...
2answers
464 views

### How to select and delete a column of text in emacs?

I have this text 1 A 2 B 3 C I want to remove the first column to make it A B C Ok so I need to make a rectangle. Reading about rectangles I see "To specify a rectangle for a command to work on,...
1answer
17 views

### How can a function check which major mode is enabled?

The accepted answer to this question says: When the function is invoked, it can test the current mode and do something appropriate. For example, for some modes, or all modes except some modes, it can ...
1answer
41 views

### Why are defvars in my macro ignored?

I want to use a macro to define variables. However, evaluating the macro does not define these vars. I seem to be missing something, but I can't find it. Here's the code: (defmacro delve--build-cmp (...
0answers
11 views

### How to debug error in process sentinel?

I've recently switched to doom emacs, and for the most part it's working great. However, when I'm looking at a folder in dired-mode, if I copy a file using C the file is copied but *Messages* contains ...
1answer
13 views

### How can I apply function max to a list of numbers?

I want to find the max element in a list of numbers. (setq l (list 1 2 3 4 5)) What is an easy way to call the max function on l? So far I have this but this seems convoluted: (eval (max ,@l)) It ...
1answer
164 views

### How to export top level trees in an org file to corresponding files?

Executing the following code should create, for each top level tree in your file ~/tmp/file.org, an other file in ~/tmp named after the tree heading and containing its content. Problem: it does not ...
1answer
16 views

### Keybinding shortcut for Tufte html export

I've perused a few of the org-mode html-export keybinding shortcuts, i.e., ways to just have one key do, e.g., the entire long-winded C-c C-e h o. Unfortunately, there doesn't seem to be one fell ...
0answers
16 views

### How to get more specific error message when loading major mode with syntax errors

When I load my custom major mode, Emacs reports an error in the minibuffer about unescaped character literals, but it doesn't say where. I cannot even copy the error message here, since it disappears ...
1answer
27 views

### reftex does not recognize references even though default bibliography file is defined

reftex-citep does not suggest any possible completions, even though the variable reftex-default-bibliography is set to the correct bibtex file. What else do I need to do to get reftex to detect the ...
1answer
26 views

### How to view URL of the links in org-mode

I am using [[LINK][DESCRIPTION]] format to define hyperlinks in org-mode. Org recognizes plain URIs, possibly wrapped within angle brackets, and activate them as clickable links. The general link ...
0answers
21 views

### I'm having difficulty using Latex preview in org mode

I have GNU Emacs 27.2 on MacOS 11.6. I have MacTex 2021 installed. I have a simple Latex equation in between $and$. When I do C-C C-X C-L (Latex preview) I get this message: Creating LaTeX preview.....
2answers
40 views

### How to automatically build org links from an org-contacts contact?

Let's say I have the following contact in my org-contacts org file : * John Doe :PROPERTIES: :EMAIL: john.doe@gmail.com :PHONE: +44 20 7630 2400 :COMPANY: Ubuntu :NOTE: :END: How ...
1answer
35 views

### How can I make a theme use particular face attributes for a given face in a single buffer?

I'm loading a deftheme theme using (load-theme). I'm very happy with it most cases, but in yaml-mode I'd like to change attributes for font-lock-variable-name-face. How can I make the theme use ...
0answers
17 views

### Hiding Lsp UI Sideline but retaining actions

I am just starting to explore the LSP configuration options. But i am facing very annoying problem with lsp-ui-sideline. I like the options that it provides but hate that it shows up right next to my ...
1answer
32 views

### Left-align equation previews (Auctex)

I would like to left-align equations in Auctex's preview's generated by preview-latex. I imagine that this would involve putting fleqn in the documentclass options in whatever latex file things are ...
2answers
154 views

### Elpy can not find flake8 on Windows 10

My elpy package tells me that it can not find the command "flake8" on a Windows 10 machine. Ok, it make a bit sense to me. By default there is no flake8 on Windows 10 installed. I was not ...
1answer
11 views

### How do I mark certain "elisp:" type links as safe?

I have several [[elisp:org-todo-list][todo list]] links in my Org documents. When I use C-c C-o (org-open-at-point), Org mode asks me whether I really want to open that link. While this is good ...
0answers
6 views

### How to change location of filetags on minibuffer

When doing an org-roam-node-find, using Ivy as my completion system, I get in the minibuffer the name of the nodes, and on the far right the filetags for those nodes. But for some of them the tags get ...
1answer
42 views

### How to make backward-kill-word and kill-word stop after it kills a newline character?

kill-word and backward-kill-word deletes too much text: foo(bar) <point> Now if I press C-<backspace>: foo(<point> What I want is: foo(bar)<point> after pressing C-<...
0answers
12 views

### Why doesn't flycheck display any hadolint errors?

I have a Dockerfile with several errors or warnings, but emacs doesn't display any of them. This worked a good while (two years? maybe...) ago. flycheck-mode is active. I see the errors when I run ...
1answer
124 views

### How to use 'glossaries' package in aquamacs, or I mean how could I run makeglossaries in aquatics

I find the instruction from enter link description here as given below \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{glossaries} \makeglossaries \newglossaryentry{latex} { ...
1answer
95 views

### Cannot run cquery

I have been using rtags as my primary C++ mode, but I found that it's performance is not satisfying for large code bases e.g. Linux kernel. It takes more than 5 seconds to find definitions. This it ...
3answers
331 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 "~/...
2answers
333 views

### prettify-symbols-mode enabled for major mode, but ligatures don't show until toggling prettify on and off

I'm pretty new to emacs and giving it a shot because it seems to be much better integrated with the OCaml tool chain than any other editor. Since OCaml uses a lot of symbols, I want to enable ligature ...
1answer
354 views

### setting default columns in org column mode into init file

Trying to set preferred columns in ORG column mode. this works perfectly if I put it on head of the file: #+COLUMNS: %45ITEM %TAGS %PRIORITY %TODO %CLOSED %SCHEDULED But I avoid to repeat it for ...
1answer
213 views

### Org mode agenda fails to show consistency graph

I set up the Org mode consistency graph of habits following the manual. Each habit is, e.g.: ** TODO some habit SCHEDULED: <2019-12-22 Sun 07:20 ++1d> :PROPERTIES: :STYLE: habit :LAST_REPEAT: [...
1answer
15 views

### Allowed values at #+PROPERTY header line not recognized

I'd like to set allowed property values at the top of an org-mode cheatsheet i'm working on. Only two allowed values so far for the CATEGORY property. I'm getting the same "Allowed values for ...
1answer
48 views

### How can I exclude characters from being interpreted as emphasis-markers in Org-Mode?

Is it possible to exclude the tilde ~ from being interpreted as emphasis-marker in Org-Mode in general? Meaning not being escaped but being normal interpreted as simple Text? Emphasis-and-Monospace, ...

15 30 50 per page