Emacs

368 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 2 years ago
MODERATORS
351
 
 

I installed neotree but the icons are not appearing in doom emacs do i have to install something else for the icons?

352
353
354
355
 
 

Hi,

I was using my search engine to look for available Emacs integrations for the open (and local) https://gpt4all.io/ when I realized that I could not find a single one.

Is there somebody who's using GPT4All with Emacs already and did not publish his/her integration?

356
 
 

When editing common lisp with slime and emacs, I'd like a speedbar listing, alternately, top level definitions in the file I'm editing, and top level definitions in the package I'm looking at (which may be a superset of definitions in the file). Preferably sorted by type of definition (function, macro, constant, etc) and/or alphabetically.

Is there some emacs tooling for this? I haven't found it.

357
 
 

Command doom not found even after i added path to my zshrc file(zsh is my default shell) I also used source .zshrc

358
359
 
 

I hope every completion done inside minibuffer is repeatable by vertico-repeat, including commands invoked by M-x. Vertico, however, didn't include execute-extended-command as a repeatable session by default. You can be seen it by examining vertico-repeat-filter variable. So I have to customize it like this in Doom Emacs:


(after! vertico-repeat
  (setq vertico-repeat-filter (remove 'execute-extended-command vertico-repeat-filter)))

The question is execute-extended-command seems to be a reasonable default completing session, why does vertico excludes it?

360
361
 
 

I've made a journalctl-mode package for viewing and monitoring typical Linux Journald service logs to get a richer experience than basic journalctl execution in async shell buffers.

It's in a bare-bones state, but I've been finding it very useful for almost a year now. I keep wanting to fix/enhance a few more things before I publicise, but ... I think others could find it as useful as I do already. It's not yet published on ELPA etc., but I intend to soon.

The stand out features are:

  • Multiple simultaneous journalctl processes may run simultaneously with the output interleaved. E.g.:
    • simultaneously view a broad query, say at '--priority warning' along with a more narrowly focused '--priority debug' query.
    • Dig into the output within or near a region by requesting additional log records. To facilitate this, if the region is active when you add an additional command, the kill ring is augmented with a --since=... --until=... string generated from the region's timestamps.
  • The complete JSON log record is processed facilitating richer features
  • The full JSON record for a given log line under point may be summoned and examined
  • Where the record includes file name and line number, you can jump from a message record line to the generating source file/line

Further details and key bindings are included in the Commentary section of journalctl-mode.el and docstrings of the entry functions.

Its usage is somewhat rudimentary, with minimal UI and no cool command-construction GUI like magit or anything, though with bash-completion set up that's not a big hardship. It also currently is not flexible in output format, but that may come!

If you habitually monitor journald please let me know what you think and give it a try, and let me know what you think should be fixed or enhanced most urgently in the GitHub Issues.

There exists another journalctl-mode package that looks nearly abandoned and more quick-and-dirty, but does look to be aimed at other usage patterns. So I'm creating a naming clash here and possibly a downgrade for some use-cases(?) - let me know what you think about that in the comments.

362
 
 

Hey, folks.

I've been digging around to see if there's a package for this but the closest I've found is expand-region and that's not quite it...

Take the indent level and block at the line where the point currently sits and set the mark region to the end of the current block + indent level. I hope that explanation is clear.

This seems very much in the wheelhouse of Emacs and I'm guessing it exists -- maybe even in core as opposed to a package -- and I'm just not looking in the right place.

thx

363
 
 

I'm having trouble with theme color of my emacs config when it's daemonize and not in daemon, any clue to solve this? here's my config
https://pastebin.com/bsH6b1e2

thanks!

without daemon

with daemon

364
 
 

I'm considering switching from Gmail to Fastmail, not necessarily due to privacy concerns but because I'm bothered by the fact that I need extra hacks and additional settings on both the Gmail and Emacs side to use their service properly with mbsync and mu4e. Also, I have the impression that Google will complicate access to IMAP in the future. They're already starting with things like passkey. I might be talking nonsense, but that's how I see things. Not long ago, they started detecting ad blockers in the browser while browsing YouTube, so as a company, they can change whatever they want overnight.

I want to emphasize that I don't have a lot of money to spare, and I'm taking this step more for my peace of mind, to make sure I won't have any issues in the future. However, I would still like to ask for your advice, are you satisfied with Fastmail, have you had any problems with their service while using Mu4e and Emacs?

I've noticed that they also support a feature called 'masked mail' and an option to add additional emails. If, for example, I want to display an email address on my CV that isn't my primary address and I'd like to deactivate it at some point, would it be better to use the option to add a new address or the "masked mail" option instead? Also, this separate mail or masked mail need a separate Mu4e context?

I would be grateful for any suggestions. Thank you.

365
 
 

Since x-toolkit=no, Xresources has no effect on the font size of context menu. Is there a way to increase this font size? Thanks for any help.

I tried setting consolefonts, but it does not seem to work..

366
367
 
 

I tried gnuplot and amazed by its performance. It allows you to directly plot mathematical formulas into graphs with just one single line of math equation.

#+BEGIN_SRC gnuplot :file images/trigon01.png
plot [-10:10] sin(x),atan(x),cos(atan(x))
#+END_SRC

https://preview.redd.it/bmp9izl57kvb1.png?width=640&format=png&auto=webp&s=3c13ffc06a7f3b196b2a71067b9aa8d6d048b2e0

when set arguments, it might requires one more line:

#+BEGIN_SRC gnuplot :file images/sd01.png
g(x) = exp(-0.5*(x/s)**2)/s
plot s=1 g(x), s=2 g(x), s=3 g(x)
#+END_SRC

https://preview.redd.it/efjvennd7kvb1.png?width=640&format=png&auto=webp&s=50cbd91d566721af5a95cd9737c2ee9ac79786e2

I feel frustrated, how I wish could acquainted with such a tool a decade ago while grappling with the challenges of visualizing mathematical formulas.

368
 
 

What is your workflow of maintaining logs of literate scripts? I converted most of my scripts to org-mode and tangle them out to scripts for running them. I want to be able to run them within org-babel itself. I use mostly python and bash. I have two laptops one personal and one for work and a desktop. Mostly I want my laptop and desktop in sync so that I can work in either of them depending upon the need. When I want to install or update any of the tools I use in one system I want that to be replicated in the other, not automatically.

I also need to version the literate scripts, in the sense with history visible in the org file itself. I want the org file to capture my thought flow and the evolution of the code so that I can understand it later by just looking through the file not by meddling with git.

Does any have similar need and a workflow I can copy?

369
 
 

Hello Emacs Community!,

As everyone on this community, I'm an Emacs power user and have several niceties configured, gnus for Email, Doom Emacs, and I heavily use org mode, I recently used it for a 'Incident Playbook' which was basically making an incident and responding to it following certain steps, more of a Digital Forensics and Incident Response (DFIR) work.

So, I made a server in Ansible, made a test malware that will be ran in this server (delete a log file idk), and proceeded to do everything directly in org-mode, running every command via tramp to the server, getting any info from the disk and getting a dd and such. Finally I made a whole document with full details on the server in that point in time, which was pretty interesting as I could have this as a template for future incidents and have certain commands saved for this.

And I got the idea, wouldn't it be interesting to have org mode files like these but for testing specific vulnerabilities?, even using a tool like NixOS or Guix to make commands that will get the old version x.x.x of nginx and I could test a vulnerability there, so it is also reproducible and everyone can use the org file and test this vulnerability?, basically more of a study and proof of concept rather than something more 'heavy' as in business related.

Does anyone have a similar use case?, I would love to hear for them as I want to go into the DFIR route.

TLDR. Not specific to an emacs programming or library question, but much more of a broader question about a cybersecurity workflow.

370
 
 

Hi.

Still learning Emacs but happy with it so far. One thing i'm trying to find out is this. I'm OK with Emacs creating recovery files from which i can, well, recover my work after emacs is closed. However, if I save my files, I have no need for these #filename# or filename~ files that populate my folders. Is there a way to make emacs keep creating these recovery files, but deleting them if I *save* my actual files?

371
 
 

I want to convert the timestamps in a .zsh_history file to their readable equivalents.

Is there some search and replace I can do in emacs that will replace the time with something like (format-time-string unixtime)?

: 1568128379:0;cp -a ~/.zshrc.pre-oh-my-zsh ~/.zshrc
: 1568128381:0;exit
372
 
 

Hi there,

I use orgmode links extensively. In particular, I have hundreds (our thousands) of links to emails (in notmuch). I would very much like to add a tag to any email that is being referenced from org.

So, what I need to do first is be able to find all matches of a regular expression in all my org files. Non-interactively.

I have been playing around with xref-matches-in-directory but that would not cover when multiple emails are mentioned in the same line...

I have been looking and looking but everything I find missed the non-interactive part.

So: What is the function to "search for this REGEX in FILES in DIR and return the first capture group"? (the regex has a capture group for the msgid)

The regex:

  (rx-to-string
   (rx "notmuch:id:"
       (group (1+ (not "]")))))
373
 
 

hi everyone, I am working in IT support, and occur (and even more multi-occur-in-matching-buffer) ist my tool of choice.

But I would like it to do more (because why not?) I would like to be able to ignore matches, if terms (let's name them excludees) are found in the next 5 lines from the search string match or within a number of lines defined by a variable.

It would allow to save excludees as a list, and ignore certain matches when for instance the "ERROR" relates to a known bug, and we do not want to see it in occur searches any longer.

Ideally, this could be triggered by a keymap in occur-mode-map, (toggle-ignore-excludees), so that it is up to the user to activate it or not.

is there already a similar function that does it? How would you proceed to achieve this?

thanks for your feedback

374
 
 

hello, when executing M-x in emacs 29.1 vanilla, looking for ~apropos~ related commands, I see that this error message is shown instead of the usual description in the minibuffer.

I assume this error only happens with emacs native functions, not with the most of the commands coming from other packages.

How can I fix this? thanks for your help.

375
 
 

https://github.com/svaante/dape#

Given that eglot has been part of the core emacs, I believe this is a long lasting wish for a lot of emacsers that has finally been fulfilled. (a stand alone DAP implementation that does not rely on LSP-mode)

view more: ‹ prev next ›