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

Emacs too slow.

I am trying to switch to emacs from neovim to get org. I installed doom and make a simple config, but I find emacs to be too slow.

Too many actions just hang the ui. I am on windows. Are people just used to it?

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

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

/r/emacs

I want to build a major mode, need advice.

So I'm trying to build a major mode, the functionality is not really that important for the question, but for the curious it is something akin to org-roam.

I'm not new to programming, or even lisp, but new to emacs lisp.
I'm not sure how to approach a first working prototype, as the resources I found seem to focus only on syntax highlighting and indentation, but I would like to prototype something like when I open a file of this new major mode, that two windows open side by side, one with the source file and another one with a graphical representation based on the contents of the file.

If anyone can point me in the right direction I would greatly appreciate it. Thanks!

PD: To anyone who might say it might be silly to start on this if I'm new to elisp, it's the way I like to learn, doing and improving as I go, most often times it works pretty well, but in this case I'm lost as to where to start.

Edit: I'm looking for resources, other than the Elisp manual, which is the only thing I'm currently reading but I don't know if reading the manual top to bottom will point me in the right direction, thanks!

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

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

/r/emacs

Announcing Casual RE-Builder
http://yummymelon.com/devnull/announcing-casual-re-builder.html

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

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

/r/emacs

Emacs Flutter + Dart Eglot TreeSitter Nix setup using Home Manager
https://youtu.be/QGhZuPRVtVI?si=-YT91qEFurL2jJ5H

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

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

/r/emacs

emacs 29 won't build with svg even with --with-rsvg

I'm trying to build emacs 29 from source and no matter how I configure, it won't build with svg support.

here are steps I did to build emacs maybe there is something wrong with them:

1. clone emacs from github

2. take a snapshot of emacs 29 using: archive origin/emacs-29 | tar -x -C ../emacs-29

3. go to emacs-29 dir and run autogen[.]sh

4. run ./configure --with-gif --with-gnutls=ifavailable --with-json --with-modules --with-xwidgets --with-rsvg it only complains about mail being unecrypted no warning or anything about svg.

4. make && sudo make install

5. run emacs


when finished I run (image-type-available-p 'svg) it returns nil (also tested with emacs -Q ).

I tried this multiple times no matter how I did it, it won't build with svg.

I also tried to build with native compilation but gcc failed to compile the test ( when I tested the test file it resulted in an error with segmentation fault )

my system:

os: ubuntu-18.04( I know it is old but I have a gpu problem that prevent any recent version to run properly)

gcc: gcc (Ubuntu 7.5.0-3ubuntu1\~18.04) 7.5.0



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

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

/r/emacs

Managing SMS from android phone using emacs. How do you do it?

Managing SMS from android phone and make links to them in org notes. I'd like to refer to th bank messages in notes recording transactions.

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

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

/r/emacs

Are you using emacs motions if vi’s

Emacs noob here. Curios if ppl use emacs keys to navigate/edit text if everyone just using vi motions?

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

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

/r/emacs

elisa 1.0.0

[elisa](https://github.com/s-kostyaev/elisa) 1.0.0 released on MELPA and MELPA Stable. It implements RAG (Retrieval Augmented Generation) for ellama. In new release:

* Semantic chunking
* Hybrid search
* Optional reranker
* Implement collections
* Web search
* Search in local files
* Fix async manuals parsing

If you want to chat with your own local knowledge base you can try elisa. By default all works locally, except web search.

If you have already installed elisa you need to check install instructions and reparse info manuals because of internal changes.

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

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

/r/emacs

emacs is very versatile, thank you for helping me
https://redd.it/1e32zyj
@r_emacs

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

/r/emacs

Documentation on Hover With Sly and Common Lisp?

Hey there, I know that when using LSPs there are ways to get documentation to show up when you get a suggested autocomplete, or if you hover your cursor over a symbol. Is there anything like that that works with Sly / Common Lisp?

I'm thinking of some kind of popup like you'd see in another IDE. In Emacs I think it would be a child-frame?

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

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

/r/emacs

Emacs Evil: Disabling the automatic removal of spaces after leaving Insert mode
https://www.jamescherti.com/emacs-evil-disable-automatic-removal-of-spaces-after-leaving-insert-mode/

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

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

/r/emacs

micro-emacs-like for when Emacs is not available or otherwise occupied?

I'm actively debugging a recurring crash (in garbage collection sweep) with Emacs 30.x. While I have a crashed Emacs locked up in gdb, what do y'all recommend for backup editor?

- Another Emacs server session with another name? (ex: --daemon=<name>)

- Zile? mg? Neither of those seem to share all of the common key bindings with actual Emacs nor do they seem to have readline on Debian 12.

thx

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

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

/r/emacs

Why is it so hard to get Pyright to work properly?

So I keep reading about how Emacs (Doom Emacs) has great support for LSPs, etc. I can see that pyright is running, but it keeps saying my imports could not be resolved and my code is full of warnings.

I tried MyPy and it creates a .mypy directory all over the place so I deleted it.

Is there a Python LSP that actually works with Emacs?

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

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

/r/emacs

Fun fact about calendar.el

Few days ago I happened to stumble upon an interesting read and link on SX, about a calendar library in Common Lisp. I actually ordered a book to the local library (we can distance-borrow in Sweden), and I found an interesting statement in Preface:

"Our initial motivation was an effort by one of us (E.M.R.) to create Emacs-Lisp code that would provide calendar and diary features for GNU Emacs ( ... ) A deluge of inquiries from around the globe soon made it clear to us that there was keen interest in an explanation that would go beyond the code itself"

Ha! Looking at the calendar.el, indeed, the author is one of the authors of the book in question (Calendrical Calculations).

Basically, what they say, Emacs and Emacs community inspired them to gather together information and write probably the most authoritative book on the subject yet. How cool is that!

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

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

/r/emacs

How is Emacs used in a professional setting?

I am entering my senior year of my BSc. in Data Science (primarily use R and python). I first learned about Emacs my freshman year and was intrigued by the potential -- keyboard-focused, modularity, customization, etc. I started using and configuring vanilla Emacs as my "daily driver" about 18mo ago. Within the last 6mo I have used `org-agenda` to organize my schedule, Jupyter notebooks for class assignments, and record most* of my notes using `denote` (*need to spend some time configuring latex for math notes).

This summer, I completed a Data Science internship at a medium-ish sized tech company. Although most of my classwork is in Jupyter notebooks, the dev team discourages the use of notebooks. Experiments are mostly organized in python files but it does seem that others still use Jupyter notebooks to tinker with code snippets or intermediate plotting. All development is done remotely across a number of servers and docker containers.



Needless to say, my "little" Emacs configuration was not up to the task. The jump from using Emacs for my homework assignments to fleshing out a reliable IDE that I can be used on the job is overwhelming. I struggle to envision how I would make that jump. I am aware of `tramp` and `lsp-bridge`, for example, but have read a lot of complaints about latency or `magit` being slow. Alternatively, one could install Emacs on given server ... but how common is it that companies allow you to do that?



For those that use Emacs professionally: How do you use Emacs at your company? Do you run Emacs locally but develop over tramp, what is that experience like? If not, does your company allow you to install Emacs on a server?

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

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

/r/emacs

How to make mu4e move/refile actually move and not duplicate emails?

Hi,


I have been trying, and so far not completely succeeding, in setting up mu4e to access Outlook365 email. This setup involves:

1. davmail
2. mbsync
3. mu/mu4e

As I don't want to litter the initial message with a ton of configuration, which I can provide later when needed, I will jump to questions.

Reading the mu4e manual I have learned about the 2 operations: move and refile.

1. Is it correct to think of Refile as what is currently found in email services like Gmail or Outlook365 under the name Archive?

2. what configuration is needed or what actions do I need to apply for email to be actually moved to the target mailbox when using move or refile?

With my current setup, I have noticed the emails being copied (or duplicated) to the target directory while they continue to appear in the Inbox when using the Outlook app. On mu4e, the initial emails are not available anymore (as I was thinking that maybe I could delete them).

This behavior is surprising to me and I'm thinking that 1) either it is a misconfiguration; or 2) it involves a different set of actions to lead to the result I intend.

thank you for helping a mu4e newbie

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

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

/r/emacs

Just invoking (require 'mu4e) produces the following error

Just invoking (require 'mu4e) produces the following error



Debugger entered--Lisp error: (error "Eager macro-expansion failure: (error \"Misplaced t...")
error("Eager macro-expansion failure: %S" (error "Misplaced t or ‘otherwise’ clause"))
internal-macroexpand-for-load((defalias 'mu4e-headers-change-sorting #'(lambda (&optional field dir) "Change the sorting/threading parameters.\nFIELD is ..." (interactive) (let* ((field (or field ...)) (sortable (plist-get ... :sortable)) (sortable (if sortable sortable ...)) (sortfield (if ... field sortable)) (dir (cl-case dir ... ... ...))) (setq mu4e-headers-sort-field sortfield mu4e-headers-sort-direction dir) (mu4e-message "Sorting by %s (%s)" (symbol-name sortfield) (symbol-name mu4e-headers-sort-direction)) (mu4e-headers-rerun-search)))) t)
load-with-code-conversion("/usr/share/emacs/site-lisp/mu4e/mu4e-headers.el" "/usr/share/emacs/site-lisp/mu4e/mu4e-headers.el" nil t)
require(mu4e-headers)
load-with-code-conversion("/usr/share/emacs/site-lisp/mu4e/mu4e.el" "/usr/share/emacs/site-lisp/mu4e/mu4e.el" nil t)
require(mu4e)
eval-expression((require 'mu4e) nil nil 127)
funcall-interactively(eval-expression (require 'mu4e) nil nil 127)
command-execute(eval-expression)


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

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

/r/emacs

Magit & Compat-30.0.0.0

Here is my .emacs.d/init.el and I've got Error (use-package): Failed to install magit: Package ‘compat-30.0.0.0’ is unavailable

I'm running GNU Emacs 27.1 on Ubuntu 22.04. How does it possible? Is it old emacs?

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

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

/r/emacs

What part of Emacs code controls the GUI?

This question can be worded a lot better but I'm honestly drawing a blank. The premise is this, I'm thinking of building an upgraded GUI for Emacs (for no reason other than fun). I have two options: 1. building the GUI from scratch and bridging to the Emacs functionality then have the custom GUI render all the events from Emacs OR 2. maybe I can just edit the already existing source code for the GUI and add features or change it entirely. I just want to know what files to start digging. I could be going about this all wrong entirely, but that's my plan so far. I know frame.c and window.c manages outputs and stuff I'm just trying to be thorough and see if there is maybe something else I can look at in the source code.

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

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

/r/emacs

Emacs refuses to render left and right quotes when started in daemon mode.

Despite my best efforts, I haven't been able to get my normal emacs configuration to render the left and right quotes (u+201C and u+201d: "“”"). Instead, I just the get the ASCII quote symbols highlighted in blue to indicate that they're actually not the ASCII quote character. The same applies to left and right single quotes.

As implied by my post title, this problem only applies when running emacs in daemon mode. if instead of launching emacsclient I run /usr/bin/emacs from a graphical environment, I get a frame where the quote characters work fine. I'm inferring that there's some variable somewhere that determines whether or not quote characters should be substituted, and it's being set to false when emacs runs daemonized because there's no graphical environment, but I'm unsure what variable that would be and where it would be set.

I am using emacs 29.4 with pgtk enabled, on Arch Linux. My WM is Sway, which means I am running under wayland. The font I am using is Terminus 16.

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

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

/r/emacs

Feed symbol overlays to multiple cursors
https://redd.it/1e3c5gm
@r_emacs

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

/r/emacs

Wrap any command -line tool into Emacs commands
https://github.com/nohzafk/cli2eli

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

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

/r/emacs

Code Assist with Google Gemini for Emacsen

I have created an Emacs package gemini-code-completion to get assisted code with Google Gemini !

https://github.com/shishimaru/gemini-code-completion.el


On Google Colabo, Gemini suggests code and the experience was awesome because my development got more efficient and faster, and I could sometimes learn new things with the suggested code.

I have sent PR to Melpa and hope it will be approved soon so that other Emacsen can easily try this package and make their life a better place.

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

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

/r/emacs

Annotate completion candidates (GNU Emacs)

https://preview.redd.it/qt4dubiadgcd1.png?width=762&amp;format=png&amp;auto=webp&amp;s=427d0493a9fb5c8e1577171253ec202e981847e5

Details: https://lifeofpenguin.blogspot.com/2024/07/annotate-completion-candidates-gnu-emacs.html

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

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

/r/emacs

Setting emacs for python

Hi, I'm trying to setup emacs for python. Here is my current configuration:

(setq major-mode-remap-alist

'((python-mode . python-ts-mode)))

(use-package eglot

:ensure t

:hook (python-mode . eglot-ensure)

:config

(add-to-list 'eglot-server-programs '(python-mode . ("pyright-langserver" "--stdio"))))



(use-package company

:ensure t

:init

(global-company-mode))

:config

(setq company-minimum-prefix-length 0)

(setq company-idle-delay 0.0)



(use-package cape

:ensure t)

This has multiple problems. First, when writing import ... I don't get completions. Second, if I have import numpy as np then later np. doesn't get completed to anything correct. I'm not sure which package is in charged of this and would love help in this regard.

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

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

/r/emacs

Emacs Scala Eglot TreeSitter Nix setup using Home Manager in 2024 - roast my video
https://youtu.be/vRDNkAk9Obo

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

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

/r/emacs

Is there a way to quit a :repeat keymap with a noop?

(defvar-keymap my-prefix-map
:repeat "t"
"<down>" #'windmove-down
"<left>" #'windmove-left
"<right>" #'windmove-right
"<up>" #'windmove-up
"q" #'noop
)


Is there a way to implement something like this? I want the keymap to be repeatable but I want a key to exit the keymap.

I tried to use "q" #'ignore :repeat (:exit ("ignore")), but that did not work.

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

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

/r/emacs

Conflict between org-mode and Flycheck, but only on MacOS?

I have the following load/config of Flycheck in my init.el:

(use-package flycheck
;; Flycheck base package
:ensure t
:commands global-flycheck-mode
:config
(setq flycheck-global-modes '(not org-mode))
:init
(setq flycheck-emacs-lisp-load-path 'inherit)
(add-hook 'after-init-hook #'global-flycheck-mode))

Note the sixth line, it tells global-flycheck-mode not to apply in org.

On my Linux machine, this works. On my MacOS MacBook, it doesn't. Both machines use the same config files (managed in a GitHub repo), and both are running Emacs 29.4 (Linux is custom-built, Mac is a Homebrew cask).

Yesterday (when I noticed this while doing some heavy editing of an org file on the Mac) I tried a number of different things to get FC to not be on for org, but every time I restarted Emacs the org buffers had FC enabled.

Does this sound familiar to anyone here?

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

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

/r/emacs

Some useful Elisp for writing prose
https://github.com/gigamonkey/writing

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

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

/r/emacs

Icons are not shown with ivy and all-the-icons

Hi all, I'm new into emacs and I'm creating my config file. Following some videos and guides, I ended with this config: https://codeberg.org/DevGiu/emacs-config/src/branch/main/config.org

I have all-the-icons installed, and ivy icons and so on, on my config file All-The-Icons under "All The Icons" title, and Ivy under "Ivy" title, but when icons must be shown, when trying to open a file for example or M x for a command, icons are not shown and I have no idea why.

https://preview.redd.it/icjd0g0wo1cd1.png?width=825&amp;format=png&amp;auto=webp&amp;s=f650017ce996687d4ffff294f1c447369211b21d

Thanks for the help

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

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