All Questions
26,296
questions
0
votes
1
answer
19
views
How can I treat org-agenda-custom-commands as an associative array?
Every time I run this, it gets added to the list, but I want to replace the entry "ab" with any new definition I come up with.
(setq hukarz
`("ab"
"foo bar"
...
0
votes
0
answers
18
views
Mixed display-line-numbers-type for evil users?
I want something like:
(setq display-line-numbers-type 'mixed)
Which count wrapped line as "relative", and count folded line as "visual"
Is there any way to achieve this?
Say I ...
0
votes
1
answer
48
views
Using advice-add to redefine a function call within another function
The function outshine-cycle (part of Outshine) calls the function indent-relative. I would like that instead, it called the function indent-for-tab-command.
To do this, I want to advise the function ...
0
votes
1
answer
17
views
require 'package vs with-eval-after-load 'package
(require 'eglot)
(do-something)
There's another..
(with-eval-after-load 'eglot
(do-something)
)
They seem to do the same, are there any difference?
0
votes
1
answer
24
views
Is there a cross platform way of accessing the GUI clipboard from emacs lisp?
I run emacs with a common configuration on osx and linux. I have some custom functions that need to get access to the GUI clipboard. I find interacting with the clipboard a bit of pain - so I've ...
0
votes
0
answers
10
views
Preventing already-selected items from appearing in subsequent completing-read-multiple completions
The problem is probably more evident when using Vertico, but I suspect the behavior is present in completing-read-multiple itself.
If I've got the following form:
(completing-read-multiple
"...
1
vote
1
answer
25
views
In web-mode: how can I identify matching tags?
I'm using web-mode for PHP.
When I'm navigating through tags, it would be helpful if I could visually identify a matching half of a tag pair.
Something like this exists for other modes, so I'm ...
0
votes
0
answers
29
views
pdf opening issue in emacs terminal
I am a new user of emacs. I have installed emacs 27.1 in my Ubuntu 22.04. I can successfully open my ms.tex file in emacs (terminal). After that, I press the C-c C-c command and then I type my file ...
1
vote
0
answers
32
views
Headline as the default description for an org-id link
I am using org-id to create links to different headlines in an org file. When using org-insert-link (C-c C-l), I select id as the link type option. Then I press RET. I have :complete configured to ...
0
votes
0
answers
192
views
Using (use-package ...) with Emacs 29+
I am using Emacs 29.1, which ships with use-package, and I want to install and load the MELPA bm package through the init file.
I am using the following test-init.el init file:
(defun my-packages ()
...
1
vote
2
answers
48
views
How can I make occur display only first line of match?
The context for this is that I was trying to write a function to help me write LaTeX, specifically I'd like to list all the future references, i.e. when you use a \ref{<something>} before \label{...
0
votes
0
answers
23
views
Emacs is generating HTML file when opening markdown files
I don't know what is happening and how to debug this.
I moved my Emacs config from Fedora to Xubuntu 22.04 (that use older version of GNU Emacs)
and now each time I open markdown file (only once per ...
0
votes
0
answers
20
views
org-babel-detangle writes duplicated code
I am trying to use org-babel-detangle for a while, but the source code is detangled twice in the main org file.
Interestingly, when I run (org-babel-detangle "file_name.cpp") it does not ...
0
votes
1
answer
22
views
When can function not be redefined in init.el?
To solve a problem with the Gnus' IMAP search in Exchange folders with Emacs 28.2, I have the modified piece of code from gnus-search.el below. However, if I add this to my init.el on starting Emacs ...
0
votes
0
answers
15
views
Doom(?) Emacs: whitespace-mode uses incorrect style in c-mode?
I'd like emacs to display tab-marks nicely in c mode: here's an example of how it displays tabs in my config.el, which is how I want it to display tabs everywhere.
You can see the nice > ...
0
votes
1
answer
18
views
How does emacs catch scroll events in the terminal?
The exact title. this is a somewhat related question. I'd specifically like to know how mouse scroll events are caught when invoked as emacs -nw.
Mode 1049 (alternate screen buffer) and 1000 (mouse ...
0
votes
1
answer
16
views
How to make my own evil(?) mode? view mode while debugging?
I'd like to switch between two modes
source editing mode
debug mode (where source is read-only, and you can use all other regular emacs commands + some debug related hot keys (such as n for next)
...
0
votes
0
answers
21
views
How to write BCE dates in org-mode
I need to write BCE dates in org-mode. I'm particular about consistency and it kills me to have to write dates two different ways.
I'm hoping there's something like [-7000-01-01] to denote January 1st ...
0
votes
2
answers
73
views
how to swap month with day
I have a file with the date of birthday of my friends, I use this to remember me the date if birthday...But I have a problem: the date are set in the US way (month-days-year). I would like to change ...
0
votes
0
answers
70
views
How to make org-babel evaluate noweb reference only once?
To get user input for a shell script, I prepared an emacs-lisp source block.
#+name: get_text_from_user
#+begin_src emacs-lisp
(let ((text (read-from-minibuffer "Enter some text> ")))
...
3
votes
2
answers
109
views
`fill-paragraph` prevent breaking
I'm trying to prevent fill-paragraph from breaking a certain type of string:
<<dd_display: %9.3f abs(_b[2.rep78])>>
This is an inline Stata dynamic tag. The <<dd_display: and >&...
1
vote
2
answers
63
views
Difference between emacs and emacs --load ./init.el
I have the init.el file with following configuration:
(require 'package)
(add-to-list 'package-archives '("tromey" . "http://tromey.com/elpa/"))
(add-to-list 'package-archives '(&...
1
vote
3
answers
301
views
Does Emacs has a built-in function for unpacking lists with an arbitrary depth that keeps nil values?
What I'm looking for
I want to have a function that given the following inputs, returns the following outputs.
Input
(1 nil)
(1 (2) (nil))
(1 (2 (3)) (nil (nil)))
(1 (2 (3 (4))) (nil (nil (nil))))
(1 (...
0
votes
0
answers
12
views
smartparens face for enclosing parenthesis?
sp-show-pair-matching-face is the current matching face.
I think smartparens also has a face to the enclosing open parenthesis.
I can't find its name
related question is, can I find out the face of ...
3
votes
1
answer
51
views
Permanent two-horizontal-windows configuration
I want my emacs frame to be permanently split into two (or sometimes 3 - with a different monitor - but let's talk two for now) columns of windows.
E.g., C-x 0 and C-x 1 may only affect the windows in ...
0
votes
1
answer
37
views
Can eshell provide TRAMP auto-completion?
If I use find-file with a TRAMP method to navigate to a remote file in a docker or kubernetes container I'm provided with auto-completion:
C-x C-f /docker:frosty_cori:/home
In the example above, if I ...
0
votes
1
answer
44
views
How can I remove the tex file after generating pdf using `org-latex-export-to-pdf`?
My goal is to export org file into a pdf file . In order to achieve it I am using org-latex-export-to-pdf:
org-latex-export-to-pdf Export current buffer to LaTeX then process through to PDF.
...
1
vote
1
answer
25
views
smartparens, just disable automatic insertion of parentheis
I 'd like to try smartparens but don't like the automatic parenthesis insertion.
Can I turn it off that feature only?
Or is it meaningless to keep the mode after I disable the feature?
1
vote
0
answers
21
views
CDLaTeX: No such modifier ‘t’ outside math mode
I'm trying out CDLaTeX, but I'm running into the problem that when typing e.g. "don't" in text mode, I get:
cdlatex-math-modify: No such modifier ‘t’ outside math mode
I have a similar ...
1
vote
0
answers
29
views
extra chars with emacs -nw
when emacs -nw opens a file from term (gnome-terminal, alacritty), there are extra chars like
[I
If I move the mouse in and out of the terminal, we get more of these [I[I[I
(the brackets can be paired ...
0
votes
1
answer
21
views
accept a single character with a default value? read-char with default value?
How can I read a single input from minibuffer ,
and provide a default value at the same time so he can just enter to accept?
0
votes
1
answer
25
views
How to Create a Sparse Tree Based on Two or More Properties
I have multiple headlines with two Properties A and B, storing the numerical values 0, 1, 2, 3, e.g.:
* Headline
:PROPERTIES:
:A: 2
:B: 3
:END:
I want to create a sparse tree based on the values ...
0
votes
0
answers
13
views
Can a noweb block be directed to a specific output block?
I know you can give a block the property :noweb-ref give it a reference name like foo and then in another noweb block you can refer to the reference block with <<foo>>. However this means ...
1
vote
2
answers
35
views
How to detect when emacs is started with `--debug-init`?
I'd like to turn some things off normally and then re-enable them when emacs is started with --debug-init. For example, I get loads of warnings about the length of doc-strings in packages. I want to ...
0
votes
1
answer
34
views
How do you generate a TOC (Table Of Contents) in markdown-mode?
The function needs to get at least the levels two (## title) and three (### title) titles.
-1
votes
2
answers
52
views
Writing a conditional in a compact way
Could I write the if condition on the same line. Is there any other way to include the equivalent of the if conditional in a more compact way ?
(pcase grapheme
("dinkus"
(if (...
0
votes
0
answers
8
views
spacemacs|use-package-add-hook for :hook and :bind?
spacemacs provides spacemacs|use-package-add-hook for extending :init and :config but not :hook or other keywords.
Are there way to preserve the use-package syntax when writing spacemacs layers that ...
0
votes
1
answer
40
views
How can I make toggle-truncate-lines work in narrow windows?
With toggle-truncate-lines, there seems to be a limit on the width of the window when this setting works. If the window is smaller than allowed, it doesn't seem to work.
How can I remove this limit?
0
votes
0
answers
9
views
hydra, let all keys work but not allow insert (self-insert-command)
I am setting up hydra + dap.
Although dap-hydra is provided, it messes up keybinding often times.
Often, I forget the hydra window is open and type something and messes up typing.
Furthermore, when ...
0
votes
1
answer
53
views
Function with two completing-read [closed]
I want a function designed to accept two completing-read calls, one to set nstruc that holds either "Glyph" or "Command", and actm that holds either "alpha α" or "...
0
votes
0
answers
24
views
How can I simulate book parts in org-mode?
I can get a nicely highlighted separation of chapters
with book.org
#+title: Species
#+author: CRD
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style.css"...
0
votes
0
answers
16
views
Copying nvmap-defined keybindings to emacs-state using a different prefix key
I use general.el to define keybindings. For evil-mode, I've use nvmap, using something like the following:
(nvmap :keymaps 'override :prefix "SPC" :global-prefix "M-SPC"
&...
0
votes
0
answers
23
views
File names with spaces in Org link DESCRIPTIONs are not properly exported to html
Emacs 29.1 (on Windows); Org 9.6.6 manages to export file descriptions as clickable buttons only when the path to the file has no space(s) in it.
Links like these
#+caption: File name with spaces
#+...
0
votes
0
answers
12
views
A file I was using for org-capture has been renamed (*filename*.org -> *filename* (1).org, is this normal?
I wanted to rule out this being a feature of org-capture, maybe a result of manually editing the file or something?
If anyone has any other suggestions as to what else could have caused it I would be ...
0
votes
1
answer
43
views
How can I use the JSON result of org-babel in curl?
I first define
#+NAME: 01H7T457WEWS07WD5T05BS5CN9
#+begin_src shell :results verbatim replace drawer :wrap src json
echo "foo"
#+end_src
#+RESULTS: 01H7T457WEWS07WD5T05BS5CN9
#+...
1
vote
2
answers
112
views
Converting 'day' value to a timestamp
Org agendas use 'day' values in various APIs. I'd like to continue using the wonderful ts.el package to keep all my own automation using a timestamp implementation that clicks in my own head. (Elisp's ...
0
votes
0
answers
20
views
Evaluating expressions inside conditionals in org tables [duplicate]
Evaluating expressions inside conditionals works in elisp
(defun usd(amount currency)
(if (string= currency "USD")
amount
(/ amount 3.75)))
(usd 123 "USD") ; => 123
...
0
votes
0
answers
10
views
Org included child documents and macro expansion
I have a master doc (master.org) and child docs (A.org, B.org, etc.) I have a macro which uses the name of the current file to create chapters, so for example when I do {{{sections}}}, the macro ...
0
votes
0
answers
18
views
using desktop.el in --daemon mode
I eventually figured out that the answer to this question
https://groups.google.com/g/gnu.emacs.help/c/WZoW0LlqX6c/m/08Sa6alHp1oJ
was to choose --bg-daemon rather than --fg-daemon when starting the ...
0
votes
1
answer
22
views
xref-find-apropos vs vc-git-grep
I 've been using git specific commands from helm (I think it internally uses vc-git-grep
I find xref-find-definitions work very well. and wonder how xref-find-apropos compare with vc-git-grep
I coulnd'...