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

I want to journaling, but I need a few specific things. Can you tell me if Emacs can do them, before start learning it?

Hey! I use Cherrytree for journaling, but it has a few things I want to change, and lack a few things that I need. Plus, I'm worry about locking myself in one app, so I'm exploring the possibility of using Neovim or Emacs, but I'm aware there's a learning curve, and before investing time, I wanted to know if I'm using the right tool.

I need to do the following in a quick way:

1- Encrypt a whole folder, and acces it. This folder will keep other folders with pictures and text files.

2- Set a number of columns for the page, like 80 or 100.

3- Have a tree-like explorer on the left, to navigate the files with the entries.

4- Do bold, italics, and different colors.

5- Make an index or a different way to navigate the entries, besides the tree explorer.

6- Export everything in case I want to change the program I use to read my entries.

7- Inserting an image from a folder, like a picture I took. It can be a miniature to click and open the original picture.

Can Emacs do that?

Thanks!

https://redd.it/1828hpm
@r_emacs

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

/r/emacs

Modern Windows Emacs Dired Context Menu Helper?

Hello,

I'm considering to use dired as main file browser for Windows. I would like to use "context.exe" app (http://www.maddogsw.com/cmdutils/ ) that shows explorer context menu of specified file, but the app is not updated for more than 20 years and it seems no longer working.

Is there any modern version of file context menu tool nowadays?

https://redd.it/1823mnc
@r_emacs

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

/r/emacs

Visualising data analysis in org-mode

Hello r/emacs! First-time poster here!

I recently wanted to visualise some data in org-mode using a Python source block to generate an image, which was then rendered directly in the buffer.

It took my a couple of goes to work out how to do it.

Given some data like this:

#+begin_src bash :results output file :file data.njson
echo '{"name": "Spock", "editor": "Emacs"}
{"name": "James Kirk", "editor": "Vim"}
{"name": "Dr McCoy", "editor": "Vim"}
{"name": "Scotty", "editor": "Emacs"}
{"name": "Worf", "editor": "ed"}
{"name": "Geordi LaForge", "editor": "Emacs"}
{"name": "Data", "editor": "Emacs"}
{"name": "Jean-luc Picard", "editor": "VS Code"}
{"name": "Wesley Crusher", "editor": "VS Code"}
{"name": "William Riker", "editor": "Vim"}
'
#+end_src


A visualisation can be rendered as follows:

#+begin_src python :results output file :file usage.png
import pandas as pd
import seaborn as sns
import sys

df = pd.read_json("data.njson", lines=True)
axes = sns.histplot(df, x="editor")
axes.get_figure().savefig(sys.stdout.buffer)
#+end_src


The main trick here is to set the :results output file header argument to write the output to a file, and to save the figure to sys.stdout.buffer from Python.

I've written about this on my blog too, where you can see the unsurprising results of the analysis!

https://redd.it/1820h1y
@r_emacs

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

/r/emacs

Are links without spaces just a doom thing? They're driving me potty!

tl;dr why do my org links not have a space before them (e.g. check out thisLINK)? I feel I'm missing something very basic here.

I was using org-roam today in doom emacs and forgot how irritating adding a new node is while writing.

It nestles nicely up to the text before it - with no space in between. After posting on r/orgroam a kind soul told me this might be a wider issue - at least related to org itself, and maybe doom.

Does anyone know how to get a leading space before the node name / link? For example; my nodes come out looking like:

something interesting is in thisNODENAME/LINK check it out

For the love of RMS I want a space between this and NODENAME

I'm clearly being dumb, but can't figure this out. Surely enough people use emacs / doom emacs / org mode, and they are not all adding links everywhere with no leading space?

A suggestion on r/orgroam was put a double space before a link - is that it?

https://redd.it/181uxo2
@r_emacs

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

/r/emacs

How can swiper or some other search be restricted to a range of columns in a buffer?

When I do package-list-packages and I'm searching for a package, the search is not restricted to the package names, but searches the descriptions as well, and this requires scrolling down before starting the search.

Can the search be restricted to the column with the names?

https://redd.it/181p88m
@r_emacs

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

/r/emacs

Want to try an org-backed journaling iOS app? DM me an email address for TestFlight invite.
https://redd.it/181j2pw
@r_emacs

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

/r/emacs

How can I save the result of a ripgrep search

I use ripgrep for searching in a project and I want to save the ripgrep buffer with the links.

Simply saving the buffer just removes the links and leaves only plain text.

​

(The reason for this is, I want to go through several parts of the code which I found with ripgrep. This will take some days, and I want to be able to keep track of my progress by going through the search results and delete the ones I already worked on.)

https://redd.it/1818xk6
@r_emacs

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

/r/emacs

Is it possible to grab Mail.app desktop links in org and then open them in the iOS app?

I can grab links to specific messages in the desktop version of Apple Mail. I use Logseq to open my org files and I see the links which do open the mail app. But the message is not opened.

If I open them on a different desktop machine they do open the same message, just not on iOS.

Is there a way to do this? Maybe using a different program? I am open to anything.

https://redd.it/180ynw9
@r_emacs

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

/r/emacs

Emacs 29.1 Org 9.7 Issues with Auctex

I don't know if anyone else has been having this issue, but I am getting errors on startup related to auctex when using straight.el. This seems to happen after restarting my computer and the only fix I have, so far, is to delete my straight directory and rebuild all my packages from scratch. On EMACS startup after a restart, I will get an error about the permissions to [`autogen.sh`](https://autogen.sh) for Auctex. I tried modifying the permissions in it, and after I get the startup warning...

error: :pre-build command error in "auctex" recipe in command "(\"./configure\" \"--without-texmf-dir\" \"--with-lispdir=.\")"

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

The `*straight-process*` buffer says...

$ ./configure --without-texmf-dir --with-lispdir\=.

checking for make... make
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for date with git... 2023-07-21
checking for release with git... git not found, checking for release in ChangeLog:
13.2
checking for date with git... 2023-07-21
checking for release with git... git not found, checking for release in ChangeLog:
13.2
checking for emacs... /usr/local/bin/emacs
checking for Emacs prefix... "/usr/local"
checking if Emacs is recent enough... yes
checking if build directory is valid... yes
checking where lisp files go... .
checking what file to use for auctex startup... ./auctex.el
checking what file to use for preview startup... ./preview-latex.el
checking where the package lisp files go... ./auctex
checking where the data files go... ./auctex
checking where the info files go... ${datarootdir}/info
checking where automatically generated global style hooks go... ${localstatedir}/auctex
checking for tex... /usr/local/texlive/2023/bin/x86_64-linux/tex
checking for pdftex... /usr/local/texlive/2023/bin/x86_64-linux/pdftex
checking for dvips... /usr/local/texlive/2023/bin/x86_64-linux/dvips
checking for gs... gs
checking for latex... /usr/local/texlive/2023/bin/x86_64-linux/latex
checking for pdflatex... /usr/local/texlive/2023/bin/x86_64-linux/pdflatex
checking for tex... (cached) /usr/local/texlive/2023/bin/x86_64-linux/tex
Preview will be placed in ./auctex/latex
Preview docs will be placed in ./auctex/doc
checking for glaring installation conflicts... probably none
checking for perl... /usr/bin/perl
checking for makeinfo... /usr/bin/makeinfo
checking for texi2html... :
checking for texi2dvi... /usr/bin/texi2dvi
checking for texi2pdf... /usr/bin/texi2pdf
checking for install-info... /usr/bin/install-info
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tex-site.el.out
config.status: creating doc/Makefile
config.status: creating auctex.el
config.status: error: cannot find input file: `preview.el.in'

[Return code: 1]

My auctex configuration is...

(use-package auctex
:no-require t
:mode ("\\.tex\\'" . LaTeX-mode)
:init
(setq TeX-parse-self t ; parse on load
reftex-plug-into-AUCTeX t
TeX-auto-save t ; parse on save
TeX-source-correlate-mode t
TeX-source-correlate-method 'synctex
TeX-source-correlate-start-server nil
TeX-save-query nil))

(use-package latex
:straight auctex
:config
(add-hook 'TeX-mode-hook #'reftex-mode)
(add-hook 'LaTeX-mode-hook 'prettify-symbols-mode)
(add-hook 'LaTeX-mode-hook (lambda ()
(TeX-fold-mode 1)))
;; (add-hook 'org-mode-hook 'prettify-symbols-mode)
(setq prettify-symbols-unprettify-at-point 'right-edge))

(use-package auctex-latexmk
:after latex

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

/r/emacs

What to use for "Context Management"?

I'll try to explain what i'm looking for: Let's say i'm working on a work project, on my emacs configuration and my org notes. All of those i'll use throughout the day but don't do simultaneosly. I'm trying to set it up so i can save the current state for buffers and open project for work, switch to my org notes, do something there, and switch back with all buffers in place and files open where they where.

Things like desktop-save-mode seem to handle restoring the last buffers, but aren't working for multiple sessions. So what's my best bet to have multiple separated "setups" depending on what i'm working on at the moment?

https://redd.it/1815kzm
@r_emacs

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

/r/emacs

load-path setting doesn't work

To manage packages conveniently, I set new load-path by (add-to-list 'load-path "c:/emacs/.emacs.d/lisp")

After that I checked load-path lists through C-h v load-path, which confirms "c:/emacs/.emacs.d/lisp" had been added into load-path lists successfully. Then I run (use-pakage xxx) inside my custom init.el, but a warning occurred said

> Error (use-package): Cannot load xxx

I rechecked load-path lists and move packages to another one directory mentioned in load-path lists, which is loacted in Emacs installtion directory named site-lisp. THEN (use-pakage xxx) returned to normal and didn't rose a warning.

It's so weird, and I just want to set a custom packages load-path. Does anyone know what goes wrong?

https://redd.it/1813q23
@r_emacs

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

/r/emacs

Why does pop-to-buffer break save-excursion?

When debugging some code, I learned that if you call pop-to-buffer and pop-to-buffer-same-window inside save-excursion or save-current-buffer, the original buffer will not be restored at the end of the save-. You can get around this by using save-window-excursion; however, I still feel like save-excursion ought to work. Does anyone know why it doesn't?

(You can check this by eval-ing the following in any buffer other than *Messages*: (save-excursion (pop-to-buffer-same-window "*Messages*")).

https://redd.it/180wjhl
@r_emacs

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

/r/emacs

I tried neovim and helix, and finally vim-likes are becoming more emacs-like

I have been a user of emacs for more than a decade. I am not a pro, but my config has swollen little by little. What really got me into emacs was the interaction with the python repl. It was amazing. Only Jupyter notebooks did something similar for me. Lately I have been using VScode, as the notebook experience for data science is very good and emacs cannot really compete here as notebooks are web based since the beggining, and vscode is an electron app. Packages like ein was just an ok replacement. Also I have been using logseq instead of org-mode, as the android app is very good and allow me to add stuff from the camera and using the pen with the whiteboard. I am mainly using org-mode to define large project files and leaving logseq for note taking.


The later but the hype with neovim and in much smaller scale with helix got me interest, as I have been using less emacs lately. So I decided to try them. And for the first time I feel I was in the presence of real competitors. Emacs has always been about text editing + poweful ide like tools added using plugins made by the community using a scripting language, in emacs case elisp. I liked VSCode despite the bloat because it was similar in spirit, a editor that can customize and make tools for using a scripting language, javascript. I never like vi/vim. Modal typing is nice for using command without modifier keys. But you could only use those commands on vi /vim, so I did not see the point in learning a typing system for some type saving. I always laugh with the emacs pinky meme, when in practice most vim users used screen and tmux and use ctrl all the time. And alt+tab for geeting to the browser. Plugins were not really enough for my coding and they were awful in comparison with the emacs ecosystem. And you can get evil mode in emacs. But neovim is a different beast. The change from the old vimscript to Lua and how the community embraced the change turn it into an editor very close to emacs. I installed the lazyvim distro, and my experience was very similar to doom emacs. Actually I found a bit better to update all the packages installed by default. And the interaction python was also closer to emacs thanks to iron.nvim. I could installed in a remote machine that I have issue installing a new version of emacs due to lack of permissions. So very nice experience.


Helix is a monolitic editor that comes with "battery include", and it doesn't have a plugin system yet (although the devs might add a scheme like scripting in the future). But the editor is much more feature complete than neovim without plugins. It lacks a repl interaction, so I cannot really use but it looks nice and might have a interesting future.

My conclusion is that editors of all kinds are becoming more and more like emacs, a core with a plugin system. Emacs is a very tiny core and the rest is elisp so you can change everything, but most people never get close to try to do that. Neovim+Lua is a good example that a you don't need so much flexibilty and you don't even need a powerful scripting language. Lua point is to be simple enough without losing too much power. Vscode+JS is a similar story. We are witnessing carcinisation for editors.

https://redd.it/180u8vn
@r_emacs

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

/r/emacs

Learning Elisp episode 14 - a minor mode

Today Emacs Elisp post and video - episode 14 - turning the emoji replacement code into a minor mode:

https://cestlaz.github.io/post/learning-elisp-14/

https://redd.it/180q75t
@r_emacs

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

/r/emacs

Mouse-Free Magic: Copy Text from Browser Pages Effortlessly
https://youtu.be/OX7askIEgQ4

https://redd.it/1805l7h
@r_emacs

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

/r/emacs

How to only install nerd fonts, when needed

In my config, I have the followings line:

(nerd-icons-install-fonts)

How do I prevent this from happening multiple times? I just need it, when it is not installed.

https://redd.it/18260ga
@r_emacs

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

/r/emacs

Does anyone run Emacs with wsl2? I've noticed that fonts are quite a bit less crisp than they could be. On the left is running Emacs on a native terminal, on the right is the gui application.
https://redd.it/182163u
@r_emacs

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

/r/emacs

One-click Social Media Client - Youtube

​

https://preview.redd.it/828mu76ir22c1.png?width=1664&format=png&auto=webp&s=a138cdd3f34c371d5166b47abd717943d86ca3bc

Youtube frontend using xwidget and mpv.

https://lifeofpenguin.blogspot.com/2022/10/one-click-social-media-client.html

https://redd.it/181yenw
@r_emacs

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

/r/emacs

I made some updates to Keypression and Command Log
https://youtu.be/YQGP7zMHlPs

https://redd.it/181qf4g
@r_emacs

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

/r/emacs

How rewarding learning Elisp can be?

I'm a new emacs user and I've been using doom emacs for a while now and i'm willing to learn Elisp, but found out that it might not be as easy as it might seem at first, because as i found out, lisp is quite different from other programming languages that i'm used to, especially knowing that i'm not a programmer by any means and my programming knowledge is very little, not mentioning that elisp is pretty old so the learning resources might not be as much as other more popular programming languages

so my question is, Is it worth it?

like what is the level of mastery do i need to achieve to start implementing custom elisp in my configs to enhance my emacs experience?

and how exactly can i improve my emacs experience if i learned elisp?

in other words, how rewarding it would be

https://redd.it/181k3of
@r_emacs

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

/r/emacs

Emacs slow to open file if autosave exists

As in topic, emacs normally open files in instant, but when autosave (#filename#) exists, it takes about 1 sec to open file.

Any idea how to fix this without disabling autosaves? It doesn't seem to be config problem since same happens with -Q flag.

https://redd.it/181i0go
@r_emacs

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

/r/emacs

Metanote: Fully supports Org mode custom agenda view now!

From the launch of the first version of Metanote on iOS to now, it's been almost three months, and after several iterations, there have been significant improvements. I believe it's essential to update everyone on the progress of Metanote.

So far, Metanote has comprehensively supported the customization options for Org mode's Agenda view, including settings for tags, properties, subtasks, and most of the major InBufferSettings. I won't list them all here, but you can find detailed documentation.

1. InBufferSettings
2. Agenda views
3. A Simple and Effective GTD Workflow

This weekend (November 24-27), I hosted a promotional event. If Metanote has brought convenience and value to your life and work, this might be a good time to get it.

Upcoming Features:

1. Custom Capture
2. Visibility Cycling and Rich Text
3. Roam Research and Backlinks

Thank you all.

​

https://preview.redd.it/jq3rdm7otw1c1.png?width=1290&format=png&auto=webp&s=547fae403c96e182000791d9e839c9ea0b62e2f8

​

https://preview.redd.it/dxrfkiurtw1c1.png?width=1290&format=png&auto=webp&s=8e16d0f1fa8593731495ae8cd5cff9f1a9d3bd05

​

https://preview.redd.it/1hv6l4zttw1c1.png?width=1290&format=png&auto=webp&s=649fb84d18f29b6d17b37d3a1157bbb6f1b67f0a

​

https://redd.it/181ah5j
@r_emacs

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

/r/emacs

:init
(setq auctex-latexmk-inherit-TeX-PDF-mode t)
:config
(auctex-latexmk-setup))

Additionally, if I try to thaw my packages, I get the message `Repository "melpa" has a dirty worktree` which I don't know what to do about. Any help in resolving these issues is appreciated. Thanks.

https://redd.it/18154ul
@r_emacs

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

/r/emacs

Overcolorization ("Everything is purple")
https://andreyor.st/posts/2023-11-17-overcolorization/

https://redd.it/18152qo
@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/18149ql
@r_emacs

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

/r/emacs

Vertico Configuration And Directories With A '.git' Suffix

hi all,

i have a pretty vanilla vertico configuration

(use-package vertico
:ensure t
:config
(vertico-mode))

in a directory, i have sub-directories organized like so:

.
|-- dot-emacs.git
|-- doomemacs
`-- vanilla.config

now, a C-x C-f in the above directory does **not** display the 'dot-emacs.git' directory at all.

how do i fix it ?

--
thank you !

https://redd.it/180zqy2
@r_emacs

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

/r/emacs

Is there some kind of completing-read-multiple command that allows enables selecting without filtering like the Ctrl-Space used in helm-mini?

Helm-mini enables acting on the file list by using Ctrl-Space to pick those required, though I don't know if that is the only action to be done on the selection.

Is that behaviour unique to helm's completing read implementation, or do other such functions exist?

I need to create an SQL command from a selection from a long list of databases and need something that can pick them individually with highlighting, so once I press Enter, the selection is passed to a function.

The default completing-read-multiple of typing a match and adding a comma is not suitable for this.

https://redd.it/180wp2q
@r_emacs

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

/r/emacs

eMacs, docker, and Python packages

Have been using emacs for a while now with doom and have a question to the community:

When you have a project inside of docker with packages instead by pip, how to you have your eMacs and LSP resolve the import statements?

I have heard of TRAMP but this seems like a solution for jacking into a docker container that is running to just modify files.

Thanks,
Aaron

https://redd.it/180soj4
@r_emacs

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

/r/emacs

How can I make embark-act respect the selected file's own directory instead of the default-directory?

I added an embark config from: https://karthinks.com/software/fifteen-ways-to-use-embark/#open-any-buffer-by-splitting-any-window, which works really good, the only problem is that if a file is opened with project-find-file-in, it doesn't respect its own directory.

Steps:
1. When the default-directory is ~/, M-x browse-emacs-config to open a file list of ~/.config/emacs in the minibuffer
2. embark-act on a file lisp/init-lib.el
3. o and b to open the selected file horizontally
4. A buffer opened on the right side, but the directory is still using the default-directory in step 1 instead of the buffer's directory, causing the buffer to visit "~/lisp/init-lib.el" instead of ~/.config/emacs/lisp/init-lib.el.

Config:

(defun find-file-in-project (&optional dir)
(interactive)
(let ((project (project-current nil dir)))
(project-find-file-in nil nil project)))

(defun browse-emacs-config ()
(interactive)
(find-file-in-project "~/.config/emacs"))

(eval-when-compile
(defmacro my/embark-aw-action (fn)
`(defun ,(intern (concat "my/embark-aw-" (symbol-name fn))) ()
,(format "Open %s buffer selected with ace-window" (symbol-name fn))
(interactive)
(with-demoted-errors "%s"
(require 'ace-window)
(let ((aw-dispatch-always t))
(aw-switch-to-window (aw-select nil))
(call-interactively (symbol-function ',fn)))))))

(define-key embark-file-map (kbd "o") (my/embark-aw-action find-file))


https://redd.it/18083k1
@r_emacs

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

/r/emacs

How can I become a more "proficient" Emacs user? Esp. in regards to developing

I hope my question makes sense.

I am using **Doom Emacs** for a while now and have become fairly proficient. But I feel like whenever I am browsing emacs content online there are still many topics for me to discover. So I was wondering if there is anything that I might be "missing" yet which might help with my productivity or improve my development skills.

Sofar I what have learned, on top from my head:

* Org/Org Agenda (refile etc.)
* Magit
* Vterm
* LSP Commands
* Multiple Cursors
* Literal Config
* Navigating Emacs itself (which key, debugging, reading Emacs-Lisp (abit))
* Using Language specific commands, i.e. send buffer to repl
* Using Undo with Vundo

Only thing I know that I still need to learn is beeing more proficient with vim keybindings, but with that I know where to start.

I know the question is quite broad, but maybe there some "killer features" worth to explore which I am not aware of yet.

I'd appreciate any input.

https://redd.it/1802hag
@r_emacs

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