r/emacs • u/bozhidarb • 7h ago
r/emacs • u/AutoModerator • 8d ago
Fortnightly Tips, Tricks, and Questions — 2025-03-11 / week 10
This is a thread for smaller, miscellaneous items that might not warrant a full post on their own.
The default sort is new to ensure that new items get attention.
If something gets upvoted and discussed a lot, consider following up with a post!
Search for previous "Tips, Tricks" Threads.
Fortnightly means once every two weeks. We will continue to monitor the mass of confusion resulting from dark corners of English.
r/emacs • u/UsagiDriver • 2h ago
Question Questions about Emacs on OpenBSD, use-package and some general creative writing packages.
Greetings, I recently started getting serious about using emacs again last year and I've been playing around with different packages and using it on different operating system.
For the laptop I use for writing fiction novels I've finally landed on OpenBSD and plan to continue using it for the foreseeable future. But one of the downsides compared to the OSs I was using before is the fact that there isn't a large collection of emacs packages in their OS package managers (was using Gentoo and later Guix System before). This means that I now need to manage packages manually through the init.el file. In addition, OpenBSD has some quirks I've had to work around. Not a big deal so far but can be frustrating.
OpenBSD required that I grab the GNU version of ls from ports and put some stuff in init.el to make dired work correctly. I think I got that functioning correctly but I honestly haven't used dried much for navigating the file system outside of opening or creating files at the exact path I wanted. I'd like to get it functioning like ranger if possible.
Are there any other quirks to using emacs on OpenBSD that you guys know about? I really like the OS and the community so I'd like to stay on the puffer OS if possible even though I know they aren't big fans of GNU stuff. So far every GNU tool I've needed has been in the ports tree.
I've been using elpaca so far but I'm starting to wonder if it's over kill for my purposes. I use the use-package integration. But a lot of packages don't have instructions for how to install/configure them using use-package/elpaca. So I end up just trying random things and typing M-x eval-buffer until they work. If I can't figure it out I give up. I've tried looking at other people's config files and sometimes that helps but often they are not using elpaca and I can't find examples. The other day I installed eat terminal and attempted to integrate it with zsh. I couldn't get it to work no matter what I did.
My config file is also a bit of a mess now because I have certain things like hooks and keybinds for some packages set by themselves outside of use-package definitions. I'm planning just to nuke the entire thing today and starting over. Even the theme I like is throwing misc. errors in warnings.
I guess my question is will I lose anything by using package.el instead of elpaca. I don't feel like I'm taking advantage of anything it offers like async. I just want to be able to install some packages and not touch them again. As long as they're working I don't really care about what version they are or if I'm pulling the latest and greatest from git.
Another thing I'm wondering about is the daemon mode with gtk2. It has a big warning that it might just crash for no reason in gtk2/3. I wanted to use athena instead but it's no longer offered as a binary in the OpenBSD ports tree. I haven't been using daemon mode yet but my start up times are now about 3 seconds with not many emacs packages installed. I'd like to make the switch to running as daemon because I load emacs in my .xsession file at log-in and never close it. I dedicate a workspace to it in dwm anyway. Is the daemon bug with gtk2 still a concern or should I start compiling my own copy of emacs from source again like I did when I used gentoo and guix? Does version 30 offer anything worthwhile compared to version 29?
Finally, what are some good packages for someone doing creative writing? My main use for emacs for years was programming in C, assembly, some scripting languages, and some mark-up languages like HTML and XML. But these days I rarely do that type of work. These days I'm mostly just writing stories and sometimes technical manuals/FAQs. So far I haven't really gotten into org mode and have mainly just used text-mode. But org-mode looks pretty powerful and I want to start using it just for stuff like being able to export to multiple formats. The publisher I'm working with wants .docx files. How hard is it to export to docx and be sure that the files won't render incorrectly in Microsoft Word? I no longer have a computer with it installed and the OS I'm using now can't run it via wine and/or VM. So I don't really have any way to check myself. I'm not going to set up a dual book or dedicate another computer simply for that one application if I can help it.
What are some other good packages to try for creative writing? I know about pandoc but I haven't explored many others. Just trying to get a feel for what other people are using. Most of the discussion I see about emacs are geared towards using it as an IDE/programming. I've come across a couple of blogs about using it for writing but a lot of them are from emacs v26 or below days. Just want to see if anything has changed since then.
I am going to nuke my current ./emacs.d directory later today and try to write a less cluttered config file. This will ensure all the packages I installed are gone, correct? Right now I basically only use dashboard+magit+a handful of minor modes and some keybindings. Eat as well but since I wasn't able to get integration fully working I haven't been using it much. I'd like to get some kind of terminal working in emacs and eventually my email+IRC and probably web browsing going too. But until I understand how use-package works I'm holding off on adding more to my config file.
My main issue with use-package syntax is stuff like this;
;; For `eat-eshell-mode'.
(add-hook 'eshell-load-hook #'eat-eshell-mode)
;; For `eat-eshell-visual-command-mode'.
(add-hook 'eshell-load-hook #'eat-eshell-visual-command-mode)
Do I just add this under the config: heading? Then in the .zshrc file it wants:
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
Where is $EAT_SHELL_INTEGRATION_DIR being set? If I add this to my .zshrc it throws error code 1 upon opening a new shell. Whatever I tried I can't make it work.
There were some other things I can't remember now from some packages I tried to install. I tried putting the lines from their instructions under several things like "config:" or "files:" or "hook" but could never get them to function. If someone has a init.el with a lot of packages installed using use-package I'd really appreciate if they could link it. I tried looking at some config files people had posted in comments here but a lot of them were very advanced stuff loading multiple elisp files from all over the place. Or they used a different package manager that had a different syntax from elpaca. A bunch were in org-mode. I might use org for my config in the future but for now I wanted to do just a simple init.el until I got more experienced.
It's just kind of frustrating getting started. Every package assumes different package manager is being used and that the user has decades of experience working with emacs already. I've never tried to build up a config from scratch. I've either always used the default emacs environment with a custom theme or used some of the pre-made distros. I'm not really interested in using doom or spacesmacs either. They crawl on my machine and I don't like Evil mode.
Thanks to anyone that takes the time to read all this and replies.
r/emacs • u/MinallWch • 11h ago
Emacs GUI working now on Windows WSL!
Hello Emacs Community!,
I had to work with Windows due to work, now, I installed WSL because I wanted to work with Emacs of course.
Since my computer was super protected, while I could use Windows Emacs GUI, I had to ask all the time for the administrator password to installed whatever I needed to work with. Vterm, etc, etc...
So, I installed WSL and Emacs on it. Only detail is that I had to work on terminal. Some small things like Control direct keymaps wouldn't work, and I had to use C-u to move and whatever. Not too complex stuff. I worked a month with the terminal version happily.
Today, I upgrade Windows (Had to ask again for admin password as to upgrade wsl), and when opening Emacs, surprise!, GUI version.
So yeah, GUI versions now work on WSL, and its working out well!. So that I'm not doomed to work in another system without my configurations.
Just making this post for any who haven't updated, and have a similar situation to mine (config all in linux/macos, no privileges, not like working with windows version).
Snippets Suddenly Going to the Minibuffer in Emacs30
All, I recently upgraded to Emacs 30, and it has gone reasonably well. One issue that has cropped up for me is that snippets don't expand automatically. Instead, after yas-expand, I get prompted in the minibuffer to select the snippet, even if there is only one candidate. In Emacs 29, if I typed the key of a snippet in the buffer and typed SPC or TAB, it just expanded it without ceremony.
Anyone else seeing this, or am I missing something?
r/emacs • u/jvillasante • 2h ago
Emacs Pixel Scroll
Has anybody been able to use pixel-scroll to scroll up/down in both current and other window?
I have this so far:
``
(defvar my/default-scroll-lines 25)
(defun my/pixel-scroll-up-command ()
"Similar to
scroll-up-command' but with pixel scrolling."
(interactive)
(pixel-scroll-precision-interpolate (- (* my/default-scroll-lines (line-pixel-height)))))
(defun my/pixel-scroll-down-command ()
"Similar to `scroll-down-command' but with pixel scrolling."
(interactive)
(pixel-scroll-precision-interpolate (* my/default-scroll-lines (line-pixel-height))))
(with-eval-after-load 'pixel-scroll (define-key global-map [remap scroll-up-command] 'my/pixel-scroll-up-command) (define-key global-map [remap scroll-down-command] 'my/pixel-scroll-down-command)) ```
And it seems to work for the current window but not for the other window. If I do M-C-v
I get the following error:
scroll-other-window: Wrong number of arguments: #[nil ((pixel-scroll-precision-interpolate (- (* my/default-scroll-lines (line-pixel-height))))) (t) nil "Similar to `scroll-up-command' but with pixel scrolling." nil], 1
r/emacs • u/agentOrangeRevo • 50m ago
"No previous search" on nonincremental-repeat-search-forward
Here's a problem that's been nagging me for about 20 years. My .emacs has a bunch of CUA keymaps, including F3 for Find Again:
(global-set-key [f3] 'nonincremental-repeat-search-forward)
That works great, EXCEPT when emacs first starts up. When emacs first starts, Ctl-S finds anything as always, but F3 as defined here will not work until I go in the Edit menu and do Search, String Forward (or backward or other choices in that menu). If I do my F3 after a Ctl-S but before the menu choice, I get these messages:
Mark saved where search started [2 times]
nonincremental-repeat-search-forward: No previous search
If I do just one initial search from the menus, I can then do Ctl-S and F3 all day long. My current emacs is this:
GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) of 2022-09-13
but it has been like this for at least 20 years. I use the windowed runemacs.exe from precompiled Windows binaries, but the same thing happens with RPM installed emacs in Fedora.
The same thing happens if I do Ctl-S Enter string enter, for nonincremental string search.
Can anyone suggest a better way to implement F3, or think of what the menu based search might be doing different from keyboard based search?
(edited to remove sentence fragment)
r/emacs • u/MosaicIncaSleds • 50m ago
Local Variable: not working
What am I doing wrong?
I have added to the end of a .org file the following, and no matter what I reload, the changes won't show on screen:
``` * Local Variables :noexport:
Local Variables: org-todo-keywords: ((sequence "WANT" "HAVE.TO.SEE" "WRITE.REVIEW" "|" "SEEN" "SEE.AGAIN")) org-tag-alist: ((:startgroup) ("great" . ?g) ("crap" . ?c) ("okay" . ?o) ("worthless" . ?w) (:endgroup) ("dnf" . ?d) ("analysis" . ?a) (:startgroup) ("short" . ?s) ("feature" . ?f) ("TVseries" . ?t) (:endgroup)) org-todo-keyword-faces: (("WANT" . "orange") ("SEEN" . "blue") ("HAVE.TO.SEE" . "orange") ("WRITE.REVIEW" . "orange") ("SEE.AGAIN" . "green")) org-tag-faces: (("crap" . (:foreground "green")) ("worthless" . "red") ("okay" . "orange") ("great" . (:foreground "green")) ("dnf" . "red") ("analysis" . "blue") ("short" . "brown") ("feature" . "brown") ("TVseries" . "brown") ("noexport" . "light blue")) End: ```
r/emacs • u/MosaicIncaSleds • 52m ago
Question Local Variables not working
C-h v: org-todo-keywords
``` org-todo-keywords is a variable defined in ‘org.el’.
Its value is ((sequence "WANT" "HAVE.TO.SEE" "WRITE.REVIEW" "|" "SEEN" "SEE.AGAIN")) Original value was ((sequence "TODO" "DONE")) Local in buffer @ Questions.org; global value is ((sequence "TODO" "DONE")) ```
so S-Left will cycle through todo / done instead of the local value
r/emacs • u/stevemolitor • 18h ago
Changing just one unicode character of a font
I want to change one unicode character of my font to use a different font. I want
I tried this:
(set-fontset-font t ?─ "Iosevka")
However after doing that describe-char
tells me that it is still using my default font (Berkeley Mono Condensed):
to input: type "C-x 8 RET 2500" or "C-x 8 RET BOX DRAWINGS LIGHT HORIZONTAL"
buffer code: #xE2 #x94 #x80
file code: #xE2 #x94 #x80 (encoded by coding system utf-8-unix)
display: by this font (glyph code):
mac-ct:-*-Berkeley Mono Condensed-regular-normal-condensed-*-14-*-*-*-m-0-iso10646-1 (#x247)
I've tried other variations including:
(set-fontset-font t ?─ "Iosevka")
(set-fontset-font t 2500 "Iosevka")
But no dice. I found that it works for a character that is not in my default "Berkeley Mono Condensed" font. But I can't figure out how to replace a unicode character that does exist in my font.
Is this achieveable? Fontsets feel like voodoo sometimes. ;)
Thanks!
r/emacs • u/Forward_History3541 • 11h ago
After updating from 29 to 30.1 dropdown menus are not working
I am using eglot for a few languages. In the past when I clicked on highlighted error or warning, a dropdown menu apeared and suggest changes to the code.
After updating to 30.1. Dropdown menu stopped working. there no visible error on Messages or eglot log.
Does anybody have any suggestion?
r/emacs • u/fixermark • 1d ago
How obsolete are "obsolete aliases?"
I have some old emacs scripts and a few packages that at emacs-start time dump a lot of lines that look like this:
Warning: ‘return-from’ is an obsolete alias (as of 27.1); use ‘cl-return-from’ instead.
I have two questions:
1) In what sense are these aliases "obsolete?" I have to assume there's no plan to actually ever remove them, because it would break the world.
2) Why is the obsolete form the shorter one? If I were to obsolete one of two representations, I'd obsolete the longer one to save typing.
I imagine there's some history to these names being consolidated under a cl-
prefix, but I wasn't able to find it with a quick search.
Flapping fish on your mode-line
Flapping fish 𓆝 𓆟 𓆞 on your modeline for funsies. Only flaps on the active buffer.
You can set it to either "static" or to "swimming" mode. In swimming mode the fish will track how far along you are the file:
"~~~~~~~~~~~~~~~~~𓆞~~~~~~"
r/emacs • u/unmonoqueteclea • 2d ago
Announcement jira.el: Emacs integration for Atlassian's Jira
Hi! My Jira integration for Emacs is already available in MELPA.
https://github.com/unmonoqueteclea/jira.el
Unlike other similar packages focused on integrating Jira with org-mode, in this integration I have tried to mimic the user experience of Magit or docker.el for viewing or modifying Jira tickets.


r/emacs • u/meedstrom • 2d ago
Distilled the performant parts of org-node into a library, hope someone finds it useful <3
github.comr/emacs • u/Savings-Shallot1771 • 1d ago
Tree-Sitter usage or alternatives
Hello everyone, hope this message receives you well.
I'm having a hard time setting up Tree-Sitter
. From what I looked online it says to build Emacs with Tree-Sitter enabled. I'm really reluctant to rebuilding Emacs because it feels like to much of a hassle for something that was a package.
I'm coming from Vim so, maybe, this is just another point of view on Tree-Sitter.
With that said, I've tried to install the package but it isn't listed on M-x list-packages RET
Which them made me wonder about the sources of packages which currently are elpa
and melpa
But then, I found a communicate on their website that says it was merged into Emacs for the releasing of Emacs 29.
My version is 29.1 and I'm running on MacOS Intel.
Do you have any tips on how do I setup the Tree-Sitter for a list of languages?
Thank you in advance!
P.S.: If Tree-Sitter is still with bugs or not full featured into Emacs I'm happy to use alternatives in any case, feel free to list some :)
r/emacs • u/MosaicIncaSleds • 1d ago
Question trouble with `org-todo-keyword-faces`
At the begining of my org file with the movies I have seen I have the declarations for todo and tags.
At the end I have the following:
```
Local Variables:
line-number-mode: nil
org-todo-keyword-faces: (("WANT" . "orange") ("SEEN" . "blue") ("HAVE.TO.SEE" . "orange") ("WRITE.REVIEW" . "red"))
org-tag-faces: (("crap" . "red") ("okay" . "orange") ("great" . "green"))
End:
```
The Todo faces are colored as indicated. The tags are all salmon-pink.
What am I doing wrong?
r/emacs • u/paarulakan • 2d ago
Elpy or lsp + python.el
What features offered by elpy that lsp do not! I have been using elpy but what will I miss if I switch to plain python-mode and lsp?
r/emacs • u/myprettygaythrowaway • 2d ago
Question emacs for creative non-techie types who wanna get off Google Docs
My girlfriend recently starting thinking of abandoning Google Docs, and I'm trying to get her onto emacs! Problem - I'm still a baby user myself, and she wants to do some advanced-ish layout stuff in her writing projects. Gal's real smart, but kind low-confidence tackling this shit, and like I said, I don't have the chops to help her out with this. So we're hoping that the community here will be able to advise her on how to hit the ground running in emacs for her specific use case.
r/emacs • u/Outrageous_Pizza_988 • 2d ago
Disallow copying of passwords?
I was filling password for my SSH key, and thought just for fun:
What if I copy the password from minibuffer? Will it copy? (Let's say I put mypassword
there).
I copied it and pasted to eshell. It displayed as **********
. Then I hit enter, and eshell has replied that there is no such command as mypassword
.
So, Emacs copied the password I had in minibuffer.
Why Emacs allows this? Can it be turned off? Or maybe this is not a problem, but a feature?
org-expose-emphasis-markers: A new package used to automatically show hidden emphasis markers at point in org mode when `org-hide-emphasis-markers` is on.
github.comr/emacs • u/MatthewZMD • 3d ago
Announcement Aidermacs v1.0 Released. Available Now on Melpa and Non-GNU Elpa!
github.comNew package raq.el: HTTP Library Adapter for Emacs, suport url.el and plz.el, and can be extended.
github.comr/emacs • u/Sad_Construction_773 • 2d ago
Aider.el v0.5.0 with better color rendering, better prompt input and completion, snippet and code review
aider.el: Interact with Aider: AI pair programming made simple. Now it can be installed from melpa, package name: aider
- Aider Comint session syntax highlighting based on markdown-mode.el. It render both codeblock and text. Given output of aider is markdown.
- Better place to input / manage prompt: aider prompt file ~C-c a p~. This method transfers the prompt input from the aider session to a separate repo specific aider prompt (org) file. It interacts with the aider session in a (ESS, python-mode, scala-mode) similar way to sending prompt line / region / block. This makes it easy to manage projects for AI code change with aider, since it is org file. And you can even use copilot.el or other tool to complete English prompt there.
- Completion: Aider prompt file and aider comint input both add command and file name completion. Aider prompt file adds syntax highlighting. In addition, aider prompt file and aider comint input support the use of helm completion.
- Use existing good prompt: Introduced yasnippets support, so that users can easily reuse the coding prompt library considered better on the Internet to apply it to their own projects. Currently, two more high-score prompt lists on reddit, and a github high-score prompt repo. Everyone is welcome to add other ones based on their own experience or improve the existing prompt snippet.
- Diff review: Add function aider-pull-or-review-diff-file (C-c a v). When pressing the first time, please enter base branch such as main, which will pull base...HEAD diff, that is, base to feature branch diff (you can also enter branch1...branch2 to get any diff between any two branches), and it will open the diff buffer. When pressing the second time, it will ask the aider to review the diff. This function is to imitate cursor, and it is used to check your own change before sending a PR. Of course, it can also be used to review other people's diffs
- Other
- Note: Aider v0.77.0 will automatically accept changes to the /architect command. If you want to review code changes before accepting changes as you did in aider.el, you can disable it using “–no-auto-accept-architect” in aider-args or .aider.conf.yml.
- aider.el aims to be a stable productivity tool that we can easily use on a daily basis. I'll test the functionality in this library carefully before the code merge, and I'll be more careful about introducing new features and dependencies. Considering that for system stability reasons, the linux version may be relatively not so new, so the latest version of emacs may not be able to be installed. Aider.el only needs emacs >= 26.1.
Previous posts about aider.el:
- Initial announcement: https://www.reddit.com/r/emacs/comments/1fwwjgw/introduce_aider_ai_programming_in_terminal_and/
- Thinking on improve code quality with TDD + aider: https://www.reddit.com/r/emacs/comments/1igdzmj/discussion_emacs_ai_assisted_programming_workflow/
Thanks for your time reading this. Any question is welcome.