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

Alternative to org-info.js

I have a file I depend on daily for a reference that is getting quite long. I export it as an html file with org-info.js. Because of how og-info.js works, it is loading slowly and flashes as the js waits and tries to determine how long the file is and all its headers (I think this is how it works).

I was just reading about css :has() property and thought, why can't that be used in loading up an exported html file?

What I want as an end result is a Table of Contents, and then clicking on each link, displays the section under that org heading with links to sub-headings.

I think the closest alternative is the ReadTheOrg theme, but I would like it without a sidebar.

Anyone know any alternatives or js free versions?

If not, any guidance on how I would approach this situation with my own css and if needed only minimal js?

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

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

/r/emacs

Can you take control of the Left Win key when using GNU Emacs through WSL2/WSLg

Was looking for a solution for emacs pinky when I stumbled upon the `win32-` variables for taking control of the Left Win key in Windows. Then I realized it doesn't apply to Emacs in WSLg because I think WSL already interprets the LWin key before passing it to Emacs? Does anyone have a solution for it?

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

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

/r/emacs

Debugging Emacs 29.3 hangs in X11

I'm not 100%, but I believe after updating to Emacs 29.3 on Arch Linux, X11 instances and clients will only work for a few minutes until they freeze. After that, any attempts to create a new frame will result in frozen frames; I just see the "When done with this frame..." message in the minibuffer, and otherwise have no keyboard input. The same thing happens with emacs -Q.

If I open a client or instance in the terminal, however, everything works fine. With clients, I've tried looking at messages, but I don't see anything out of the ordinary. Is there anything I can do to try to pinpoint the issue?

I am using fcitx5, if that has any potential consequences.

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

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

/r/emacs

Why does org-mode insert commas at the start of some lines when I add new lines, ie press the Enter key?

Whenever I press Enter to insert a new line org inserts comma before the asterisks making it look like the following After block.

Before:

#+beginsrc conf :tangle ~/.config/excludes.conf

*text
withasterisk
*some
fileextension

#+end
src

After:

#+beginsrc conf :tangle ~/.config/excludes.conf

,*text
withasterisk
,*some
fileextension

#+end
src

When I use C c ' to edit the block in its own buffer or tangle it out to a file the commas are removed.

What is the purpose of this?

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

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

/r/emacs

Anyone else having crashes when using xwidgits under pgtk (Emacs 29)?

I have tried emacs 29 on fedora and on nixos (pgtk) but M-x xwidgits-webkit-browse-url reliably crashes emacs.
Anyone having the same experience?
Is pgtk the cause of this?

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

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

/r/emacs

Calc cheat sheet

Hey folks, graphics/game/system programmer and a long-time Emacs user here. I happily use the RPN Calc at least 10 times a day. I thought I'll create a simple cheat sheet for my own reference for my often-used functions, thought it'll be useful to the community too. Here you go

https://legends2k.github.io/note/emacs_calc/

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

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

/r/emacs

How to have timestamp (hour:minute) as prefix to a recurring task started before but recurring today in an agenda view for today?

I have the following sample agenda items:

* Future
** A meeting non-recurring :meeting:
SCHEDULED: <2024-03-30 Sat 11:00>
** Meeting recurring starting today :meeting:
SCHEDULED: <2024-03-30 Sat 09:00+1d>
** Meeting recurring started before :meeting:
SCHEDULED: <2024-03-27 Sat 18:00+1d>


The resulted agenda view for today is as follows:

Today's agenda

Saturday 30 March 2024
8:00...... ----------------
8:10...... now - - - - - - - - - - - - - - - - - - - - - - - - -
9:00...... Scheduled: Meeting recurring starting today :meeting:
10:00...... ----------------
11:00...... Scheduled: A meeting non-recurring :meeting:
12:00...... ----------------
14:00...... ----------------
16:00...... ----------------
18:00...... ----------------
20:00...... ----------------
Sched. 3x: Meeting recurring started before :meeting:

Note, the same configuration, "Meeting recurring started before" does not have the expected timestamp shown.

Here is my settings related:

(setq org-agenda-prefix-format
'((agenda . " %?-12t% s")
(todo . "%?-12t")
(tags . "%?-12t")
(search . "%?-12t")))
(agenda "" ((org-agenda-start-day "+0d") ; start from today
(org-agenda-span 'day)
(org-deadline-warning-days 0)
(org-agenda-block-separator nil)
(org-agenda-overriding-header "\nToday's agenda\n")
))

&#x200B;

&#x200B;

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

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

/r/emacs

Kernel keyring access

I'm trying to store session credentials with timeouts through the Kernel keyring, AFAICT timeouts are not supported by the Secret Service API. Is there a way to access the Kernel keyring from emacs?

I don't see that it has a backend on `auth-sources`, and the closest thing I found is integrating keyctl in: https://github.com/jpathy/emacs-keyctl

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

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

/r/emacs

Why use Emacs

The title is mostly ironic. If you have reasons please share though.

Emacs seems to have a marketing problem.

Its almost everyday that I see videos that talk about using Vim and its derivatives and it's generally positive.

On the otherhand when I look on YouTube "why use Emacs", the search indexes plenty of videos saying why you shouldn't.

Maybe this just says something about the recommendation engine's belief about what I'll watch is, but that's why I'm making this thread.

I'm a newb so I'm still learning a lot and that's really the main drive for me. I can't remember what made me invest into Emacs, but I think it had to do with Vim changing conventions every couple years while Emacs seems stable and centralized to its ways.

What's your experience?

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

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

/r/emacs

Coming back to Emacs after a year or so, loving it

I was a heavy user of Emacs + org-mode. I really love(d) org-roam, had thousands of notes in it, would navigate them in a second, create powerful org-documents. But I felt the pain of not having access to my files on the go (both task management and notes). That's when I heavy heartedly switched to Obsidian for note taking and OmniFocus for task and project management.

So I took the plunge and invsted a good amount of time into migrating my org-mode files into markdown files, and migrate them into my vault in Obsidian.

As I missed a good editor in Obsidian for long documents, I asked myself recently why not edit my markdown files in Emacs. After all Obsidian stores all files in markdown format in a folder that's accessbile to any program.

I realized that the tools I used previously in Emacs would be useful for editing / finding / navigating my thousands of markdown files in my Obsidian vault as well. I use counsel-fzf to fuzzy find all my files in a folder and subfolders in a split second, I use counsel-rg (ripgrep) to find any conntent or heading in my markdown files in a second! And I hated the search / navigation in Obsidian anyways.

So I modifed my scripts to search / find in my Obsidian vault, and what can I say: I have created a wonderful combination of Emacs + Obsidian now, and I am loving it.

I even created even my little script for creating journal entries in my obsidian fault:

https://gist.github.com/pragmat1c1/094dd8d4a8dc47307e871025bc0638d2

# Emacs, org-mode, markdown

Although I love org-mode, I must admit it's hard to integrate into other tooling and worflows. Yes, we can export to other formats, but we cannot edit in those other formats, plus some info is always lost while exporting, and it's not a birectional sync, just an export.

So I come to the conclusion that sticking to org-mode even made me abandon Emacs! But when I realized that Emacs =!= org-mode, I could come back to Emacs and use it again! And I'm loving it.

In short: org-mode is both a blessing and a curse for Emacs!



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

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

/r/emacs

terminal colors

Hi,

this is something that is not a problem for me, but I would like to understand what is happening as this is very strange...

When I run graphical emacs on Linux and do a describe-face on an org-mode TODO-item I can see that the color (ie the foreground-color of the string "TODO") is configured to be "Red1". This seems to be the default, I did not customize it.

When I do the same thing in a terminal emacs (same config-file) with TERM=xterm-256color I get the same, however if I run a terminal emacs with TERM=tmux-256color this foreground color suddenly changes to "Pink".

So how does changing the value of the TERM environment variable change the color-name?

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

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

/r/emacs

CUA in Org

Hi,

CUA works perfectly, but in ORG mode, in spite of

(setq org-support-shift-select 'always)

being set, shift plus arrow keys do not work as they should in CUA mode.

Are there any special tricks?
How can I make it work?

Any help highly appreciated!

Marc

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

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

/r/emacs

Org Tables - From Zero to Hero
https://youtu.be/g43XNwKY1YA

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

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

/r/emacs

Update: MSI Installer for GNU Emacs 29.3 for Windows
https://chaoticlab.io/posts/emacs-29-3-msi/

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

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

/r/emacs

Using copilot.el is to cause of many times calling to garbage-collectoin

You guys also?

I'm using copilot system when I develop C++


And so, I'm using copilot.el mode
(https://github.com/copilot-emacs/copilot.el)

But, I think that it's to cause that to occur many times of garbage-collection

When I only used eglot-mode, Garbage collections were not occured many times.

Of course, I have set a big-value to gc-cons-threshold in my eglot settings.

(use-package eglot
:ensure t
:bind
(:map eglot-mode-map
("<tab>" . jo/company-complete-common)
)
:config
(require 'eglot)
(setq eglot-send-changes-idle-time 0.1)
(setq gc-cons-threshold ( 50 1024 1024))
(setq garbage-collection-messages t)
(setq original-gc-cons-threshold gc-cons-threshold)
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold original-gc-cons-threshold)))
)

(use-package copilot
:quelpa (copilot :fetcher github
:repo "copilot-emacs/copilot.el"
:branch "main"
:files ("dist" "
.el"))
:config
(add-hook 'prog-mode-hook 'copilot-mode)
(setq copilot-indent-offset-warning-disable t)
(setq copilot-max-char 500000)
)


I don't know What is the cause of the symptom exactly.

I think It must be copilot.el Because

When I enabled copilot.el, It occurred many times


&#x200B;

&#x200B;

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

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

/r/emacs

ESS rdired-like object browser for local objects?

I'm coming from Rstudio and am trying to give ESS/R/Emacs a shot. One thing I can't find is an object browser that shows the current, local variables. I can see globals using ESS-rdired. But when I step through a debug browser(), I would like rdired to update to show only the local variables. I can inspect them via the console but the immediate overview is an RStudio advantage for me. Am I missing something? How do you R experts on Emacs deal with it?

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

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

/r/emacs

function/s automating write current file {modes, localvars} to current file?

<note in advance>
I know about M-x copy-file-locals-to-dir-locals. What I want is something that

- writes to the currently-open file, not to .dir-locals.el
- writes in the syntax appropriate to either/both {header, 1st nonblank line}* or local variables list, rather than as an Elisp alist (as copy-file-locals-to-dir-locals does)

Apologies in advance if this is already wellknown: I did a hopefully-due-diligence websearch (this is not a LMGTFU), but perhaps missed something due to incompetence.
</note in advance>

current usecase:

I'm writing a (text) file:

cur1. I set/clear various file {modes, local variables, etc}.

cur2. I save the file ... and then I realize I forgot something, so I reopen the file.

cur3. ... and I hafta re-{set, clear} all the same @#$%;&! file-local cruft that I forgot to persist in my initial write :-(

desired usecase:

What I want is code (most preferably already Emacs-included, next-best packages, and I will add enabling Elisp to init.el if needed) that will allow me to improve the above usecase as follows:

new2. Sometime before exiting the file, I call {keychord, M-x}-whatever which calls Wunderfunktion which

- writes the current file {modes, local variables, etc} to the file
- preferably writes the file's {header, 1st nonblank line}, alternatively the local variables list (or both as needed).
- prefixes with mode-appropriate comment character/string

E.g., call Wunderfunktion -> file gets either new {header, 1st nonblank line} à la

# -- mode: org; truncate-lines: nil; org-image-actual-width: nil; eval: (font-lock-mode -1); eval: (company-mode -1); org-return-follows-link: t; org-export-with-sub-superscripts: nil; eval: (undo-tree-mode -1) --

boolean-or (if necessary) localvar footer à la

/ Local Variables: /
/ mode: c /
/ fill-column: 80 /
/ eval: (eldoc-mode) /
/ eval: (undo-tree-mode -1) /
/ End: /

new3. I later reopen the file with automagic goodness :-)

----

* BTW, is there an Emacsworld standard {jargon, term of art} for Emacsy 1st-nonblank line in a file, in the way that 'local variables list' is the standard term for Emacsy footers?

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

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

/r/emacs

Release v0.7 · activities.el
https://github.com/alphapapa/activities.el/releases/tag/v0.7

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

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

/r/emacs

How do u all work with multiple projects in one emacs session?

I would like something like vscode workspaces or pycharm when u add multiple projects to the same session.

The 2 most important features I am missing is
I'd like to search for files from all 10 projects I have (they are somehow interconnected)
I'd like to search and replace/ grep in all projects.

Whenever im in a specific file I should get all the configurations of the specific project

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

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

/r/emacs

OK so... I think an update broke Emacs

Emacs noob btw. I have artix (with openRC) and recently updated my system. Now emacs just doesn't render or renders "garbage". In bspwm, plasma(X11) and plasma(Wayland) it just renders glitches, in dwm just a plain black screen. My primary card is the one that comes with intel, I also have an nvidia and I double checked but if you think that's the problem give me a command and I'll give you the output. Ty in advance.

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

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

/r/emacs

Help with lsp-java

I'm new to using lsp, just set it up this afternoon based on https://www.youtube.com/watch?v=Yah69AfYP34.

I opened a file in my project and was prompted to import the project root, that worked great (that's fll-sw/working-dir below). My project is built using gradlew.

I then started a new git worktree in issues/1168... and opened a file in there. I got errors about all kinds of missing imports. When I run lsp-describe-session I get the output below. The file "Playoff.java" has been opened from issues/1168, the other files are opened from fll-sw/working-dir. I see that the jdtls process id is the same for both directories and that seems odd to me given that they are different projects.

Can someone point me to documentation on what I'm not doing correctly here?

- /home/jpschewe/projects/fll-sw/issues/1168.head-head-table-assignment/working-dir
-[-] jdtls:68475
|-[-] Buffers
| |-[+] Playoff.java
| |-[+] Version.java
| |-[+] ScoresheetGenerator.java
|
-+ Queries.java
-[+] Capabilities
[-] /home/jpschewe/projects/fll-sw/working-dir
-- jdtls:68475
|-- Buffers
| |-+ Playoff.java
| |-+ Version.java
| |-+ ScoresheetGenerator.java
| -[+] Queries.java
-+ Capabilities

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

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

/r/emacs

Neil Stephenson on Emacs
https://www.youtube.com/watch?v=RC5yGM8fk8g

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

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

/r/emacs

SysML in emacs

I'm wondering if anyone knows of an emacs package to support SysML?

I use plantUML with org mode, and get great drawings (and terrible indenting) but its not really the same thing.

Trying to stay as text-based as possible, with the ability to render docs and drawings.

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

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

/r/emacs

What's the easiest way to get C-click to spawn a new cursor?

I understand that this question might have been asked multiple times in the past, but is there an easy way to implement this? How can one use multiple cursors in Emacs?

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

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

/r/emacs

Should org-roam-ui be used on public networks?

I opened org-roam-ui mode at school to try it out, which made me wonder how safe it is to launch its web server on public networks. Could someone else on the network see and delete my nodes?

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

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

/r/emacs

Anyone knows how to let consult preview work with embark-collect?

For example, when calling consult-recent-file, if I use embark-act to call embark-collect, the resulting buffer cannot preview files. I also try to use embark-act to call embark-live, in this way, preview works well, but the minibuffer coexists with the embark live buffer. My question is can I make the live preview work, while avoiding the two buffers issue in embark-live?

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

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

/r/emacs

CUA in Org

Hi,

CUA works perfectly, but in ORG mode, in spite of

(setq org-support-shift-select 'always)

being set, shift plus arrow keys do not work as they should in CUA mode.

Are there any special tricks?
How can I make it work?

Any help highly appreciated!

Marc

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

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

/r/emacs

How can I disable this pulsing effect when xref-find-definitions jumps to a definition?
https://redd.it/1bqrcgn
@r_emacs

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

/r/emacs

Blog My Org+Pandoc Workflow

https://ismailefe.org/blog/my\_org\_pandoc\_workflow/

Wrote about how I use pandoc to transform my org documents to beautiful looking word documents and websites!

Would love to get some suggestions.

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

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

/r/emacs

Did anyone manage to setup markdown-ts-mode?

Hello there!

I am trying to setup markdown mode ts using only the default Emacs with treesit (not installing the markdown-mode package).

Is it possible? I've been trying like this.

(use-package markdown-ts-mode
:ensure nil
:mode ("\\.md\\'" . markdown-ts-mode)
:defer 't
:custom
(markdown-indent-level 2)
:config
(treesit-parser-create 'markdown)
(add-to-list 'treesit-language-source-alist '(markdown "https://github.com/ikatyang/tree-sitter-markdown" "master" "src")))


But when I open a .md file I get:
File mode specification error: (file-missing Cannot open load file No such file or directory markdown-ts-mode)


I am not sure how to accomplish this manual configuration regarding a non pre-existent mode to "remap" into "-ts-mode".

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

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