All Questions

Filter by
Sorted by
Tagged with
1 vote
2 answers
71 views

Getting the source file line number of the currently executing init file expression (formerly: Malformed macro)

I wrote this macro for my .emacs file to trace its progress during loading: (defmacro checkpoint () `(message "Reached line %i" (1+ `,(current-line)))) So I placed (checkpoint) ...
William R. Greene -- 'Bill''s user avatar
0 votes
0 answers
31 views

Is it possible in Org-mode to disable the jump to tags upon entering a space at the end of a heading?

In Org-mode, I have the tags right next to the heading text, separated by a single space (i.e. org-tags-column = 0). Now, if I have a heading with existing tags, and I place the cursor at the end of ...
aaa's user avatar
  • 456
0 votes
0 answers
36 views

Changing the environment used for external commands

In a shell, I can conveniently change the environment using Lmod, for example: module load nvhpc to load some particular package with compilers. Is there some way to change the environment from ...
Jannis Teunissen's user avatar
0 votes
1 answer
19 views

How to change java file behaviour to use 2 character indentation

If I create a C file I get 2 character indentation which is what I want. However, if I create a java file, eg Hello.java then I am getting 4 character indentation. And I can't work out why. My ....
arcomber's user avatar
  • 219
1 vote
1 answer
27 views

how to include :: in the text of an org mode list without it generating a description list?

I am trying to use org mode to make notes about my programs. The formatting for some of the items in my lists were pushed to the left. I realized that my code includes double colons :: and org is ...
user44126's user avatar
0 votes
0 answers
24 views

Temporary change to grep-find-command à la (let ((grep-find-command ...)) ...)

I'm trying to define a function that runs grep-find using a temporary value for grep-find-command. The following almost works: ;; "fe" is the "iron searcher" that I use internally....
Darren Embry's user avatar
0 votes
1 answer
23 views

how to skip numbering but only for first heading in org-export to html

I'm trying to create a blog. And I want to skip numbering but only for the first heading. Which will be the title of the post. in org: * Toplevel ** Head_1 content 1 ** Head_2 content 2 to be ...
slk500's user avatar
  • 473
1 vote
1 answer
87 views

How can I control the indentation inserted by Emacs because I used the tab key?

This is probably a really basic question, but something I hadn't thought about before: When editing code, how to indent? I think the way to go is simply use the tab key and then, once indented once, ...
arcomber's user avatar
  • 219
1 vote
1 answer
41 views

How to switch to a buffer from terminal with a unique partial name

I have a buffer with the name very-long-name-xyz-etc. This buffer is the only buffer whose name contains xyz. From terminal I can switch to that buffer using the following emacsclientw -cna runemacs --...
Name's user avatar
  • 7,905
0 votes
0 answers
36 views

Make .dir-locals works with compilation

I'm using Emacs 29.1 I have the following .dir-locals.el file: ((nil . ((compilation-error-regexp-alist-alist . '(acap "^#[0-9]+ [0-9]\.[0-9]+ \\(.+?\\):\\([0-9]+\\):\\([0-9]+\\).*" 1 2 3)) ...
Silex's user avatar
  • 821
0 votes
0 answers
10 views

Change Ocaml default repl

I am using Ocaml with emacs. I've configured emacs using opam user-setup install. I'm using the repl a lot and it seems that the default one is utop (When I use C-x C-e or C-c C-a). I want to use the ...
Kriztopor's user avatar
0 votes
1 answer
37 views

How to select a visual block with the mouse

Old Vimmer and wannabe Doom Emacs user here. I'm trying to set up my init.el/custom.el file so that I can select a visual block (a.k.a rectangle or column) in evil mode with my mouse in combination ...
benutzer_a_b's user avatar
0 votes
1 answer
33 views

Org-mode compare column to constant string

I can easily compare strings from two columns, as in: | hello | world | KO | | hello | hello | OK | | world | world | OK | #+TBLFM: $3=if("$1" == "$2", OK, KO) But I can't compare ...
Julien Palard's user avatar
0 votes
1 answer
19 views

How to make Popper.el stop moving cursor to popped buffer?

I've bind a shell-command (via async-shell-command) which I'm executing frequently. I really like popper.el putting the result buffer (from async-shell-command) in nice position. However, (only this ...
Garid's user avatar
  • 686
1 vote
2 answers
37 views

crontab syntax highlighting

Let's look at crontab -e in Emacs vs Vim. Emacs If I run crontab -e in Emacs: EDITOR=emacs crontab -e it looks like this: So we basically have two colors. One for comments and one for crontab text. ...
dharmatech's user avatar
  • 1,274
0 votes
0 answers
24 views

project--vc-list-files wrong-type-argument stringp, nil when using project.el's project file search function over TRAMP

What it sounds like. Trying to use a project in a Podman (distrobox) container, and find-file works fine, so does running an LSP inside the container and transparently talking to it via Emacs, and so ...
Alexis Purslane's user avatar
0 votes
1 answer
32 views

How can I use absolute path with org-download?

I do have an absolute path as my org-download directory, but whenever I org-download an image, the link that is created uses a relative path in the buffer. #+DOWNLOADED: screenshot @ 2024-05-24 14:21:...
Jason Hunter's user avatar
0 votes
0 answers
30 views

Is there workaround to mirror a buffer to a file (similar to indirect buffer)?

I am familiar with indirect buffer capability of emacs. From doc string: An indirect buffer shares the text of some other buffer, which is called the base buffer of the indirect buffer. In some ways ...
Name's user avatar
  • 7,905
0 votes
1 answer
24 views

Can Emacs newer than 26.3 in Linux accept custom toolbar icons?

I have developed an Emacs library that includes a toolbar with custom icons. In my preferred configuration I put my icons under the user home directory so that this doesn't change if Emacs is updated. ...
David McCracken's user avatar
0 votes
0 answers
35 views

How do I get-install an older Emacs in Linux

For Linux I use Ubuntu and have always added Emacs from its current repository by apt-get install emacs. I have encountered a bug in the latest version and would like to install different intermediate ...
David McCracken's user avatar
2 votes
1 answer
44 views

Programatically delete a property drawer if empty

I wrote a function to iterate over all of an org file entries, and remove specific properties from drawer. It works well, and does what I need, but to make things cleaner, I would like to delete the ...
lyndhurst's user avatar
0 votes
0 answers
12 views

Yank to char using avy including the selected character

I want to be able to yank the text to char including the character using avy. For this I wrote the following command: (defun my/yank-to-char-avy () "Delete region from point to a character.&...
Rareform's user avatar
  • 219
0 votes
0 answers
20 views

emacs 28.2: how to delete the first 32 char of each Line [duplicate]

I need to delete the first 32 char of each line that compose my file. Can someone explain me how to do that? I've also read How to delete the first few n chars of every line? this answer, but didn't ...
RenatoP's user avatar
  • 121
0 votes
0 answers
21 views

How can I load a specific language server for a particular file extension?

I'm using emacs29 on linux. At present, if I load a file with the extension '.tsx', and then do 'M-x lsp-mode' I get an error: 'Symbol’s value as variable is void: lsp-ada-project-file' I assume that ...
bob.dobbs's user avatar
  • 111
0 votes
0 answers
8 views

beamer export with cite and macro

I am creating my presentations with orgmode and export via a template to beamer/tex/pdf. This works quite nice. Though for referencing images I am using usually a tex macro to put the reference to the ...
Fabian's user avatar
  • 65
0 votes
0 answers
16 views

Prevent empty line in first output of org-babel bash session

In Emacs 28.2 with org-mode 9.5.5 and --no-init-file on Debian 12 the output of the first evaluation of a bash session is polluted by an empty newline. #+begin_src bash :session c ...
Rovanion's user avatar
  • 987
0 votes
0 answers
21 views

How can I list all org-headings with state changes in the last week?

I store state changes in drawers, like this (customize-set-variable 'org-log-into-drawer t) How can I make an org-agenda-custom-command that somehow lists all org-headings with state changes in the ...
Jason Hunter's user avatar
1 vote
3 answers
311 views

If too lazy to type cd .... into M-x shell

I wish there was a hook, that every time I did M-x shell it would send "cd " . (pwd) . "\n" to an already running M-x shell, and then switch windows to that shell. That way I ...
Dan Jacobson's user avatar
0 votes
1 answer
45 views

How can i configure (doom) emacs to only count prose text in the word count?

I'd like to use Org mode to write stuff like essays, where a specific word count is required. This would be much easier if I could use headings to structure my essay, but my current solution for ...
DJMoffinz's user avatar
0 votes
1 answer
27 views

Is there an org-mode code block that echoes its content back?

Is there a code block type in org-mode that can echo its context (text) back when executed? So, in pseudo-code, the code block: #+begin_src echo { "id": 1, "name": "James ...
tinlyx's user avatar
  • 1,364
0 votes
0 answers
39 views

How to treat ' (single-quote) as an ordinary character in HTML mode?

In a mode derived from html-mode, I want to remove the property that ' opens a quote. I found character properties in the manual, but the following in the .emacs init file does not work: (define-...
emacs drives me nuts's user avatar
0 votes
1 answer
23 views

How to keybind an org-capture template with use-package?

Suppose I bound org-capture with C-c c and a tmp template with t: (setq org-capture-templates `( ("t" "tmp" entry (file ,(concat captures-path "tmp.org"))...
crocefisso's user avatar
  • 1,363
0 votes
0 answers
15 views

Are there any org-agenda commands to delete log entries?

Sometimes I clock in/out of the wrong task and I end up with empty clock lines, which are just noise. Is there any function to delete these from the agenda, without having to open the log book?
unhammer's user avatar
  • 1,169
1 vote
0 answers
22 views

Is it possible to 're-use' the value of a timestamp prompt within an org-capture-template?

I am trying to prompt for a timestamp to be added in the properties drawer, and to re-use the value outside of the drawer so it can be visible when reading/editing the note. I am already using the %\N ...
lyndhurst's user avatar
0 votes
0 answers
8 views

Automatically mark subset of emails as read in mu4e

Lets say that I have a set of automated emails Cc:d to me from [email protected] with the subject Important important! and that I want to automatically mark these as read as soon as they reach my inbox in mu4e, ...
Rovanion's user avatar
  • 987
1 vote
1 answer
45 views

query-replace* (perform-replace): highlighting issue with "act-and-show"

When I use the query-replace* (perform-replace) functions, I can type "," "to replace but not move point immediately." During the replacement, the function highlights the match, ...
Gabriele's user avatar
  • 1,662
0 votes
0 answers
37 views

Trying to get treesitter indents to work with multiple languages for a major mode

I am working on a major mode using treesitter as my parser. It's been pretty intuitive but I ran into an issue. When trying to use multiple languages, you have to specify ranges using nodes in the AST ...
Marc Johnson's user avatar
1 vote
1 answer
44 views

How to use jq-mode to query JSON in org-mode?

I wanted to use jq in org-mode to query JSON, and saw a jq-mode that supports org-babel: jq-mode provides ob-jq for working with literate programming in Org mode. Add jq under org-babel-load-...
tinlyx's user avatar
  • 1,364
0 votes
0 answers
22 views

Avy keybindings

I would like to define keybindings for avy - more precisely, let's say I call one of the avy-goto-... functions, now these all expect a character. I would like to be able to have a keybinding (e.g M-' ...
guibor's user avatar
  • 123
0 votes
0 answers
20 views

Why is clone-indirect-buffer-other-window not a clone?

I find that a clone created this way is not including the beginning of the buffer, probably because the buffer is large? Is there some setting that clones the entire buffer, without leaving parts of ...
Jason Hunter's user avatar
0 votes
0 answers
27 views

Melpa packages not loading

My init.el file looks like this: (require 'package) '(package-archives '(("melpa" . "https://melpa.org/packages/") t ("gnu" . "http://elpa.gnu.org/packages/&...
rogerl's user avatar
  • 205
0 votes
1 answer
36 views

Using a custom verbatim environment

I have my own Python environment called PYT. org exports to latex as follows: #+begin_PYT __elem__ = 1 #+end_PYT generates \begin{PYT} \uline{\uline{elem}} = 1 \end{PYT} which prints literally: \ ...
Rusi's user avatar
  • 345
1 vote
0 answers
18 views

Update *ansi-term* buffer name

When running a Bash in a Xterm it is possible to update the window title by some escape sequence. Is something similar possible with ansi-term? If I open more than one ansi-term the buffers are ...
ceving's user avatar
  • 1,378
0 votes
1 answer
32 views

Why my %(exp) in org-agenda-prefix-format isn't it working?

I am trying to format my category string so it appears shorter in the agenda. All my categories look like that: foo bar - string I wanna keep. My goal is to remove the foo bar - bit at the begining. ...
lyndhurst's user avatar
0 votes
0 answers
18 views

Avoid contents in M-x term to be shown out of the window

Table of contents The problem The question Appendix: Install and use font 5x7.bdf Appendix: My minimal Emacs configuration NOTE: This post contains many screenshots of the graphical interface of ...
Rodrigo Morales's user avatar
1 vote
2 answers
76 views

How can I frame an example block?

In src blocks, I can use LaTeX packages to make them look nice. For example, LaTeX's minted package lets me put a nice frame around my code blocks. The syntax is #+ATTR_LATEX: :options frame=single #+...
J. Mini's user avatar
  • 177
0 votes
0 answers
26 views

package-install RET doom-themes RET no match

I want to install a theme library, the package is already installed but emacs does not recognize it. I have already installed the melpa packages and the gnu packages, as shown in the code below: (add-...
Bruno Ciccarino's user avatar
1 vote
0 answers
29 views

Can I make all src blocks of the same programming language inherit the same #+ATTR_LATEX: block?

Suppose that for Python and only Python, I want #+ATTR_LATEX: :options frame=single to customise my #+begin_src blocks. Does Org Mode have any natural way of doing this?
J. Mini's user avatar
  • 177
2 votes
1 answer
38 views

How can I put a letter immediately after inline code in org-mode?

In markdown, I can write `foo`s to get foos. How do I do the same in Org Mode? ~foo~s doesn't do it and ~foo~ s adds a space.
J. Mini's user avatar
  • 177
0 votes
1 answer
18 views

Locally change the list environment that org mode exports to

I need some lists to be normal lists (latex \enumerate) and some to be inline (latex \enumerate*) from the enumitem package. Is there something like #+ATTR_LATEX I can give to make \enumerate change ...
Rusi's user avatar
  • 345

15 30 50 per page