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

Does anyone have a workflow for quickly adding todos to org mode from a web-mail interface like gmail or proton?

I'd love to just be able to forward a message to a specific email address or apply a tag to have a todo item automatically added to my org agenda. Does anyone have a workflow or toolkit set up that does this?

https://redd.it/17xn7hd
@r_emacs

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

/r/emacs

emacs on android

I just installed emacs for Android from the fdroid store. I do not see a way for me to grant storage access to my local device. Without that permission, I don't see how I can edit files, particularly org files, on my local device


I will put a screenshot of my apps permissions in a comment.

https://redd.it/17xjcgh
@r_emacs

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

/r/emacs

GitHub - emacs-ng/emacs-ng: A new approach to Emacs - Including TypeScript, Threading, Async I/O, and WebRender.
https://github.com/emacs-ng/emacs-ng

https://redd.it/17xg2kd
@r_emacs

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

/r/emacs

I just installed emacs... help?
https://redd.it/17x3ye2
@r_emacs

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

/r/emacs

selection-highlight-mode - A minor mode for highlighting matches to the selection (inspired by VS Code)
https://github.com/balloneij/selection-highlight-mode

https://redd.it/17wy4xk
@r_emacs

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

/r/emacs

My LaTeX setup with emacs
https://michaelneuper.com/posts/efficient-latex-editing-with-emacs/

https://redd.it/17wv8jo
@r_emacs

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

/r/emacs

adding MELPA package archive

emacs noob here.

I'm rewriting my init.el file from scratch using use-package macro. In my existing init file I use require to configure MELPA package archive.

(require 'package)

(add-to-list 'package-archives '("MELPA" . "`http://melpa.org/packages/`"))

(package-initialize)

Can I rewrite this using use-package macro?

https://redd.it/17ws9tm
@r_emacs

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

/r/emacs

How to modify the default folder shown by org-attach

hi fellow r/emacs ers,

I use org-attach a lot in my notes.
And I also have a default temp folder on my disk where everything I collect lands in (created automatically by emacs at startup, using the date as variable for its name).

When I try to attach a file using org-attach, the default folder shown is the root of my note folder, it varies according to the notes.

What can I do to have my default temp directory (created using '(make-directory mydailytempdir)' ) to be the first goal shown when opening an 'org-attach' process looking for new attachments?

I tried to look into the elisp file 'org-attach.el', but my elisp-fu is not good enough...

I guess using embark could help, but it would add many keypresses... I'd like to avoid it.

is there a way to have a selection of path to choose from when opening org-attach (that could be defined in the init.el)??

thanks for your time and replies

https://redd.it/17wl5kn
@r_emacs

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

/r/emacs

How do I speed up output from an async-shell-command or start-process?

I tried the async-shell-command and start-process functions to get the output from the very verbose app. Logs still arrive even 2-3 minutes after the process has ended. Is there any way to speed buffer up?

https://redd.it/17wklf7
@r_emacs

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

/r/emacs

Using the golang mode shipped with Emacs
https://magnus.therning.org/2023-11-16-using-the-golang-mode-shipped-with-emacs.html

https://redd.it/17wgpsp
@r_emacs

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

/r/emacs

What do these characters in the describe-function completion minibuffer mean?
https://redd.it/17w7l9o
@r_emacs

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

/r/emacs

put these, and when should they be evaluated? I think that just referring to a function symbol doesn't trigger autoloading, so I believe these configurations should happen after project.el is loaded, and that it doesn't matter if magit is loaded or not yet.

Since, project.el is built-in to Emacs, it's probably most reasonable to do that config in the magit use-package form, but what if project.el were another third-party package that had its own use-package form? Would we add the config in the project use-package form, or in the magit use-package form? Or, we could do something clever/hacky,

(use-package emacs
:after project
:requires magit
:config
(define-key project-prefix-map "m" #'magit-project-status)
(add-to-list 'project-switch-commands '(magit-project-status "Magit") t))

But, if we do this a lot, then it feels like our init.el is getting just as disorganized as it was before use-package.

## Conclusion

This is too rambly already. I think the point is that I'm becoming less convinced that installing/updating packages, loading them, and configuring them at the same time is the right way to think about it.

Obviously, if you know what you're doing, you can use use-package to great success. But, I think my contention is that I've been familiar with Emacs for a long time, I'm a professional software developer, and I still make mistakes when editing my init file. Either I'm a little dim or the tooling here is hard to use correctly.

Am I the only one?

https://redd.it/17vxhw2
@r_emacs

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

/r/emacs

Is the SQLite library developed for Emacs 29 are available for Emacs 28 or 27 through the compatibility layer?



https://redd.it/17vpft8
@r_emacs

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

/r/emacs

golang templ mode ?

Anyone got some config for https://templ.guide/ I am currently using web mode but it does not indent inside the functions nicely is there any package or configuration anyone is using ?

https://redd.it/17vt79q
@r_emacs

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

/r/emacs

Better cua-mode

Hi,

I was thinking how we can solve the ctrl+c "problem", I found that the ctrl+c with cua-mode is working as copy when a region is selected and it is working az prefix when there is no region selected.
I would like to ask that is possible to change the ctrl+c in the "c" codebase easily or I don't know where ?
It can be a patch and create a custom build to myself ...
Or I just live with it and there is no way to put this "user prefix" to an other key combination ?

thanks for the answers!


https://redd.it/17vq45i
@r_emacs

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

/r/emacs

TRAMP to edit files inside LXC container not working.

The container is running but TRAMP is not able to connect to it, not sure why.

`/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf/neo4j.conf`

Debugger entered--Lisp error: (file-error "Tramp failed to connect. If this happens repeated...")
signal(file-error ("Tramp failed to connect. If this happens repeated..."))
tramp-error(nil file-error "Tramp failed to connect. If this happens repeated...")
tramp-signal-hook-function(file-error ("Tramp failed to connect. If this happens repeated..."))
signal(file-error ("Tramp failed to connect. If this happens repeated..."))
tramp-maybe-open-connection((tramp-file-name "lxc" nil nil "aws-t2-nano-neo4j" nil "/neo4j-community-3.1.1/conf/neo4j.conf" nil))
tramp-send-command((tramp-file-name "lxc" nil nil "aws-t2-nano-neo4j" nil "/neo4j-community-3.1.1/conf/neo4j.conf" nil) "test 0 2>/dev/null; echo tramp_exit_status $?")
tramp-send-command-and-check((tramp-file-name "lxc" nil nil "aws-t2-nano-neo4j" nil "/neo4j-community-3.1.1/conf/neo4j.conf" nil) "test 0")
tramp-get-test-command((tramp-file-name "lxc" nil nil "aws-t2-nano-neo4j" nil "/neo4j-community-3.1.1/conf/neo4j.conf" nil))
tramp-run-test("-d" "/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf...")
tramp-sh-handle-file-directory-p("/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf...")
tramp-sh-file-name-handler(file-directory-p "/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf...")
apply(tramp-sh-file-name-handler file-directory-p "/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf...")
tramp-file-name-handler(file-directory-p "/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf...")
file-directory-p("/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf...")
find-file-noselect("/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf..." nil nil nil)
find-file("/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf...")
counsel-find-file-action("/lxc:aws-t2-nano-neo4j:/neo4j-community-3.1.1/conf...")
ivy-call()
ivy-read("Find file: " read-file-name-internal :matcher counsel--find-file-matcher :initial-input nil :action counsel-find-file-action :preselect nil :require-match confirm-after-completion :history file-name-history :keymap (keymap (remap keymap (undo . counsel-find-file-undo)) (67108960 lambda (&optional arg) "nil (`nil')" (interactive "p") (if (string= "" ivy-text) (execute-kbd-macro (kbd "M-o b")) (self-insert-command arg))) (96 . counsel-file-jump-from-find) (C-backspace . counsel-up-directory) (67108991 . counsel-up-directory)) :caller counsel-find-file)
counsel--find-file-1("Find file: " nil counsel-find-file-action counsel-find-file)
counsel-find-file()
funcall-interactively(counsel-find-file)
command-execute(counsel-find-file)


​

https://redd.it/17xc2xu
@r_emacs

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

/r/emacs

Emacs Workspace: IDE + Yet Another Jupyter

Published a [blog](https://ochicken.net/projects/workspace/) on working Emacs as yet another Jupyter & IDE. Features:

* Use **Org mode Babel as yet another Jupyter** and can **preview LaTeX TikZ** pictures;
* Use **Org mode to generate blog pages** and deploy to VPS, **not rely on Hugo** and Hexo;
* A **mini-IDE** for programming.

https://preview.redd.it/pmt558n6gx0c1.png?width=1920&format=png&auto=webp&s=3836d06b5a13ee89cc4f6d83311c1aa66681c033

Thanks u/mahmooz & u/0lMon

https://redd.it/17xhbvi
@r_emacs

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

/r/emacs

⛔ Warning (with-editor): Cannot determine a suitable Emacsclient

⛔ Warning (with-editor): Cannot determine a suitable Emacsclient

Determining an Emacsclient executable suitable for the
current Emacs instance failed. For more information
please see https://github.com/magit/magit/wiki/Emacsclient.

I switched to guix as the package manager following system-crafters tutorial. I have correct setup the PATH variable so that binaries from guix are accessible, but still magit is not able find emacsclient even though it is there and I can launch it from shell. No changes to the configure has been made. Used to work this morning but after removing apt emacs and installing emacs via guix I get this issue.

Config:

(use-package magit
:bind (("C-c g" . #'magit-status)))

​

https://redd.it/17x8ulz
@r_emacs

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

/r/emacs

No org-babel-execute function for grep!

I'm putting the output of M-x grep in an org src block, so I can save it and come back to it later. I want to be able to click on a line and jump to the match, but I get the error "No org-babel-execute function for grep!". I can't find anything like ob-grep. Any ideas?

https://redd.it/17x1ozd
@r_emacs

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

/r/emacs

Debug multi threaded Python apps with Emacs, eglot and dape
https://www.youtube.com/watch?v=YKkyfz4cU8g

https://redd.it/17wx1h4
@r_emacs

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

/r/emacs

(error "Selecting deleted buffer") working with an org buffer with an effort table

When I C-c C-x C-u to update the table, I get an error:
Error running timer 'flyspell-lazy-check-visible': (error "Selecting deleted buffer")
If I disable flyspell, I receive a similar error the second time I try to update the table (the table is first deleted):
Selecting deleted buffer

Killing the buffer and reopening the file lets me update the table once.
Thanks for any advice!

GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-10-02
Debian 12

https://redd.it/17wt4e3
@r_emacs

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

/r/emacs

I love emacs
https://redd.it/17wpdzf
@r_emacs

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

/r/emacs

How to modify the default folder shown by org-attach

hi fellow r/emacs ers,

I use org-attach a lot in my notes.
And I also have a default temp folder on my disk where everything I collect lands in (created automatically by emacs at startup, using the date as variable for its name).

When I try to attach a file using org-attach, the default folder shown is the root of my note folder, it varies according to the notes.

What can I do to have my default temp directory (created using '(make-directory mydailytempdir)' ) to be the first goal shown when opening an 'org-attach' process looking for new attachments?

I tried to look into the elisp file 'org-attach.el', but my elisp-fu is not good enough...

I guess using embark could help, but it would add many keypresses... I'd like to avoid it.

is there a way to have a selection of path to choose from when opening org-attach (that could be defined in the init.el)??

thanks for your time and replies

https://redd.it/17wl5p5
@r_emacs

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

/r/emacs

Point jumps to start of buffer after save when there are changes to save

Still on Emacs 27.1. I'm sure this behaviour is recent and has not always been the case. At startup my after-save-hook is nil. When I first open an org file this changes to (rmail-after-save-hook) despite not using rmail. This is normal though based on this answer from Eli. In other org buffers the (buffer local) value is (diff-hl-update t) whether under version control or not as global-diff-mode is enabled. For python files the (buffer local) value is (diff-hl-update t ws-butler-after-save) as ws-butler-mode is enabled in the prog-mode-hook. What am I missing that could cause this behaviour? It is occurring irrespective of the buffer and only if there are changes to be saved.

https://redd.it/17wk17n
@r_emacs

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

/r/emacs

Note taking

I looking to migrate to emacs (running under WSL) for note taking. Currently I am using notepad++ as it lets me have multiple scratch buffers that will persist. That is I wanting buffers that I don't have to name or explicitly save that will still be there if emacs (or computer itself) are restarted.

https://redd.it/17wc928
@r_emacs

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

/r/emacs

Needed this so bad
https://redd.it/17w0pvm
@r_emacs

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

/r/emacs

Does anyone else feel like use-package might be the wrong abstraction, or do I just not get it?

Context:

I've used Emacs off and on for many years at this point. Throughout that time there have been periods where I really leaned in to it and tried to use it for everything, and there have been periods where I only used it for org and/or magit, etc. I've learned lots of things about it and I've forgotten lots of things about it, but I've never been what I would call an "expert" or even a "power user". So, when I feel like something isn't working well in Emacs, I almost always default to the assumption that I'm doing something wrong or misunderstanding something, etc.

So, it very well may be that I'm wrong/crazy in my recent conclusion that use-package might not be the ideal abstraction for managing Emacs packages.

With that out of the way, I'll say that when I first saw use-package, I thought it was amazing. But, in the years that I've been using use-package, I never feel like my init file is "right". Now, I'm starting to think that maybe it's use-package that's wrong and not me (insert Simpsons principal Skinner meme).

I don't know how best to articulate what I mean by use-package being a "wrong abstraction", but I'll try by listing some examples and thoughts.

## Autoloads

First of all, I feel like the way autoloads are handled with use-package is too mistake-prone. Libraries/packages typically define their own autoloads, but the use-package default is to eagerly load the package. I understand that installing a library via package.el, etc will process the autoloads for us and that manually/locally installed packages get no such benefit.

But, if we're using use-package to also manage installing the packages for us (:ensure t), then why shouldn't it know about the autoloads already and automagically imply a :defer t by default?

So, by default, we have to remember to either add :defer t or we have to remember that setting our own hooks, bindings, or commands will create autoloads for us.

I know that you can configure use-package to behave as though :defer t is set by default, but that's just broken for packages that don't have any autoloads.

It feels like maybe use-package is doing too many things. Maybe it was actually more correct in the old days to separate the installation, configuration, and actual loading of packages, rather than trying to do all three in one API.

## Configuration that depends on multiple packages is ugly/inconsistent

Many packages are fairly standalone, so you can just do,

(use-package foo
:defer t
:config
(setq foo-variable t))

and it's clean and beautiful. But, sometimes we have configuration that is across multiple packages. A real-world example for me is magit and project.el. Magit actually provides project.el integration, wherein it adds magit commands to the project-switch-commands and the project-prefix-map. That's great, but it will only run if/when the magit package is loaded.

So, my first guess at using use-package with magit was this,

(use-package magit
:ensure t
:defer t
:config
(setq magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))

which seems reasonable since I know that magit defines its own autoloads. However, I was confused when I'd be using Emacs and the project.el switch choices showed a magit option sometimes.

I eventually realized what was going on and realized that the solution was to immediately load magit,

(use-package magit
:ensure t
:config
(setq magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))

but that kind of sucks because there's no reason to load magit before I actually want to use it for anything. So, what we can do instead is to implement the project.el integration ourselves. It's really just two commands:

(define-key project-prefix-map "m" #'magit-project-status)
(add-to-list 'project-switch-commands '(magit-project-status "Magit") t)

But, the question is: Where do we

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

/r/emacs

Long Document Navigation (bookmarks? folding?)

Good morning,

I recently have become enamored of Typst for document creation. It's fast, it's approachable, it's cross platform, and it's extremely capable even in preview beta. I never really got the swing of LaTeX with all the backslash/curlybrace mayhem.

In any event, I find myself actually working on a long technical document in Typst in Emacs. There does exist typst-ts-mode so thanks tree-sitter and all those people who manage the grammar libraries for it. However I'm finding myself in need of a better way of navigating the huge document to get to sections I want to do.

I looked into the baked-in bookmarks and I could probably use that capability, though I was hoping for more of an customizeable outline mode. Manually setting the bookmarks for an entire document seems tedious. I mainly just want to navigate by headings and that would be sufficient.

What do people use for this sort of thing (possibly in the LaTeX world?) Just bookmarks with some sort of automated way of populating the bookmarks? I did check the typst-ts-mode and while there are some functions there for compiling, there don't seem to be any functions for navigating by semantic structures. Perhaps that's baked into tree-sitter itself?

Anyhow, any help greatly appreciated here.

https://redd.it/17vtn80
@r_emacs

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

/r/emacs

EMT - Emacs MacOS Tokenizer for enhanced CJK word operations

Hey r/emacs,

I'm excited to share my new package with you that I've been working on - EMT (Emacs MacOS Tokenizer).

EMT leverages macOS's built-in NLP tokenizer by dynamic module to tokenize and handle CJK words in Emacs. It also introduces a minor mode (emt-mode) that remaps functions forward-word, backward-word, mark-word, kill-word, and backward-kill-word to their CJK compatible versions.

repo: EMT - Emacs MacOS Tokenizer

https://redd.it/17vrmrk
@r_emacs

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

/r/emacs

Just for fun: roast my work / play setup
https://redd.it/17vq5lq
@r_emacs

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