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

"It bears repeating." - Two Emacs Repeat Commands
https://youtu.be/14GX9GG2pxk?si=DLHjJXvACyhp7U3M

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

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

/r/emacs

Best way to handle use-package, multiple file types, multiple configs

I'm currently using rjsx-mode package to work on jsx files and would like to add it to be the default mode to mdx files as well. Config currently looks like this with use-package:

(use-package rjsx-mode
:mode ("\\\\.tsx\\\\'")
:hook ((rjsx-mode . lsp-deferred)
(rjsx-mode . emmet-mode))
:config
(add-to-list 'lsp-enabled-clients 'ts-ls))

I can add "\\\\.mdx\\\\'" to the mode definition however I want to use a different lsp client for the file type specifically mdx-language-server rather than ts-ls. Trying to decide the best way to handle this. I think one way would be to derive a mode from rjsx-mode but that seems like it might be overkill since there is no mode difference, just a difference in the configuration block. Probably thinking of the problem wrong.

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

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

/r/emacs

Emacs as code navigation tool
https://youtu.be/Ihfc8sWHUN8?si=E7Ji1fd_JTC5H5g3

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

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

/r/emacs

I'm stopping contributing to reddit and this is why

Hi,

Since I consider myself a part of this subreddit for some years, I
wanted to let you know that I'm going to stop using reddit.

As you might have expected, I've written a blog article explaining the
reasons
.

I won't say that I will never ever log in to my reddit account and might
contribute a comment in future. But chances to do so are poor because I
will remove reddit from my feeds.

I'm certainly not going to miss reddit as a
platform
. I surely
will miss this subreddit community here. You've been great and I hope
you will follow my ideas on embracing open solutions like
Atom/RSS/Fediverse/Usenet in order to connect to each other for topics
related to this subreddit.

For now, I'm focusing on my
blog
, publicvoit">my Mastodon
account, my new PIM lecture starting
in October
, and
maybe also start writing on my PIM book which is in the concept and
planning stage for over a decade.

I really hope to see you on a better platform which respects its users
and their contributions.

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

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

/r/emacs

Anyone want to share their typst config?

Typst looks interesting and I might want to give it a try, currently i only know of the typst lsp package, does anyone have a cool typst setup they would like to share?

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

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

/r/emacs

Enabling Emacs native compilation and dynamically adjusting the number of parallel compilation of Elisp files
https://www.jamescherti.com/emacs-native-compilation-config-jobs/

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

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

/r/emacs

Emacs Easy Draw v1.2.0 - preset, import SVG, include LaTeX, improved multi-line text…
https://github.com/misohena/el-easydraw/releases/tag/v1.2.0

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

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

/r/emacs

Having LSP is feasible??? If yes, why? If not, why not?

PS: I know how the damn thing work, so refrain explaining that. I am asking this question for different reason.

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

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

/r/emacs

eshell isearch behaves weird

Hi, I'm currently using emacs 27.1 at work (cannot install a newer version because we have a old fedora distribution for which no newer emacs exists). And I'd like to use the eshell more. According to this documentation https://www.gnu.org/software/emacs/manual/html\_node/eshell/History.html i can search for a last used command by a regex with M-s, which does work. But the cycling through possible other commands via M-n and M-p doesnt work. I can see in a minibuffer, that it is cycling from "history item 27" to "history item 31" etc. but the command is not shown in the eshell. It just shows the first finding.


Is this an acutal bug or am i getting something wrong? I'd prefer to use as few packages as possible and keep my dependencies low. So i really just need that eshell history.




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

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

/r/emacs

Building and Training Neural Networks in Emacs Lisp
https://www.scss.tcd.ie/~sulimanm/posts/nn-introduction.html

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

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

/r/emacs

Please check the code: Create a link to my dailies for every date formated block in my notes

I would like to create a link in my dailies to my present note as soon as a date block (2024-05-23) is existing in my notes.
I usually write with org-roam.
I must admit, the division between my dailies and other notes is not well done... but it is how I am working now.

I would like to have the possibility when the point is on a date (for instance 2024-05-22) to create a link in my dailies to the current heading, to the proper daily note if existing, or to a new daily note if not (under a predefined subheading)

With the help of chatgpt (sorry, no dev here), I have this code:

(defun my-org-roam-dailies-goto-date-at-point ()
"Create or open an Org-roam daily note for the date at point.
If the daily note already exists, add a new heading."
(interactive)
(let ((date (or (thing-at-point 'date)
(format-time-string "%Y-%m-%d" (org-read-date nil t)))))
(if date
(let ((parsed-date (org-read-date nil t date)))
(org-roam-dailies-goto-date parsed-date)
(when (derived-mode-p 'org-mode)
(goto-char (point-max))
(unless (bolp) (insert "\n"))
(insert "* ")))
(message "No date found at point."))))

(define-prefix-command 'org-roam-map)
(global-set-key (kbd "C-c n") 'org-roam-map)

(with-eval-after-load 'org-roam
(define-key org-roam-map (kbd "d") 'my-org-roam-dailies-goto-date-at-point))


2 problems I see:
1. I want to use a keybinding when the point is on a date to create the link ==> I am not sure the latest part for the creation is OK and that the proper keymap is chosen

2. So far, instead of reading the date at point to create the daily note or insert the link into an existing one, it uses the function org-roam-dailies-goto-date which asks again for a date from the calendar.

how would you improve this function?
thanks for your ideas!

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

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

/r/emacs

om-dash: Building blocks for org-based dashboards
https://github.com/gavv/om-dash

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

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

/r/emacs

Preview Typst code blocks in org-mode
https://redd.it/1cxvzvf
@r_emacs

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

/r/emacs

mugur: configurator for QMK compatible keyboards
https://github.com/mihaiolteanu/mugur

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

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

/r/emacs

Google contacts in Emacs

Hi,

I am looking for a way to have my Google contacts available in Emacs.

Preferrably a sync option but export and importing of files will do as well.

Hope someone has a working option.

Thanks!

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

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

/r/emacs

tmux “detach” feature in emacs?

the scenario is the tmux usual: i’m at A running a important process but need to go to B.

is there a feature exclusively in emacs that will allow me to “detach” from the current session, close the lid of my laptop, go to B, reattach, all while the process is running?

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

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

/r/emacs

Numbers in Boxes in Heading Bullets in Org-Mode

I have seen this in screenshots of the following theme: https://emacsthemes.com/assets/imgs/timu-macos-big-dark.png

How can I get those numbers in boxes that are before the heading text? It does not seem to actually be part of the theme.

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

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

/r/emacs

acme-theme is just so pleasant to look at
https://redd.it/1czgb5f
@r_emacs

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

/r/emacs

Did you know that JRR Tolkien used Emacs?

Was a big fan of Orc mode

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

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

/r/emacs

Embark and Consult "advanced" searching question

This may be obvious, but I'm struggling to figure out how I could do this.

Let's say I have a lot of open buffers, then do consult-buffer and type .py.
From there I do embark-collect and now I have a collection buffer with all of the matching buffers from consult-buffer.
Now I want to embark-act consult-line-multi on all of those buffers in the collection, so I can search only the one's I've narrowed down previously.

This behaves in the way you expect using the buffer name as the search parameter for consult-line-multi searching across all of my buffers. Is there some additional step I can add to make consult-line-multi only search the collected buffers?

Thanks for the help.

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

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

/r/emacs

Org Mode Headers not getting highlighed with Nerd Icons

Nerd Icon removes the highlighting

I have DOOM Emacs and I have +pretty enabled (org_superstar and org_fancy_priorities). When I try to use the nerd icons, the headers loose their highlight.

Any idea what I could do to fix this?

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

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

/r/emacs

Emacs with modified GC threshold freezes on save?

Hello, everyone.

About a year ago, I started noticing random freezing of Emacs when saving files, freezing so long to the point that Emacs starts crashing. They were super annoying as 1) the crashes never saves anything and I lose some of my progress, even with autosaves; 2) they seem to happen frequent enough to notice, yet too sporadic to reproduce and investigate.

Over a couple months, I ran some bisects and located the issue: it was the GC threshold.

I tried blindly setting gc-cons-threshold myself and installing GCMH. The problems still persisted.

I removed the GC setting for quite some time, but the noticeable slowdown during editing made be return to GCMH. With it came back the problem.

Is there any reason behind this behavior? Is there a way to correct this?

My Emacs configurations can be found in: here.

Thanks a ton!

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

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

/r/emacs

Keeping my .emacs file tidy

Sure, I can hit C-x h to mark my whole .emacs file, then hit TAB.
That, yes, indents it properly. But I want something more powerful. Something like perltidy. Perltidy knows we might not be like Bill Gates with big rooms filled with extra wide monitors. So it knows when to politely break a line into two for us, whereas TAB is too chicken.

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

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

/r/emacs

Moving to Emacs Tree Sitter Modes
https://erick.navarro.io/blog/moving-to-emacs-tree-sitter-modes/

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

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

/r/emacs

Emacs Lisp List ..just for the reference
https://www.damtp.cam.ac.uk/user/eglen/emacs/ell.html

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

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

/r/emacs

Themes on emacs
https://redd.it/1cxzhzd
@r_emacs

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

/r/emacs

Help: Advance vertico custom filter

Hi everybody, I 'm an emacs noob. Recently I switch to vertico, consult, very happy with that.
But I can't find the way to create on-the-fly filter with them.

For example:
I run find-file then start type into minibuffer: foo
I will show a list having 4 files has foo
I want when I press C-c C-m, It would search content of that 4 file, then filter out the files have string bee in it's content. (then the result will only have 2 files)
Then I could press C-c C-n to reset result tobe 4 file as when I search foo before.

Is that possible with vertico/consult or I have to use others like orderless, prescient.el?

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

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

/r/emacs

Weekly Tips, Tricks, &c. Thread

This is a thread for smaller, miscellaneous items that might not warrant a full post on their own.

See this search for previous "Weekly Tips, Tricks, &c." Threads.

Don't feel constrained in regards to what you post, just keep your post vaguely, generally on the topic of emacs.

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

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

/r/emacs

eglot and completion of HTML and CSS tags?

Going through the sub history I see a couple of Qs about how to do HTML and CSS tag completion with eglot but I don't see a solution. Anybody come up with anything since the last round?

thx

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

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

/r/emacs

What makes Emacs + Lisp special when used together?

This is follow to that other post, What does Org Mode or Neorg do better.... I got a command saying that Emacs would be worth using because of the power of Lisp but the explanations were very vague. I get that Lisp is used to program Emacs and is essential an "API with a text editor", but what makes writing Emacs functionality in Lisp special compared to writing Lua or Vimscript plugins for Neovim, or JS plugins or Obsidian? What makes Lisp special? Can you provide specific examples?

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

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