r_emacs | Unsorted

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

70

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

Subscribe to a channel

/r/emacs

Notion like tree viewer for notes

Hi, Im currently switching to emacs form notion. Is there is any solutions for emacs to show org files like this (org note have a sub notes and so on)

https://preview.redd.it/wbiut3aq52sb1.png?width=1370&format=png&auto=webp&s=3937f1d2b2e936f32c810fe62bce5515596222b0

Im trying to find any, but everything I have is https://github.com/Alexander-Miller/treemacs and https://github.com/alphapapa/org-sidebar which is not what im looking for. Please help!

https://redd.it/16z4mfk
@r_emacs

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

/r/emacs

How to use the latest version of Eglot with Elpaca?

I'm on Emacs 29.1 but would like to use the latest dev version of Eglot rather than the version that is included with Emacs. Can anyone offer any help on how to do this with Elpaca with use-package integration?

https://redd.it/16yny40
@r_emacs

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

/r/emacs

Access to clipboard history on windows

Hello guys,I sometimes use the windows version of emacs at work, and one neat feature of windows is Super (windows key) + V, which is like the traditional copy/paste except that it lets you browse your clipboard history before pasting.

The menu does pop up but selecting an entry does nothing.

I use it quite often for other programs, but emacs ignores it (vanilla emacs 29.1, launched without init.el (-Q option).

Have you succeeded in making it work ? In general, I am curious as to how the sync between clipboard and kill-ring is done.

https://redd.it/16ynhjh
@r_emacs

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

/r/emacs

PDF in Emacs

Hi guys, how I read a pdf in emacs? I think use the docview-mode but I don't know

https://redd.it/16yk72p
@r_emacs

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

/r/emacs

How do I make this button bigger? It is very small on 4k screen.
https://redd.it/16yeb5x
@r_emacs

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

/r/emacs

Where do I find the definition of the indentation modes? Any way to use .clang-format instead?

This is a general question, though it comes up because I've started using Emacs 29 and tree-sitter.

There are 4 presets listed for tree-sitter, with a few more for the standard C(++) modes:

Gnu
BSD
Linux
K&R

Where in any of the emacs documentation are these indentation styles explained? I eventually found them on wikipedia, but that's frankly a terrible cop-out on the documentation side. The manual helpfully gives shrug-emoji style descriptions like this, for the BSD style: "Also known as “Allman style” after Eric Allman."

Moreover, I'd like to know what exactly emacs (or tree-sitter) thinks these styles mean. Just because there's a definition on wikipedia doesn't mean that's what's being adhered to.

But even better is if I could just use the clang-format style in real time, rather than waiting for it to clean up after me. Is there anything that already does that?

https://redd.it/16yakph
@r_emacs

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

/r/emacs

Introducing elfeed-curate

Introducing elfeed-curate

Feedback welcome.

Looking for a few brave souls to give it a try. Love to find bugs and functional improvements that my dogfooding hasn't uncovered.

Thanks!

https://preview.redd.it/iufomf9lqurb1.png?width=929&format=png&auto=webp&s=c7dc2f4086a7ab50fe0b27ea063e2d8b93e5016f

​

​

https://redd.it/16y818x
@r_emacs

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

/r/emacs

LSP Mode breadcrumbs icon blurry

I have lsp mode breadcrumbs enabled and I have treemacs lsp installed as well. The icons used in the breadcrumbs and treemacs were really blurry so I installed treemacs nerd icons and now treemacs has icons that are much cleaner but lsp breadcrumbs still has the blurry icons.

Anyone know how to get a crisper icon in lsp mode breadcrumbs?

https://redd.it/16y16bt
@r_emacs

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

/r/emacs

Capturing notes to particular file org-capture

I am using EWW to read articles and I want to capture notes into an exisiting file not part of capture templates. The overall workflow is as follows. Lets say I want to catch up on the GPT agents of generative AI and prompt engineering. I google the topic in EWW and just read with a org file open on the side buffer. I want to take notes and capture quotes into a that org file. when I select text from EWW, and intiate capture I want to insert text into the org file on the side where the point (cursor) is or even at the end of the file. How can I configure org-capture for this?

EDIT:

Think of it like this. I want to have a org file each reading session and I have have multiple reading sessions in parallel (session don't mean single chunk of time). How can i configure org-capture so that I can create a new org file for each reading session. or org-capture is not the right tool for this? Some other workflow?

https://redd.it/16xxfs0
@r_emacs

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

/r/emacs

Indentation issues with emacs configuration

Hello Emacs users, I'm currently trying to re-do my own emacs configuration but after facing thousands of issues, indenting buffers is the one thing that's going to turn me bald in a matter of hours.

I'm trying to work with multiple languages, Go, Rust, Python, JS/TS, etc. The one thing I haven't figured out correctly is proper indentation without having to do keyboard gymnastics. I know that Emacs is more of a DIY thing, so any light shed here would be of great help.

I've already tried (add-hook …), using the :config section in my (use-package go-mode) declarations and more but none of them are having any visible effect.

Furthermore, I saw this issue with Go and I heavily suspect other programming languages won't come out as clean as I think.

Every time I edit a Go file, when adding a new line to anything that needs indentation (e.g: a function body, if, for, etc.) Two “4 spaces” tabs are inserted no matter what. Even when I press the <TAB> key I have to backspace ALWAYS, also some closing delimiters like }) don't align properly, but I suspect that's another issue maybe fixed by puni.

&#x200B;

The “best” thing I could do to prevent newlines from getting messed up on creation was turning off electric-indent, I've heard mixed opinions on that, some say it's great, some say it's terrible, I don't really know. Without electric-indent I don't have to backspace two tabs on a newline, but TAB still creates those two tabs, even when my modeline reports (TABx4). Here is a snippet of the important stuff in my configuration file.

(setq-default c-basic-offset 4
tab-width 4
indent-tabs-mode t
standard-indent 4)

;; jsjsjsjs
(electric-pair-mode 1)

;; Disable electric-indent messing up my code >:(
(setq electric-indent-inhibit t
electric-indent-mode nil)

If any of you could spare your elisp-fu powers to me, I would be extremely thankful. Thanks for your time in advance. :)

https://redd.it/16xjfxt
@r_emacs

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

/r/emacs

Auctex

Hi, Gnu Emacs noob here. I'm having trouble debugging AUCTeX.
When I run TeX-command-run-all with C-c C-a Biber is not run for some reason I can't figure out, and I must run it manually with C-c C-c Biber RET to have my citations properly compiled.

Does anyone know how I can forse C-c C-a to run Biber as well as the other commands?

My config is pretty vanilla and for AUCTeX is as follows:

;; Auctex
(require 'package)
(unless (package-installed-p 'auctex)
(package-install 'auctex))

(require 'tex)

(push (list 'output-pdf "Skim") TeX-view-program-selection)


I'm running Emacs 29.1 downloaded from MacPorts on a MacBook Air m1.

thanks!

https://redd.it/16xchfe
@r_emacs

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

/r/emacs

new to emacs, hi

https://redd.it/16wrrwz
@r_emacs

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

/r/emacs

Create "code blocks" that I can collapse and expand with mouse next to functions?

Hello!

I want to be able to expand/collapse my functions such like in the picture below.

https://preview.redd.it/yogs7dwo2irb1.png?width=1491&amp;format=png&amp;auto=webp&amp;s=37f2ea9da455d523ca45e6f4c0af29fbc1ef86f7

These 3 dots; I want to be able to click them to open/close the code. I searched quite a bit and found nothing about having them open/close with mouse. If they can be opened/closed with keyboard as well even better, but mainly I want to with mouse.

The language I use is python.

Thank you!

https://redd.it/16wp0or
@r_emacs

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

/r/emacs

What do you use to code on emacs lisp?

I was wandering what do you guys use to program -let’s say a package- and test it as you go? So far I’ve been coding in the scratch buffer and executing blocks, but that seems really inefficient, I’m sure there is another way, more so in the case of writing long packages.

I’m used to coding in Python in emacs using the repl which includes a python interactive console, but I cannot find the equivalent for emacs lisp.

I would be grateful if you could point me in the right direction. Thanks in advance for your help.

https://redd.it/16wm8vq
@r_emacs

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

/r/emacs

Using OpenCV on emacs on windows?

Hello!

(short to-the-point question under)

I'm quite new to emacs, ubuntu and all those stuff; I'm studying computer science, I'm a first year and we're using Linux and (I'm using) emacs. On the school computers we have to input given commands in the Linux console to get access to the "import cv2", but I do most of my work home and I have a windows.

I was then wondering how I can download (?) and make it so I can import "cv2" and use it's commands like "cv2.imread('plane.jpg')" and so on. I've searched on google but found nothing useful.

I'm kind of just starting out so I don't understand what it means to "mix"/"import" OpenCV into emacs and such things. I have downloaded OpenCV (I think) but I couldn't just start emacs and start using the functions from "import cv2".

&#x200B;

Short question: How can I use the "import cv2" on emacs and start working with pictures? As beginner friendly as possible.

Thank you in advance!

https://redd.it/16wd6hd
@r_emacs

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

/r/emacs

treesit grammar issue in Windows/Unreal c++ classes

class FOOPTYAPI UFooptyHandler : public UBooptyComponent, public IScoobyHandler
{
GENERATED
BODY()
public:
...
}

tree-sitter doesn't recognize FOOPTY_API since it's a dllexport, and I think it's probably a windows-only construct. How would I go about making sure it parses that part properly?

Also, the GENERATED_BODY() specifier is an Unreal-ism, and I don't think it causes any trouble, but it would be nice if I could add it (and other Unreal specific identifiers) to a list for specific highlighting and/or indentation instructions.

Where's a good place to start with these sort of small-scale tweaks? I've seen some links to posts with titles like, "Let's write a major mode" but I'm really just trying to tweak the existing C++ mode to handle a couple weirdo special cases. (Though I think maybe the dllexport thing MIGHT be big enough that it should be included, so maybe I should file a bug?)

https://redd.it/16yyket
@r_emacs

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

/r/emacs

(elfeed-deref (elfeed-entry-tags entry)) doesn't work

I've been trying for the past three days to get [elfeed](https://github.com/skeeto/elfeed) to display desktop notifications. It was suggested that `elfeed-new-entry-hook` can be used and it works, but parsing it is a painful trial and error.

I've added [https://lorem-rss.herokuapp.com/feed?unit=second&amp;interval=10](https://lorem-rss.herokuapp.com/feed?unit=second&amp;interval=10) feed to be able to test it.

This works for example:

(add-hook 'elfeed-new-entry-hook
(lambda (entry)
(alert (elfeed-deref (elfeed-entry-content entry))
:title (concat
(elfeed-deref (elfeed-entry-title entry)) " -_ "
(elfeed-deref (elfeed-entry-title entry))
)
:severity 'high
)))

But changing `elfeed-entry-title` (on the 5th line) to `elfeed-entry-tags` or \``elfeed-entry-feed` makes it fail (no notifications appear anymore).

Does anyone have any idea why?

https://redd.it/16yq0ww
@r_emacs

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

/r/emacs

Release v0.13 · alphapapa/ement.el (Matrix client for Emacs)
https://github.com/alphapapa/ement.el/releases/tag/v0.13

https://redd.it/16yka2x
@r_emacs

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

/r/emacs

How I feel after coding in Emacs #emacs #coding #pavarotti
https://youtube.com/shorts/oKeRSW_hhcU?si=VnvJHG3viuEMGpYo

https://redd.it/16yhwc2
@r_emacs

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

/r/emacs

Is there a way to define an org entity in a way that it does not require a backslash?

Specifically, I want := to show up as ≔ in my buffer, and export as such.

If I do...

(add-to-list 'org-entities-user
'(":=" "\\coloneq" t "&#x02254" ":=" ":=" "≔"))

it doesn't work, but if if I do...

(add-to-list 'org-entities-user
'("coloneq" "\\coloneq" t "&#x02254" ":=" ":=" "≔"))

then the \coloneq command is prettified. How can I achieve what I want?

https://redd.it/16ya4gv
@r_emacs

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

/r/emacs

auto-dark-emacs - Updates on Linux: Gnome / Android (Termux)
https://redd.it/16y7632
@r_emacs

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

/r/emacs

sage-shell-mode hangs when trying to run help(foo)

Does anyone else have the same problem?

If I run sage-shell:run-sage to get a SageMath shell in Emacs, and run help(), I get the standard help message, which starts with "Welcome to Sage 10.1!".

But if I try help(diff) or any other specific function, Emacs hangs. Doing C-g allows me to use Emacs again, but the SageMath session is no longer responsive: trying to enter any other command results in hanging. Even C-c C-d no longer works, I have to try C-c C-\ and wait for the SageMath kernel to crash, or do M-x kill-process.

This all seemed to work before I upgraded Emacs and changed my package manager to straight.el.

I'm on Emacs 29.1, using sage-shell-mode v0.3.

I've covnfigured it as follows:

(use-package sage-shell-mode
:straight t
:defer t

:custom
(sage-shell:sage-executable (executable-find "sage"))
(sage-shell:set-ipython-version-on-startup nil)
(sage-shell:check-ipython-version-on-startup nil)
(sage-shell:use-prompt-toolkit nil)
(sage-shell:use-simple-prompt nil)

)

(However, I find that the custom settings aren't being respected either ...)

I also use ob-sagemath, which allows me to use SageMath in org-src-blocks, which works fine as far as I can tell.

https://redd.it/16y10kl
@r_emacs

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

/r/emacs

EXWM is rewiring my brain and I love it

https://redd.it/16xzszb
@r_emacs

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

/r/emacs

Capturing notes to particular file org-capture

I am using EWW to read articles and I want to capture notes into an exisiting file not part of capture templates. The overall workflow is as follows. Lets say I want to catch up on the GPT agents of generative AI and prompt engineering. I google the topic in EWW and just read with a org file open on the side buffer. I want to take notes and capture quotes into a that org file. when I select text from EWW, and intiate capture I want to insert text into the org file on the side where the point (cursor) is or even at the end of the file. How can I configure org-capture for this?

https://redd.it/16xxfsa
@r_emacs

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

/r/emacs

Speed up Emacs with features, requires, and autoloads
https://youtu.be/k8RnmeWYZIU?si=iliVOTiKsG6296xr

https://redd.it/16xi1co
@r_emacs

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

/r/emacs

how to configure LSP (Language Server Protocol) for TypeScript with ESLint and Tailwind CSS in Emacs at the same time?

how to configure LSP (Language Server Protocol) for TypeScript with ESLint and Tailwind CSS in Emacs at the same time? am having difficulty please help am using lsp-mode

https://redd.it/16x2va8
@r_emacs

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

/r/emacs

Recommendation for a programming language mode to edit juniper config files?

The files have a relatively uncomplicated syntax. Plain statements ending with a semicolon, and blocks delimited by curly braces (see for example [https://github.com/jtkristoff/junos/blob/master/firewall.conf](https://github.com/jtkristoff/junos/blob/master/firewall.conf)).

I tried the junos-mode but it behaved rather weirdly.

Is there a programming language mode that will be suitable for this format?

If not, is there a mode which can do the following, or something close to these?

* Backspace at whitespace indents properly with previous block
* Ability to collapse and expand blocks depending on indent level or matching brace
* spell check using words already used in the buffer

Will appreciate your help!

https://redd.it/16wqfzv
@r_emacs

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

/r/emacs

hightlight current syntax tree branch?

I'm on emacs 29 and use treesit. Code in typescript most of the time.

Wondering if there's module that highlights the current syntax tree branch (or de-emphasizes the rest) in the editor like this:

* **function**
* statement 1
* statement 2
* **branch**
* **sub branch**
* **some code**
* **sub branch 2**

I imagine such feature would be very useful for multiple if-else, case(s), and other nested code with lots of leafs

https://redd.it/16wah41
@r_emacs

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

/r/emacs

Nand2tetris in org mode?

I want to follow along with the nand2tetris series and take notes in org mode. This package defines a major mode for it. Is there a way I can define an org-babel-execute function for the hdl programming language that the series uses (defined in the major mode)?

https://redd.it/16whbyu
@r_emacs

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

/r/emacs

Is it too late to learn emacs as a vim lifer?

Now that the future of vim is uncertain, I am looking at emacs as I see the project is quite active and there's still a very healthy ecosystem of plugin development. I am not interested in neovim as they have removed a critical feature to my work (cscope) and I feel that they do not value the kind of stability and support for working with older tools and languages that I need.

I mainly work on real time kernels for embedded systems, boot loaders, etc. written in C. I also frequently write in Make, Bash, Rust, Python, and Go. I use a very minimal set of Vim plugins, primarily ALE for linting and LSP support and fzf for finding files, symbols (with ripgrep) etc. Frequently, LSPs are not a perfect fit for my work because of the large index size and the need to switch between different working trees which causes a loss of the active index. I also always use my editor in a terminal (usually in tmux) as I often do work on remote machines for different target archtiectures and have found file synching to be incredibly painful.

I am quite worried that switching this late in the game, when I have decades of heavy vim usage carved into my brain, will be very difficult. I am also incredibly busy managing a lot of patch reviews and doing my own work.

Some of the things I would like help from the emacs community wrt to switching:

\- How can I get the same functionality as ALE (automatic running of linters, formatters, and LSP servers)?

\- How can I get the same functionality of all the different vim-fzf evocations (fuzzy search buffers, files, git files, lines, tags, etc)?

\- How do I start gdb or lldb and set breakpoints in source buffers?

\- How productive are the default emacs keybindings? Even though I am a Vim users, I prefer sticking to defaults when possible, and I prefer stability and low input latency over adding a vim compatibility layer. It would also be more frustating for things to work most of the time like Vim, then suddenly diverge then just accepting this alien new world.

\- Is there a good tmux prefix key that does not conflict with emacs keybindings? It seems ctrl+a is a poor choice.

\- A minimal list of plugins would be great. I do not want to use an emacs distribution. As a systems engineer I like to know how my system operates from the ground up.

Thank you for your responses.

https://redd.it/16wcyvf
@r_emacs

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