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

Is which-key really obsolete?

Finally updated to 29 today and did a package update. Emacs completed that and then said that the which-key, restclient, ox-reveal, olivetti, geben, elfeed, and bug-hunter packages are obsolete and suggested running package-autoremove.

However, the package list only shows compat and git-commit as being obsolete - neither of which are on the autoremove list.

Any suggestions as to what's going on?

https://redd.it/18pt5zt
@r_emacs

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

/r/emacs

Are cursor colors completely independent of themes?

I'm looking to change the cursor color as it doesn't show well in a theme I'm trying out, and the docs don't indicate any link between the theme and the cursor color.

I assume that a cursor would have to be chosen to match the theme better, making it more visible against the background, and theme designers would take that into consideration.

Do some themes have a way of adjust the cursor colors to match at runtime or there none whatsoever?

https://redd.it/18pntk6
@r_emacs

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

/r/emacs

Helm interface for the Ement matrix client

I created a small package providing Helm interface for the Ement matrix client and wanted to share it with you.

https://github.com/FrostyX/helm-ement

You can use it as an alternative to M-x ement-room-list for switching between chat buffers.

https://redd.it/18pia95
@r_emacs

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

/r/emacs

Wrapping Python in elisp

I want to wrap a python package for emacs and then turn the wrapper into an emacs package. How do I go about embedding the python code itself? Does the .py file have to be joined to the emacs package in one folder?

https://redd.it/18phd1x
@r_emacs

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

/r/emacs

Why am I seeing the following error? Wrong type argument: stringp, my-org-directory

When I try to open `org-agenda` I see the error. This is the relevant part of the config.

(setq my-org-directory "~/org/")
(setq my-org-roam-directory "~/org/roam/")

(use-package org
:ensure t
:config
(setq org-archive-location (concat my-org-directory "/archive.org::"))
(setq org-capture-templates
`(("i" "Inbox" entry (file+headline ,(concat my-org-directory "/notes.org") "Inbox")
"* TODO %?\n %i\n %a")))
(global-set-key (kbd "C-c C-a") 'org-agenda))

(use-package org-roam
:ensure t
:config
(org-roam-mode))

(setq org-roam-directory my-org-roam-directory)

I've evaluated `my-org-directory` and it shows the correct value, so I'm not sure what is causing this.

https://redd.it/18paqt2
@r_emacs

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

/r/emacs

How to speed up gnus by tools like offlineimap, dovecot, leafnode and so on?

Hello everyone,

I am searching for ways to speed up gnus by other tools. By googling, I find that the combination of offlineimap and dovecot can make fetching gmail or other mail fast, and the leafnode can make fetching nntp mail fast.

I want to read mail list provided by nntp and gmail. It seems that both the way by offlineimap and dovecot and the way by leafnoe are needed. Is that correct? Or the combination of offlineimap and dovecot can also help fetch nntp mail.

It would be great if anyone can help!

https://redd.it/18p5kqr
@r_emacs

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

/r/emacs

Setting Org habit on repeat after certain number of hours

I am trying to create a habit where I run three times a week. So I decided to set a org habit that is set to every 56 hours as follows using org-gtd:

Running
SCHEDULED: <2023-12-22 Fri 23:00 ++56h>
:PROPERTIES:
:ID: Running-2023-12-22-22-02-57
:STYLE: habit
:END:
2023-12-22 Fri 21:57

In the org manual, it says that I should be able to do this. But when I open the agenda view, I am hit with the error: Debugger entered--Lisp error: (error "Invalid duration string: ++56h")

Why is it not possible to do this? Or is there another way to achieve this?

https://redd.it/18oweeq
@r_emacs

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

/r/emacs

New emacs dashboard
https://redd.it/18p15jq
@r_emacs

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

/r/emacs

javascript/react native/jsx Emacs 29

EDIT: found this. I need to work through it : https://www.reddit.com/r/emacs/comments/18d8aqr/please\_contribute\_to\_treesitter\_based\_javascript/

&#x200B;

I'd hoped that typescript-ts-mode (ts for treesitter) would work for editing .js files containing jsx, but reformat at least doesn't work. It could well be my set-up, but is there anyone here using tree sitter versions of js modes successfully with react/jsx from emacs 29? If not, what is the current "best thing" - googling js/jsx with emacs opens pandora's box and I'm really pretty confused as to how best to move forward.

&#x200B;

(use-package typescript-ts-mode
:config
(defun my/ts-mode-hook ()
(lsp-deferred))
(add-hook 'typescript-ts-mode-hook #'my/ts-mode-hook)
:mode (("\\.ts\\'" . typescript-ts-mode)
("\\.js\\'" . typescript-ts-mode)
("\\.tsx\\'" . tsx-ts-mode)))

&#x200B;

https://redd.it/18oodix
@r_emacs

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

/r/emacs

Using bufler and exwm to group my browser windows (NOT tabs!)
https://orys.us/vC

https://redd.it/18omuu7
@r_emacs

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

/r/emacs

How to ensure 'make-comint-in-buffer picks up the variables set up in my shell-config file

My specific problem happens when I'm starting a Python interpreter.

I've noticed that when I start the interpreter (using run-python), the interpreter doesn't have any of my variables: os.environ shows a bunch of useful variables but none of the ones I've set in my shell-config file (~/.zshrc).

I've been digging through the code and it seems that the python interpreter process is ultimately started by make-comint-in-buffer. What is the preferred solution to ensure that this function picks up all the variables I want before starting the process?

https://redd.it/18ojb4w
@r_emacs

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

/r/emacs

hiding the title bar...without using toggle-frame-fullscreen? (Linux OpenSUSE, emacs 29.1, XFCE)

[Reposting since evidently you can't edit a post on Reddit that has an image!\]

I bet I'm missing something obvious, but haven't been able to figure this out.

I've got the menu-bar and tool-bar hidden. But I can't figure out how to get rid of this gray bar at the very top of emacs:

https://preview.redd.it/ny5s3y04iu7c1.png?width=1008&amp;format=png&amp;auto=webp&amp;s=e2eedd6ef87a036c1b0c9e931c135b4de3c63d0a

I can get rid of it using toggle-fullscreen-mode, but that also hides the system menu. I don't want fullscreen, I just want the bar gone.

Any way to do that?

Thanks!

https://redd.it/18oejks
@r_emacs

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

/r/emacs

Is there a way to start specific code blocks as folded?

I don't want to start all of them in the folded state, I'd like to specify a folded property for specific src blocks. Is there a way to do this?

https://redd.it/18oe1w4
@r_emacs

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

/r/emacs

Trouble with Input Method in Agda

I am using agda2-mode, and it always binds "\\" key to starting the input method for the latex. I have rebound this behavior to another key, and would now like to rebind "\\" to inserting "?". But the standard way of C-h C-k in order to find the function does not work. In addition, attempts like `(define-key agda2-mode-map (kbd "\\\\") (lambda () (interactive) (insert "?")))` doesn't work either. Any ideas would be appreciated.

https://redd.it/18o04ya
@r_emacs

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

/r/emacs

Flyspell help Windows

Flyspell is not working for me, I enable flyspell by Mx flyspell-mode but it does not highlight the spelling errors. I am using hunspell (in Windows 11 with a portable Emacs version 29.1).

Hunspell is configured in the init.el as follow:

(setq ispell-program-name "C:/MASS/hunspell-1.3.2-3-w32-bin/bin/hunspell.exe")
(setq ispell-local-dictionary "enGB")
(setq ispell-local-dictionary-alist '(("en
GB" ":alpha:" "^[:alpha:]" "'" nil ("-d" "enGB") nill utf-8)))
(when (boundp 'ispell-hunspell-dictionary-alist)
(setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist))
(setq hunspell-default-dict "en
GB")

Any advice will be helpful.

https://redd.it/18o22l0
@r_emacs

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

/r/emacs

tree-sit guess style?

So regular C/C++ mode have a very very helpful tool, where you can run c-guess.

I

1. was hoping to automate this (automatically run it, instead of M-x c-guess <RET> every time) when it detects I am in a C/C++ buffer

2. wanted to ask if anybody knows of a similar feature for c-ts-mode and c++-ts-mode

https://redd.it/18ppzbl
@r_emacs

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

/r/emacs

Quelpa doesn't like me trying to install copilot. Would love any tips or feedback please.

Setup code from config, doesn't seem as clean as it could be:

(use-package quelpa
:ensure t)

(require 'quelpa-use-package)

(use-package quelpa-use-package
:ensure t)

(use-package copilot
:quelpa (copilot :fetcher github
:repo "zerolfx/copilot.el"
:branch "main"
:files ("dist" "*.el")))

Applicable messages on parsing:

Loading /Users/spicy/.emacs.d/config.el (source)...
Fetcher: github
Source: zerolfx/copilot.el

Updating /Users/spicy/.emacs.d/quelpa/build/copilot/
/Users/spicy/.emacs.d/quelpa/build/copilot/dist => /var/folders/3_/yr95257x2gn5ty49kdzvk9dr0000gn/T/copilot4fGmhP/copilot-20231219.52554/dist
/Users/spicy/.emacs.d/quelpa/build/copilot/copilot-balancer.el -> /var/folders/3_/yr95257x2gn5ty49kdzvk9dr0000gn/T/copilot4fGmhP/copilot-20231219.52554/copilot-balancer.el
/Users/spicy/.emacs.d/quelpa/build/copilot/copilot.el -> /var/folders/3_/yr95257x2gn5ty49kdzvk9dr0000gn/T/copilot4fGmhP/copilot-20231219.52554/copilot.el
Parsing tar file...done
Error getting PACKAGE-DESC: (wrong-type-argument arrayp nil)
quelpa-package-install: Wrong type argument: package-desc, nil
Quit

It reads to me like the tar is in a bad format? Or I'm just misconfigured it? (This wouldn't be caused by missing dependencies or anything, right? And shouldn't use-package install dependencies anyway?)

Thanks for any tips. (or if there is a more hand holding copilot install).

https://redd.it/18plg8s
@r_emacs

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

/r/emacs

Showing off ( I am good at it) Eyeing on the proceedings! 😜 NotMuch Running Inside Emacs on Terminal! But, what's the big deal???

https://redd.it/18pihlb
@r_emacs

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

/r/emacs

Newbie here, why is Emacs so beloved

I've used vim (not as my main dev environment) since i first used linux 2 years ago

Since then i've heard about Emacs (some of my teachers in the CS university use it) and that it's more than just an editor

I want to know moee about emacs, where to start learning it's features.

Some friendly starting point and some impressive thing that can be done with Emacs

Thanks for any advice

https://redd.it/18pcq62
@r_emacs

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

/r/emacs

META: replace jsled as mod

Our only active mod acts in bad faith.
Most recent example:

https://www.reddit.com/r/emacs/comments/18p15jq/newemacsdashboard/kem4893/

They add nothing to this community and detract greatly from it.
Personally I'd like a mod with less of an axe to grind who sticks to removing only blatantly egregious posts and spam. Someone who has actually contributed to the community with a proven track record and isn't just thirsty for "mod status".

https://redd.it/18p9g2b
@r_emacs

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

/r/emacs

Company-mode appending $1?

Sorry if this has been asked about before, but I haven't been able to turn up any search results about this occurring... For some reason any time I <tab> complete imports in typescript files, company-mode (I assume) is appending a $1 to the end of the name. For example, if I were to type import {Rec and then press <tab> to complete I would expect the result to be import { Recipe } from './recipes/recipe.model where Recipe is the name of the class. Instead my tab-completion is imported as import { Recipe$1 } from './recipes/recipe.model';


This additional $1 only occurs when importing packages- not when using tab completions for anything else. Happy to provide any pieces of my init file that would be of use to help me solve this!

https://redd.it/18p6alb
@r_emacs

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

/r/emacs

Elisp development habits, practices, and tools?

For Emacs speedrun videos, I have a lot of org docs stacked up that needs recording.

However, especially with subjective choices with lots of valid options, community breadth is more valuable that individual depth.

What are habits, tools, configuration choices, fundamental and advanced, that you would recommend to a programmer to ramp up quickly, all the way to becoming productive at working on Elisp packages?

Videos are around 5-10min and count on the viewer to do the work but try to let them know when to go deep and what on.

I'll go first:
Intrinsic types in Emacs (and how to relate it to understanding the UI)
Apropos and small tricks to use docstring conventions to search for types
Byte compiling
Structural editing of some variety
Evaluate in other buffer, all the evaluation workflows and their tradeoffs
Persistence, be it org mode, saving scratch, writing modules, or ielm history
All the bells & whistles in the helpful package, including using it to quickly find the right manual contents
Fuzzy searches for symbols and important search keys like "-hook$" and "-functions?$" etc
Edebug & debug
LLM prompting to overcome lack of proper vocabulary & language barrier
Shortdocs
The built-in Emacs glossary
Macrostep
Tests
Process, JSON-RPC, HTTP
Probably some CL because I think the built-in loop structures are just anemic, but I want to stick to bread & butter cl-lib. That said, what do you consider bread & butter?

Even if I don't share your views, I will try to make sure that sources of high value with at least a significant fraction of users are represented. It costs very little extra time to mention something like, "If you are doing X a lot or when you get to Y, people say try adopting Z."

https://redd.it/18p1fp7
@r_emacs

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

/r/emacs

Looking for a particular Emacs package...

...that makes elisp maintenance more thankless.
EDIT: found it!

PSA: If you're asking for support, don't do what this person did.

https://redd.it/18ow191
@r_emacs

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

/r/emacs

Flyspell highlights every single word I type (with both aspell and hunspell)

As the title says, Flyspell highlights every single word, even if it's correct and if it exists in the dictionary. At first, I thought it's an issue with `aspell`, so I switched to `hunspell`, but the behavior is the same. I do have `hunspell` installed on the system, dictionaries too (using Romanian language), running `hunspell -D` in console shows that the dictionaries are loaded:

LOADED DICTIONARY:
/Users/claudiu/Library/Spelling/ro_RO.aff
/Users/claudiu/Library/Spelling/ro_RO.dic

This is my spellcheck config bit from `init.el`:

(setenv "DICTIONARY" "ro_RO")
(setenv "DICPATH" (concat (getenv "HOME") "/Library/Spelling"))
(setq ispell-program-name "hunspell")
(setq ispell-really-hunspell t)
(setq ispell-dictionary "ro_RO")
(setq ispell-local-dictionary "ro_RO")
(setq ispell-dictionary-alist '(("ro_RO" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "ro_RO") nil utf-8)))

Every single word in the image below exists in the dictionary and shouldn't be highlighted. Anyone have any idea why this is happening?

https://preview.redd.it/g0ykjem1qw7c1.png?width=902&amp;format=png&amp;auto=webp&amp;s=6199500b45618cce53e4a06b45b7a4b228bb1199

https://redd.it/18ooj6k
@r_emacs

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

/r/emacs

Basic keybinding question

Super new emacs user here, sorry for the dumb question. Suppose I want to map control-w to closing the current window. Can someone tell me why adding the following to the end of init.el doesn't work:

(global-unset-key (kbd "C-w"))
(global-set-key (kbd "C-w") 'delete-window)

Edit: Looks like evil-mode added a whole bunch of keybindings for working with windows that all start with C-w. I think I'll try actually using those.

One things I'm still unclear about: Did global-unset fail to remove these because they aren't global? Or did it fail because you'd have to unset each binding that begins with C-w individually?

I'm hoping it's not the second one. That's a lot of commands, if you have to unbind each one individually.

https://redd.it/18oj21l
@r_emacs

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

/r/emacs

ESC + Arrow keys not working in tui since Emacs 29.1

So I was running some random commit from master for a while (because nix overlay defaults) and then when Emacs 29.1 was released properly I switched over. Since then single ESC isn't respected in tui (-nw) but works fine in gui. Same for the arrow keys. They're fine in gui but in tui they force me into insert mode (with a flash of M-o being undefined) and type ABCD.

I get the same behaviour with -Q and then eval (require 'evil), so it's something that's changed upstream and not in my config.

Anyone else affected and have found a solution?

https://redd.it/18ohgjd
@r_emacs

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

/r/emacs

Read Confluence pages from Emacs!
https://sr.ht/~sebasmonia/confluence-reader.el/

https://redd.it/18oe3qh
@r_emacs

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

/r/emacs

More blather on the XDG recently-used database

At risk of trying your patience, I have been able to provide a read and write interface to the XDG recently-used database together with access to the mime-type.

The read-access uses easymenu:

https://preview.redd.it/lareql1ztr7c1.png?width=674&amp;format=png&amp;auto=webp&amp;s=c950c263e35b0bef63d2fe57ed784dc9167afe9c

(menu-bar-mode)
;(use-package 'easymenu) ; https://www.emacswiki.org/emacs/EasyMenu - now built-in

;; adapted from https://kitchingroup.cheme.cmu.edu/blog/2014/08/20/Creating-a-dynamic-menu-for-Emacs/
(easy-menu-define xdg-menu global-map "MyFilesMenu"
'("XDG Recent Files"
["update" update-my-file-menu]))
(defun get-menu (label command)
(easy-menu-create-menu
label
(mapcar (lambda (x)
(vector (file-name-nondirectory x)
`(lambda () (interactive) (find-file ,x) t)))
(split-string
(shell-command-to-string command)
"\n" t))))
(defun update-my-file-menu ()
"update the xdg-menu - putting this in menu-bar-update-hook makes emacs sluggish"
(interactive)
(easy-menu-add-item xdg-menu '() (get-menu "Text Files" "recentf-gtk --mime-type text/*"))
(easy-menu-add-item xdg-menu '() (get-menu "PDF Files" "recentf-gtk --mime-type application/pdf"))
(easy-menu-add-item xdg-menu '() (get-menu "Image Files" "recentf-gtk --mime-type image/*")))

; this makes emacs very sluggish, hence the 'update' menu item above:
;(add-hook 'menu-bar-update-hook 'update-my-file-menu)

The write-access uses save-hook:

;;;* save to recently-used.xbel
(defun bh/save-to-recently-used ()
(shell-command (concat "recentf-gtk --mime-type text/plain --app-name emacs --app-exec 'emacsclient %f' add " buffer-file-name)))
(add-hook 'after-save-hook #'bh/save-to-recently-used)

This requires installing the python program: [recentf-gtk](https://gitlab.com/wef/dotfiles/-/blob/master/bin/recentf-gtk?ref_type=heads)

See also: [https://www.reddit.com/r/emacs/comments/18moz5d/emacs\_and\_the\_recentlyusedxbel\_database/](https://www.reddit.com/r/emacs/comments/18moz5d/emacs_and_the_recentlyusedxbel_database/)

Thanks to those who provided code and ideas for this integration.

https://redd.it/18o65dx
@r_emacs

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

/r/emacs

Eglot disappeared on mode-line

I don't know why but Eglot suddenly disappeared on my mode-line. Previously it was like `[eglot:project\]`, but now it's like `[\]`.

I didn't really change my configuration. Any ideas about why this happened?

https://redd.it/18o4o75
@r_emacs

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

/r/emacs

Release v0.8 · alphapapa/org-ql
https://github.com/alphapapa/org-ql/releases/tag/v0.8

https://redd.it/18o0aop
@r_emacs

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