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

Has anyone set up a modern erlang environment?

I wanted to use erlang today. The erlang shell is... Not there. I had difficulties getting the distel company backend running with corfu. I feel like I went back in time.


Has anyone gotten erlang snazzy, or do I have to just go for elixir?

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

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

/r/emacs

[Release] Emacs-Kick 0.1.3 – For Vim/Neovim Users Ready to Explore Emacs

Hello, Emacs enthusiasts and Vim/Neovim adventurers!

I’m excited to announce the release of **Emacs-Kick 0.1.3**, a feature-rich yet minimalist Emacs starter configuration tailored specifically for users coming from Vim/Neovim. This update brings a bit more functionality to make your transition smooth and powerful!

# What’s New in 0.1.3?

Here’s what’s changed:

* **Added**: `evil-matchit` for better `%` functionality, making it easier to jump between matching pairs.
* **Added**: `evil-surround` for enhanced surrounding motions!
* **Updated**: A new intro ASCII art.

# What Is Emacs-Kick?

**Emacs-Kick** is a thoughtfully crafted Emacs starter kit designed for those familiar with Vim, Neovim, or Vi. It’s not a full distribution but rather a bridge for users looking to explore the world of Emacs without leaving behind their favorite terminal tools (e.g., tmux, Zellij, lazygit, starship, lazydocker) or familiar editing motions.

With **Emacs-Kick**, you can:

* Use Emacs just like Neovim inside your terminal while enjoying modern features like Treesitter and LSP.
* Experiment with Emacs' incredible flexibility without committing to its entire ecosystem.
* Transition smoothly by leveraging Evil mode for Vim-like keybindings.

# Why Try Emacs-Kick?

* Seamlessly integrate Emacs into your terminal workflow.
* Enjoy a lightweight yet powerful configuration tailored for exploration and tinkering.
* Scale up at your own pace: stay on TUI, explore GUI, or dive into Doom Emacs, Spacemacs, or vanilla Emacs.

# Demo & Learn More

Check out the project and give it a try: [GitHub: LionyxML/emacs-kick](https://github.com/LionyxML/emacs-kick)

If you're a Vim/Neovim user curious about Emacs, or if you're an Emacser looking for a starting point to share with Vim friends, **Emacs-Kick** is the perfect stepping stone. Let me know what you think, and feel free to share feedback or suggestions!

Happy editing!

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

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

/r/emacs

Recommendations of emacs config

I really like doom which has lots of customization. However I'm not used to package manager straight.

Now I have to work on a limited virtual server environment which doom is too big for me.

Is there any recommendations? I can start from someone else's config too

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

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

/r/emacs

Browsing over TRAMP, but making openwith open files locally

openwith.el is a nice package to send files to external programs when opened, e.g. video, photo, PDF, files, whatever. But, browsing over TRAMP it will execute on the remote host, when I usually want to open it up locally.

But, I just learned that TRAMP has an sshfs connection method, meaning the remote filesystem is actually locally mounted, so I realized I could hack openwith to divert it to that file. Turns out it works!

(use-package openwith
:config
(openwith-mode t)
(defun my/openwith-local-divert (args)
"Divert openwith ARGS to the locally mounted pathname so it'll execute locally."
(let ((filename (nth 1 args)))
(if (and (file-remote-p filename)
(string= "sshfs" (tramp-file-name-method (tramp-dissect-file-name filename))))
(setf (nth 1 args) (tramp-fuse-local-file-name filename)))
args))
(advice-add #'openwith-file-handler :filter-args #'my/openwith-local-divert))

Open up with /sshfs:<hostname>:/path/to/file.mpv etc., and it'll play locally!

Very pleased with this quick hack.

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

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

/r/emacs

Can literate programming make LLMs more effective?

Literate programming, combining code and documentation like in org-mode, can help make complex algorithms easier to understand.

Could literate programming help guide current AI models through higher complexity code bases than they are currently capable of?

LLMs could also help keeping documentation up to date if there are ways to verify the documentation it creates like we can verify code.

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

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

/r/emacs

defining multi-key exwm simulation keys

I have defined some simulation keys for exwm...

(setq sim-key-basic

;; movement, cursor

'(([?\C-b] . [left])

([?\C-f] . [right])

([?\C-p] . [up])

([?\C-n] . [down]))) ;; etc

(exwm-input-set-local-simulation-keys sim-key-basic)

What I'm wondering is, is it possible to define C-x h as "select all", aka C-a on most CUA windows apps. I can't figure out what the syntax would be, and I suspect a multi-key simulation key might not be possible



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

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

/r/emacs

To Do killer app (.org support)

With import/export .org support

App

https://gtd-easy.replit.app

Create user and pass and use it. Fully funcional, still refining the features. Design is inexistent at this point. The app comes with the info how to use it.

"Today" and "Week", see everyday
"Month" see every Monday
"Someday" see every first of the month
"Due Today" are the Calendar tasks

Sections

\- Inbox: Capture all unorganized pending tasks

\- Today: Tasks for today

\- Week: Tasks for this week

\- Month: Monthly planning

\- Calendar: Tasks with specific dates

\- Someday: Future tasks

Task Management

\- Search functionality in the app title

\- Tap/Click to select a task, Double tap/click to edit

\- Drag and drop to move tasks

\- Select multiple tasks to move as a group

\- "→ Week" button to move tasks from Inbox and Today to Week

\- "Due Today" button to show tasks due today

\- Import and export tasks from .txt and .org files

Web and mobile

https://preview.redd.it/b80jdgot3n6e1.jpg?width=1125&amp;format=pjpg&amp;auto=webp&amp;s=f42117e33a922fe9a2b6d27d62f499f56f904512

https://preview.redd.it/6k6tpevy3n6e1.png?width=2358&amp;format=png&amp;auto=webp&amp;s=53038aa2c1cde8c5dde81e16dda144ff5f313d47

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

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

/r/emacs

major mode (e.g. eglot, c++) and embark

Hi, Is it possible to add a function to embark-act automatically based on current major-mode? Example - If I am editing a C file with elgot mode, embark-act should show all the eglot functions e.g. eglot-find-declaration. Or Do I need to define my-embark-eglot-find-declaration (and every other function) to add it embark-act?

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

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

/r/emacs

Inserting steps into org-capture workflow

Hi,

I'm trying to figure out how I can add small workflow changes to emacs, so I'm sorry if this is elementary. I haven't been able to find the right docs to do something like this, but I'm sure this exists. There are probably other ways to do the same thing I want, but the purpose is really to learn emacs/elisp a bit.

I'm using org-capture. While creating a TODO, I'd like to be prompted to choose a priority and have options to show to press "a" for A, "b" for B, "c" for C, and have that priority be inserted into the TODO for me to fill out with text.

Additionally, something similar for scheduled time. Would anyone be able to walk me through how I'd be able to do this?

Thank you.

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

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

/r/emacs

Hate to say it but I still don't get Lisp. How do I get into the Lisp mindset?

I think I get the basic gist of Elisp that it makes it easy to override stuff in Emacs, and that's great. I've managed to write some fairly simple custom behaviors (with a LOT of help from here and there), and that felt great as well.

However, I still don't get Lisp. One thing is that I am never too sure how to format the code properly (maybe skill issue). I feel the nested paranthesis makes it more difficult to read, but other people disagree. Everyone says Lisp is expressive, but I don't understand what that means exactly. I keep reading everywhere that data and code is the same in Lisp but I don't understand what that means or how it's useful.

I'm in some online communities where there are some super smart people who go and on about other Lisp dialects and I feel like I'm missing out but I just don't get it. I think this might be a mindset or attitude problem because of having used the usual languages that everyone else uses and probably made my thinking too rigid?

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

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

/r/emacs

Two questions on the use of require

I was studying the code in xref.el supplied by emacs. The code can be found here

I have two questions:
1. In the function xref-find-references-and-replace (line 1665) there is the call (require 'xref). So the function requires the file that contains the function? Isn't that redundant?
2. The function xref-pulse-momentarily (line 559) calls pulse-momentary-highlight-region, however pulse.el is not required by xref. Why?

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

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

/r/emacs

So Who Wants to Work On Let-Async?

Let-async is a let binding that binds, evaluates body forms on another thread, and then runs join forms on the main thread. The values that are bound are not locked on the main thread. They are duplicated to thread local memory and this is automatically checked before the join body is run. If the check fails, you usually throw away or update and retry. It's transactional memory with a very limited scope, literally. The memory synchronization all happens during the join, when values used to write to a buffer or bound to a defvar etc are copied back over if used or discarded if not.

The benefit for users is that most, like 99.9% of asynchronous UI programming just throws away stale results or tries them again with updated values. Think about stale LSP completions. Nobody cares. Just drop them or retry them. Since this is what actually happens, it is an ideal primitive to work with within Elisp, where the quick and dirty case is the rule. The alternative is to use timers, process filters, threads, and check your initial conditions manually to be sure the state of the world didn't change out from under you at join time. This dance is the exact same thing that needs to be automated.

So what the hell, let's do it in Rust by abusing either C bindings or dynamic modules to ship a solution without even merging into core. Since let-async is a user-facing thing, it would be valuable in its worst form. If it exists as a language feature, it will be much easier to work on. It's not meant to go into Emacs internal code or compile well. It's meant to simply hack together firing off HTTP requests, possibly hundreds of them, and do the right thing with semantic clarity for users who are just duct taping things together in Elisp and annoyed by blocking and the tedium of writing threads that don't actually synchronize anything. Even if we had Guile scheme etc, users don't necessarilly want to automate their key binding commands by dropping into it and writing proper threading if they just need fails-okay behavior. This is an idea made for Elisp.

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

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

/r/emacs

One package to add Nerd Icons support for dired, achive-mode, tar-mode and ztree
https://github.com/abougouffa/nerd-icons-multimodal

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

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

/r/emacs

All I want for christmas is a working ssh feature like vscode

Love emacs, use it every day for work and personal use. Donate to various projects revolving around emacs (doom, magit, soon to donate to emacs). The one thing I think emacs struggles with is proper remote access. Tramp is buggy and crashes a lot, but I'd rather it crash than freeze. Like I'm sure many of you also do, I remote into many machines at once, and one connection dying usually means emacs freezing, usually means I have to restart the daemon to recover, which means all of my connections are lost.



/rant

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

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

/r/emacs

Graphical browsers inside of Emacs, and that don't rely on Chromium?

hello!

i'd like to use emacs as much as possible, and i find myself often using graphical browsers because it's often a lot easier to see stuff.

i know EAF-browser exists, but as it is based on Chromium, i'm not very adamant on using it.

i don't know if, therefore, any people have had success using non-chromium graphical browsers on emacs?
my ideas were the following :

- browsh (can work well using vterm, but i would like perhaps a cleaner output)
- emacs-webkit (tried building it and setting it up, but it would crash on launch, so i'll have to troubleshoot it before being able to use it...)

i'd also like to use EWW more often, but i find it's a bit hard to use because i often have a rather "rough" output, even with eww-readable. even if this isn't the subject of this post, does anyone have any tips and scripts i could use to make EWW even more readable on most sites?

and to go on the main point of this post, does anyone use any non-chromium graphical browser in emacs? how is that working out for you?

i was thinking i could also just try and use EXWM, so i can directly integrate firefox itself into emacs, but that seems very overkill for what i want to do, even if i'm far from against the idea of EXWM haha

cheers everyone :)

TL;DR : looking for graphical, non-chromium browsers that i can use inside of emacs, and curious about the experiences of these softwares' users. also, open to any tips and scripts to make EWW more readable even with eww-readable enabled

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

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

/r/emacs

Catching people up to the latest and greatest in the world's greatest text editor

I've got some colleagues who are still rocking stock or near-stock Emacs in their terminals. (Much respect: that is where I started and stayed for many many years.) But Emacs has come a long way in the past decade; I wanted to write a short something to highlight features that are new within the past 10-ish years or so. Here's what I wrote:

https://lambdaland.org/posts/2024-12-14emacscatchup/

Any suggestions on what you would include?


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

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

/r/emacs

Org-roam alternative that is minimal

I still only use org-capture these days because it is so easy to setup. The problem is that I have a long `wiki.org`, a long `journal.org`, a long `ideas.org`, and sometimes there's conflict across different platforms (I use Dropbox to sync them).

Twice have I tried org-roam and it didn't stick. I found it too complicated to use. I only need a way to break the notes down into different files and a search functionality for all these notes.

For those of you who were once in a similar situation, can you suggest packages/setups that I should try?

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

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

/r/emacs

How can I apply a GTK3 theme only to Emacs

adw-gtk3 is a cool GTK3 app that mimics the aesthetic of GTK4 libadwaita. I'd like to only apply it on top of Emacs. Manually, i can do the following:

- M-: (x-gtk-debug t)
- Go to Visual tab
- Select adw-gtk3 as GTK+ Theme
- Now Emacs uses the selected theme

However, I need a way to automatically do this on start. Is there a way?

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

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

/r/emacs

Painfully slow org-agenda

I have about 10 org files with about 600 different tasks (reading lists, chores, habits, etc.). Most files are small except for two that have the bulk of the todos/tasks.

Out of the blue my org-agenda view generation has come down to a crawl. At times it takes about 10 seconds to generate the agenda view.

Does anyone with a similar org/org-agenda setup point me on what you do to load things fast?

I have tried org-ql. It’s absolutely amazing but I miss the ability to control the formatting of the entries. I’ll end up using it if I can’t fix the slowdown issue.

I am using emacs-plus (30.x) on macOS.


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

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

/r/emacs

webkit2gtk on recent Linux distributions

[posted this as an answer in another thread, hope to get more visibility as a top post\]

Somebody knows more about https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=b7f6cde419f862dbbf25a8192f5f31ac557b60b5

It sets a max acceptable version for webkit2gtk, but other than this old thread I haven't found anything else and in particular haven't found anything on how Emacs developers plan to move forward. Forcing people to use a version of a library older than what is installed on recent debian/ubuntu system doesn't seem to be a long term solution.

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

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

/r/emacs

How to defer loading yasnippet properly to save startup time?

I found this way of loading yasnippet eats a lot of startup time (~ 0.2s):

(use-package yasnippet
:ensure t
:config
(yas-reload-all)
(add-hook 'prog-mode-hook #'yas-minor-mode))

How could I defer loading it and trigger it only when entering into a prog mode?

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

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

/r/emacs

Configurations for slides in Org-mode?

I'm wondering if anyone has a good configuration for any of the Org-mode presentation modes (org-present, dslide, org-tree-slide). In particular, I'm looking for things like:

A way to configure heading levels, e.g. to have first level headlines be section slides, second level headlines be subsection slides, and each third level headlines be the title of a slide

A way to have bullet points in a slide appear one by one

A way to normalize how whitespace is displayed, so bullets appear normally if there's extra spaces or newlines between them in the org file

A way to execute source blocks while the slideshow runs, and/or to embed a REPL for some language into a slide.

Basically, I'd like to use an org mode file to specify the contents of a slide, but instead of generating a Beamer pdf, to display a comparable slideshow in Emacs itself. Has anyone achieved this?

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

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

/r/emacs

Sessions in Emacs.

In vim there is a feature called session. When you save a session vim creates a vimscript file which has all the information of current session like open buffers, window layout, in which window your cursor is , everything. And then whenever you want to start working again you could load that session, you would be just where you left. How do I do that in emacs.

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

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

/r/emacs

Customizing the output of org-ql-block

Is it possible to customize the “look and feel” of the output of `org-ql-block`?

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

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

/r/emacs

"Opening TLS connection with gnutls-cli..."

I need some help interpreting an error with a fresh and self build emacs.
The minibuffer keeps telling me "Opening TLS connection with gnutls-cli --x509cafile /etc/.... and seems to try this several times.

When I start Emacs with --debug-init I do get this error.

  1 Debugger entered--Lisp error: (error "Could not create connection to melpa.org:443")
2 signal(error ("Could not create connection to melpa.org:443"))
3 package--with-response-buffer-1("https://melpa.org/packages/" #f(compiled-function () #<bytecode 0x91942e590479e69>) :file "archive-contents" :async nil :error-function #f(compiled-functio$
4 package--download-one-archive(("melpa" . "https://melpa.org/packages/") "archive-contents" nil)
5 package--download-and-read-archives(nil)
6 run-hook-with-args(package--download-and-read-archives nil)
7 package-refresh-contents()
8 use-package-ensure-elpa(smooth-scrolling (t) nil)
9 load-with-code-conversion("/home/user/.emacs.d/init.el" "/home/user/.emacs.d/init.el" t t)
10 load("/home/user/.emacs.d/init" noerror nomessage)
11 startup--load-user-init-file(#f(compiled-function () #<bytecode -0x16aa7789a5c6db6e>) #f(compiled-function () #<bytecode -0x1f3c61addc0e38b5>) t)
12 command-line()
13 normal-top-level()


I am assumgin that gnutls support is available but not sure.

I need some help with interpreting this erorr because I am not an Emaps or Lisp expert.

I build emacs-29.4 (savannah git repo) my self on Debian Trixie ARM using this command:

make bootstrap && make configure="--without-sound --without-x --with-json --with-native-compilation --with-sqlite3 --with-xml2 --with-libsystemd --with-gnutls=yes --with-jpeg=no --with-tiff=no --with-png=no --with-xpm=no --with-webp=no --with-rsvg=no --with-tree-sitter --with-gameuser=no"


Thanks in advance

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

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

/r/emacs

I'm attempting to write a discourse forum package for Emacs. I've made some good progress this last two weeks, thought I'd share a post I wrote about it https://glenneth.org/content/posts/2024-12-12-discourse-emacs.html



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

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

/r/emacs

Best emacs package you tried and stuck with in 2024?

For me it was org-roam, just fell in love and never looked back.


What was yours?

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

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

/r/emacs

Windows Emacs GUI anti-aliasing issues solved

If anyone has font anti-aliasing issues in GUI version on Emacs (29.4) on Windows (11), I found the following helped. Be sure to restart Emacs entirely to take effect, evaluating the ELisp is not enough.


(defvar my/os-windows (string-equal system-type "windows-nt") "OMG, that's Windows!")

;; Set base for frame ensuring windows has antialiasing set
(cond (my/os-windows (add-to-list 'default-frame-alist '(font . "Iosevka Comfy-9.5:antialias=standard:hinting=true:adstyle=mono")))
(t (add-to-list 'default-frame-alist '(font . "Iosevka Comfy-9.5"))))


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

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

/r/emacs

Emacs 29.4-1 Dark mode Issue

Hi, I recently upgraded my Emacs from 28.2 to the latest 29.4-1, and in version 29, the window frame is not dark, despite my computer in dark mode. In the image I provided the 28.2 version on the left works as expected, but on the right, the 29.4-1 version, still has a light mode window frame. I'm not sure what is happening, so I decided to post on here. Thanks in advance!

(FYI: I'm on macos Monterey 12.6.9)

https://preview.redd.it/me8wcfjsnb6e1.jpg?width=1208&amp;format=pjpg&amp;auto=webp&amp;s=0db9d504429ec164c1f04f4c5c6579c816829269

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

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

/r/emacs

Highlight sentences according to their length

Is it possible to highlight sentences according to their length ? After few researches I came across whitespace-mode, but it seems like it can only highlight sentences longer than a threshold. I need at least 3 "levels" of sentence lenght. My goal is to be more aware of the sentence length variation in my writing (like in Hemingway editor). I'm a newbie with emacs.

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

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