r_emacs | Unsorted

Telegram-канал r_emacs - /r/emacs

-

This channel is a feed for r/emacs. @r_channels @reddit2telegram

Subscribe to a channel

/r/emacs

GNU Emacs as a Comic Book Reader (Demo)
https://youtu.be/lrZX_a4Y5Ps

https://redd.it/1ajchba
@r_emacs

Читать полностью…

/r/emacs

An Emacs plugin for Vite
https://github.com/rajasegar/vite.el

https://redd.it/1aj9oq7
@r_emacs

Читать полностью…

/r/emacs

Comparing files easily in Emacs
https://youtube.com/watch?v=_wGWYGpTrzo&si=tCbxcB9yOaoTuVAX

https://redd.it/1aj44ez
@r_emacs

Читать полностью…

/r/emacs

Is it normal for the Julia language server to take ~20 s to start up?

Hi everyone. I'm new to Julia and language servers. I've set up Eglot with eglot-jl and it seems to be working fine. The only thing that's off is that Eglot takes 15 to 30 s to start up. It's not a big deal but it got me wondering if I misconfigured something.

I'm running Emacs 30.0.50 with the latest version of the packages as of yesterday. My emacs config goes like this:

;; LSP

(setq eglot-connect-timeout 60)
(setq eglot-autoshutdown t)
(setq eglot-ignored-server-capabilities '(:documentHighlightProvider))

;; Adapted from trev-dev’s configuration on https://github.com/joaotavora/eglot/discussions/993
(with-eval-after-load 'eglot
(define-key eglot-mode-map (kbd "C-c p D") #'eglot-find-typeDefinition)
(define-key eglot-mode-map (kbd "C-c p d") #'eglot-find-declaration)
(define-key eglot-mode-map (kbd "C-c p i") #'eglot-find-implementation)
(define-key eglot-mode-map (kbd "C-c p r") #'eglot-rename)
(define-key eglot-mode-map (kbd "C-c p f") #'eglot-format)
(define-key eglot-mode-map (kbd "C-c p F") #'eglot-format-buffer))

;; Julia

(with-eval-after-load 'julia-mode
(eglot-jl-init))

(with-eval-after-load 'julia-repl
(julia-repl-set-terminal-backend 'vterm))
(setq julia-repl-skip-comments t)

(defun set-up-julia-mode ()
"Function with customizations for ‘julia-mode’."
(add-hook 'before-save-hook #'delete-trailing-whitespace
nil 'local)
(display-fill-column-indicator-mode)
(setq-local electric-pair-text-syntax-table
text-syntax-table)
(eglot-ensure)
(julia-repl-mode))

(add-hook 'julia-mode-hook #'set-up-julia-mode)

https://redd.it/1aiplqe
@r_emacs

Читать полностью…

/r/emacs

Help with Emacs' daemon in MacOS

I'm trying to use Emacs (doom, 29.1) via the daemon in MacOS (14.3, apple M2). I used to have the emacs-plus installed, but switched to emacs-macport. The first one seemed to have a homebrew service installed for the daemon, but it never worked for me, not sure why. I'm now trying to set up the daemon for emacs-macport.

What I've gathered so far:

\- Opening emacs GUI and doing m-x start-server make the process be attached to that OS Window and, when it is closed, it all dies together.

\- running /opt/homebrew/opt/emacs-mac/Emacs.app/Contents/MacOS/Emacs --daemon gives me the terminal output I would expect when starting the daemon and a process, but when I try to emacsclient -cn, it opens a terminal emacs, not a GUI.

Daemon start command output:

Starting Doom Emacs in daemon mode!
Initializing org-roam database...
Clearing removed files...
Clearing removed files...done
Processing modified files...
Processing modified files...done
Copilot agent started.
Starting Emacs daemon.
Doom loaded 285 packages across 47 modules in 5.113s

\- when using the launchctl, as indicated in the wiki (with the modifications to emacs' path, and --fg-daemon), it starts the process with the same output as above. But, when trying to emacsclient -cn it gives me *ERROR*: Terminal type xterm-kitty is not defined. Doing export TERM=xterm does fix that, but it still opens a (rather very bugged) terminal frame.

\- Lastly, I tried creating an Emacs.app via Automator, but when invoked, it gives me the error could not get terminal name, which, I suppose, comes from the fact it is trying to open in a terminal, not GUI.

TL;DR: It seems I've managed to open the server, but not to open a GUI frame. Any tips?

https://redd.it/1aip9xh
@r_emacs

Читать полностью…

/r/emacs

What kinds of buffers do you wish you could bookmark?

What kinds of buffers do you wish you could bookmark in Emacs that you can't usefully bookmark already? Emacs can of course bookmark specific locations in regular text files, but also several types of non-file buffers: dired, eshell, Man, eww, Info, help, image, vc-dir, doc-view, possibly others. Are there any others you'd like to be able to bookmark?

Here are some ideas:

1. occur and grep buffers (jumping to the bookmark would rerun the search).

2. REPLs. I can imagine this being useful: you bookmark a Python REPL and later jumping to the bookmark starts a new REPL and reruns all the import statements you had run before (or maybe just reruns everything?, or everything marked with a special comment?)

3. shells. The eshell bookmarks are great, and that's what I use, but not everyone uses eshell. A shell bookmarker should preserve the current directory and whether you were ssh'ed into some other computer.

4. Shell command output buffers, the bookmarks should rerun the command. Same for compilation buffers (revert-buffer already knows how to rerun the compilation!).

I'd love to see some more ideas for missing bookmark capabilities.

https://redd.it/1aijfqc
@r_emacs

Читать полностью…

/r/emacs

Use doom-emacs on Android

With the help of community, I finally got my doom-emacs on Android !


Here's how I achieve this: http://yuchen-lea.github.io/2024-02-04-android-emacs-with-doom-emacs-en/

https://redd.it/1aif4wy
@r_emacs

Читать полностью…

/r/emacs

Multiple text editors

Does anyone else find it odd that many computer scientists use multiple text editors? A common combo I see is VScode + notepad++. They open text files that contain "code" in one, and everything else in the other. I've only seen one example of someone realizing this was weird and taking the time to configure notepad++ to be able to handle code as well. (why not open regular text in VSCode?). I've also seen an example of someone running two VScodes, one for the project and the other for the test project, and notepad++ for editing config files.

Does anyone find it weirder that no one seems to think this is a weird thing to do?

https://redd.it/1ahzdch
@r_emacs

Читать полностью…

/r/emacs

Best Copilot mode?

A year ago, there were a bunch of different modes people had built for handling GitHub Copilot. Has that settled out? Is there now one that everyone is pretty much using?

https://redd.it/1ai6utj
@r_emacs

Читать полностью…

/r/emacs

Verilog EMACs
https://redd.it/1ai1ums
@r_emacs

Читать полностью…

/r/emacs

they are surely not joking when they say emacs can do every thing

i found this on internet
https://github.com/Kungsgeten/steam.el/

a freaking game launcher in emacs. i am hardly 2-3 months in emacs world and my mind is already blown

https://redd.it/1aey0eo
@r_emacs

Читать полностью…

/r/emacs

Effortless Emacs Multiple Major Modes with Polymode
https://www.skybluetrades.net/blog/2021/06/2021-06-05-effortless-emacs-mmm-with-polymode/

https://redd.it/1aeoczj
@r_emacs

Читать полностью…

/r/emacs

org-roam-dailies-goto-previous-node not working

Hello everyone,

I've got the problem that "turning back in time" is not possible from org roam dailies.

I can use org-roam-dailies-goto-yesterday without a problem but as soon as I want to go back e.g. 3 days, day per day org-roam-dailies-goto-previous-node is very convenient.

I am in the today's daily file and try to use this function but the message I get is "Not in a daily-note". The behavior is the same for org-roam-dailies-goto-next-node or org-roam-dailies-find-next-node (and so on).

It seems like (org-roam-dailies--daily-note-p) is nil if I excute it as lisp function in todays org-roam-daily buffer/file.

I have no clue how I can resolve this.

Anyone having the same problems or any ideas?

https://redd.it/1aep0y9
@r_emacs

Читать полностью…

/r/emacs

vuiet.el - the music player and explorer for emacs
https://github.com/mihaiolteanu/vuiet

https://redd.it/1aekp9i
@r_emacs

Читать полностью…

/r/emacs

Embark -- Key Features and Tweaks
https://youtube.com/watch?v=jzG0EjOC0jo&si=ZGklPHz3qKZU0qKm

https://redd.it/1aeimv1
@r_emacs

Читать полностью…

/r/emacs

latex and org : org-latex-export-to-pdf - missing sty files

Just back to using latex after many years away. I'd forgotten what a complex eco structure it is.

Anyways: when I run org-latex-export-to-pdf it's not picking up the styles inside my \~/texmf. Ive had a google and cant find a solution.

​

>! LaTeX Error: File `songs.sty' not found.

​

kpsewhich -var-value=TEXMFHOME

reports \~/texmf, which I have updated via texhash and is where I keep my downloaded sty file.

Something obvious? I have auctex installed in case thats relevant.

​

>TeX-macro-global is a variable defined in ‘tex.el’.
>
>Its value is
>
>("/var/lib/texmf/tex/" "/usr/share/texlive/texmf-dist/tex/" "/usr/share/texlive/texmf-dist/bibtex/bst/" "/usr/share/texmf/tex/" "\~/texmf")
>
>Original value was

https://redd.it/1ajboya
@r_emacs

Читать полностью…

/r/emacs

Using LLM's to fill the semantic search gap
https://redd.it/1aj5did
@r_emacs

Читать полностью…

/r/emacs

What do you use as a prefix for your own command shortcuts?

Back in the day when I was setting up a Neovim config most folks use Space as a prefix, then bound various commands to different letters

What's the best way to do that in Emacs? I know that C-c is technically what that's for, but a lot of mode-specific commands are already bound with it. Like if I want a quick way to invoke M-x customize, should I do some prefix like C-z c? If I want to view my agenda while in some random prog-mode buffer maybe I could type C-z a...

https://redd.it/1aj1j8w
@r_emacs

Читать полностью…

/r/emacs

Flycheck 33 released today, first release for the project in many years after being abandoned by maintainer
https://github.com/flycheck/flycheck/blob/master/CHANGES.rst#330-04-02-2024

https://redd.it/1ait6io
@r_emacs

Читать полностью…

/r/emacs

Minibuffer Modeline Packages

I am using awesome-tray and like the layout a lot. It does have some problems though, for instance there are errors on startup and I'm not able to set the color successfully. I'm wondering if anyone has experience with these type of packages?

Another one that works well is mini-echo which is free of errors, but the code is structured in an advanced lisp style that's hard for me to interpret, so I have not been able to customize it for different reasons.

It would be good to fix the errors in awesome-tray and improve it. The errors I get are fairly simple:

awesome-tray.el: Warning: Pattern t is deprecated. Use _ instead [2 times]

Warning: setting attribute ‘:background’ of face ‘mode-line-buffer-id’: nil value is invalid, use ‘unspecified’ instead.

Warning: setting attribute ‘:foreground’ of face ‘region’: nil value is invalid, use ‘unspecified’ instead.Unable to load color "color" [2 times]

I've been able to override how awesome-tray displays major modes with a list of shorthand strings and change the time format, so it seems easy to customize. I suspect setq awesome-tray-mode-line-active-color doesn't work because of the above errors, but I'm not certain.

Anyway are there any other packages that would be a good choice, or does anyone have some advice on how I might go about fixing or improving awesome-tray? My lisp knowledge on it's own is not enough to locate the problem.

https://redd.it/1aik7zx
@r_emacs

Читать полностью…

/r/emacs

hs-minor-mode based on indentation level?

Hello,

I'm trying to find a good, generic, folding solution based on indentation level. This is just because I tend to have formatting outputs that don't have specific configuration for hs-minor-mode. hs-minor-mode seems like a good solution in general, but looks like it doesn't come with an obvious indentation-based level solution?

I have used yafolding but in general I have found that I can't get yafolding-toggle-all to do something predictable. What it chooses to fold is never predictable to me.

Any solution using hs-minor-mode?

https://redd.it/1aihtj3
@r_emacs

Читать полностью…

/r/emacs

I cannot scroll down with touchpad on windows 10

I am using emacs on windows. scrolling with the mouse works fine. but i cannot scroll down with the touchpad. specifically, emacs scrolls up whether i move up or down with two fingers on my touchpad.

Emacs in WSL works fine with the touchpad.

I've checked the Emacs Wiki and https://emacsdocs.org/docs/emacs/Scrolling. but nothing mentions the problem I've encountered.

Can anyone help me identify the problem? Thank you in advance

https://redd.it/1aifqj1
@r_emacs

Читать полностью…

/r/emacs

My emacs workflow

I work in a big corp, I run emacs on a remote Linux machine for which I don’t have admin privileges. This is my work flow, although things are working fine, I feel there is lot more I could do to improve my work flow. I am a long time emacs user (20+ years), I’m but I feel bad that I had the motivation to learn lisp.

Work flow:
- Multiple emacs daemons running on remote Linux
- From MAC book pro, open iTerm and ssh to remote machine
- Connect to emacs daemon in no-window mode
- Use emacs vterm when i need a terminal

I did try Tramp with emacs running on MacBook but it had been very slow, I deal with very large files


Any suggestion or improvements are greatly appreciated

https://redd.it/1ahz7vq
@r_emacs

Читать полностью…

/r/emacs

(dev) What do you use for config files validation? Particularly TOML.

Title. I see there is toml mode, but it doesn't have any commands... nor highlighting errors.

https://redd.it/1ai4wj5
@r_emacs

Читать полностью…

/r/emacs

A Lisp mystery

I ran across some puzzling behavior. Here's the minimum working example.

;;; -- lexical-binding: t; --
;; Save this snippet in some file, then type
;; M-x emacs-lisp-byte-compile-and-load RET.
;;
;; Then compare the outputs of evalling:
;;
;; (misbehaves-when-compiled)
;; (well-behaved)

(defun misbehaves-when-compiled ()
"Should return a list, returns nil when compiled"
(cl-loop
for map in (current-active-maps)
append (cl-loop
with seqs = nil
for seq being the key-seqs of map
collect seq into seqs
finally return seqs)))

(defun well-behaved ()
"Always returns a list"
(cl-loop
for map in (current-active-maps)
append (cl-loop
for seq being the key-seqs of map
collect seq)))

I wonder how many of you get the same problem? There is no problem when I try it in emacs -Q, but I can't imagine why that affects it.

https://redd.it/1ai076v
@r_emacs

Читать полностью…

/r/emacs

How configure use of a fallback font also for frames?

With the following setting in ~/.emacs, standalone instances use Noto Sans Symbols 2 font when rendering glyphs from 'symbols set:

; ; Fallback font for unicode symbols
(set-fontset-font t 'symbol "Noto Sans Symbols 2-16")

However when using emacsclient in client/server mode, fallback font is not used.

It looks like each emacsclient needs to set fallback font individually. Any idea how to make it work also in that case?

https://redd.it/1aesakb
@r_emacs

Читать полностью…

/r/emacs

The original magic Emacs garbage collection hack
https://akrl.sdf.org/#orgc15a10d

https://redd.it/1aeplx9
@r_emacs

Читать полностью…

/r/emacs

Struggeling with evil

I know there is a ton of discussion around this but i'm not sure i've found my "perfect" solution yet. Maybe some of can weigh in on which path is "worth" following.

Basically, i come from vim and neovim. I've worked with emas and neovim in parallel for years now. I generally enjoy the "regular" emacs keybindings for UI stuff. But i feel like i'm lossing a LOT of editing power when leaving evil behind. Yet, getting it to work consistently is a bunch of work and it'll always be 99% at best.

Now the relevant part. I'm pretty sure i've only scratched the surface of emacs native keybinds. What i find missing is "simple" stuff like "delete between paranthesis" or "duplicate this line". Is this something emacs can "just do" and i just haven't found it yet?

I see 2 ways forward:

Stick with evil and invest the time to create consistent remaps where evil-collection and others don't quite do it.
Stick to emacs and remap/write functionality i'm missing from vim

Note that ergonomics are a secondary thought. I have a custom keyboard so arrow keys are still on hjkl and modifiers are on thumbkeys. I'm also not married to the idea of modal editing. In fact, i enjoy not having to worry about modes and just "type away". But deleting/changing a specified area is just something i haven't found a good solution in emacs to.

So, thoughts? Is what i'm missing from emacs just there and i need to find it, or am i better of investing fully into evil and making that work?

https://redd.it/1aek7y2
@r_emacs

Читать полностью…

/r/emacs

How Emacs Helped me to Overcome the Biggest Challenge of my Life

> I am the psychotherapist. Please, describe your problems. Each time you are finished talking, type RET twice.

> > My whole life passes by, by just configuring Emacs. What is the meaning of life?

> Why do you say what is the meaning of life?

> > Emacs is the main source of problems in my life.

> Emacs? Hah! I would appreciate it if you would continue.

> > Well, it has many bugs I want to fix.

> What makes you believe you might want to fix?

> > I can't live with bugs existing in Emacs. It's embarassing.

> Earlier you said you would like to fix?

> > Yes.

> I see... Well, are you sure that this is so?

> > Right. I want the bugs to be fixed but I also want to get other things done.

> Is it because you also want to get other things done that you came to me?

> > Yes. Emacs stops me from getting other things done.

> Are you sure?

> > No, maybe it's just me. Maybe I need to... stop configuring Emacs?

> My secretary will send you a bill.

It worked for me. You can run Emacs' psychotherapist with M-x doctor RET.

https://redd.it/1aekb45
@r_emacs

Читать полностью…

/r/emacs

Turn off corfu autocomplete when writing text

Corfu-autocomplete is not very useful when typing out regular text, but it is useful when typing code. I don't imagine there is any way to have corfu turn off when outside a source block and have it on when inside one?

https://redd.it/1aee581
@r_emacs

Читать полностью…
Subscribe to a channel