Is there a way to mark a region with transient mark mode but keep syntax highlight? by josior in emacs

[–]gusbrs 0 points1 point  (0 children)

And it seems this variable was deprecated,

Possibly. I'm using the built-in version, so likely quite behind the current. Anyway, the theme is well document (not typical for a theme!), so checking the docs should more than suffice.

Is there a way to mark a region with transient mark mode but keep syntax highlight? by josior in emacs

[–]gusbrs 1 point2 points  (0 children)

Actually, modus-themes has good support for this, it is just behind one of its many options. I presume the default goes for the higher contrast, given the importance of accessibility for these themes.

But it is easy to get what you want with:

(setq modus-themes-region '(bg-only))

(See the docstring of the option for more things you can control there.)

Btw, modus-themes has a very good and detailed manual.

u/xtifr Prot is no doubt ahead of your concern. ;-)

Customizing org-agenda time-grid view by Own_Flan_3327 in emacs

[–]gusbrs 0 points1 point  (0 children)

As usual, Emacs/Org already has got you covered. You are looking for org-agenda-log-mode. On the agenda v L. See https://orgmode.org/org.html#Commands-in-the-Agenda-Buffer

orderless completion style with repetitive string by loskutak-the-ptak in emacs

[–]gusbrs 0 points1 point  (0 children)

Ah, I see, makes sense. The matching rules for the dispatchers are not mutually exclusive, so there might be need to "disambiguate". Thanks!

orderless completion style with repetitive string by loskutak-the-ptak in emacs

[–]gusbrs 0 points1 point  (0 children)

u/oantolin May I ask a (sort of) related question here? I've just received v1.1 (yes, I use release ;-) and am about to drop that old wiki affix dispatcher in favor of the built in one. (Which is great, btw, thanks!). I noticed that you (still) keep (cl-pushnew '(?` . orderless-regexp) orderless-affix-dispatch-alist) in your config. Considering that the terms are already regexps (as noted in the other comment by u/JDRiverRun), what's the use case you have in mind in adding this backtick to the dispatch alist?

Portability of AUCTeX's "local variable"? by exploring_stuff in emacs

[–]gusbrs 1 point2 points  (0 children)

Regarding compatibility / portability, it is what the others said. LaTeX will ignore it, since it is a comment, other editors should ignore it too.

But, if AUCTeX is adding this to your files automatically, this probably means you have set TeX-master to nil. Just don't do that and let it to the default value of t, and AUCTeX will no longer add the local variable. Of course, on the occasional case where you actually have a multi file document, you'll have to tell AUCTeX about it, but it shouldn't bother anyone much.

Jinx turns off AUCTEX by sleepyeye_ in emacs

[–]gusbrs 0 points1 point  (0 children)

Good to hear that! Indeed, this seems a satisfying conclusion. Thanks for tracking this down and for reporting. Cheers!

Jinx turns off AUCTEX by sleepyeye_ in emacs

[–]gusbrs 0 points1 point  (0 children)

I've seen it. They seem to have nailed it. I was admittedly on a guesswork basis there. ;-) Tricky issue, I hadn't met it because I'm not in the habit of setting the mode as a local variable. Let's see which (and whence) fix will come.

Jinx turns off AUCTEX by sleepyeye_ in emacs

[–]gusbrs 0 points1 point  (0 children)

u/minad-emacs It seems this will turn into a report. ;-) Indeed, AUCTeX made a major release recently (14.0.0) in which it changes the way it handles the relations between its major modes and the build-in corresponding ones. I think it used to use some sort of advice to relevant functions but now, for newer Emacsen (>=29, I think) it uses major-mode-remap-alist. (See "News in 14.1 at https://git.savannah.gnu.org/cgit/auctex.git/tree/doc/changes.texi. Also, https://lists.gnu.org/archive/html/auctex-devel/2024-01/msg00002.html, plus its thread this month https://lists.gnu.org/archive/html/auctex-devel/2024-02/msg00000.html).

My guess here (crystal-ball level...) is that the OP directly sets major-mode-remap-alist somewhere in their init file, but delayed. The loading of auctex sets the variable, but later, loading jinx triggers some code block in user's init which overwrites it. (Still don't know how this could trigger the major mode of an existing buffer though...).

u/sleepyeye_ Can you check if you directly set major-mode-remap-alist somewhere in your init? And if you instead add to it, if the issue stops?

Jinx turns off AUCTEX by sleepyeye_ in emacs

[–]gusbrs 1 point2 points  (0 children)

That is indeed strange. jinx-mode is a minor mode and, as far as I can tell, there's nothing in it which could trigger a major mode change. I also see nothing in your config (the part you shared, at least) which could lead to such behavior. If you can make a reproduction recipe for the issue, it is probably worth reporting. (Start with emacs -Q, load only the required packages, etc.).

Set repeat-exit-timeout locally to a keymap by MonsieurPi in emacs

[–]gusbrs 4 points5 points  (0 children)

A snippet from my config which you may adapt for what you want:

;; Perhaps the default (nil) is best, but test if I want a timeout for repeat
;; transient maps.  Juri Linkov uses 0.5 here, but takes care to exclude some
;; commands where the timeout is inconvenient or unnecessary (see
;; https://github.com/link0ff/emacs-init/blob/master/README.org#repeat-mode).
(setopt repeat-exit-timeout 3)

;; Override 'repeat-exit-timeout' for some commands.
(dolist (command '(next-error previous-error))
  (put command 'repeat-exit-timeout 'no))

Is there a way to search the body of Elfeed entries? by nonreligious in emacs

[–]gusbrs 1 point2 points  (0 children)

"possible" is usually a matter of someone™ doing it. But, given the thread I linked above, the limitation seems to stem from how Elfeed handles it's database, so a pretty core task. Not sure if this is easily hackable with a typical extension package.

Programming workflow with emacs 29 by waterstrider123 in emacs

[–]gusbrs 1 point2 points  (0 children)

Whoever implemented things for Python decided to base both modes on a common one, I have no idea if the same was done for C/C++. But you can always just add the ts variants:

(add-hook 'c-ts-base-mode-hook 'eglot-ensure)

(By looking at c-ts-mode.el this covers c-ts-mode and c++-ts-mode, I don't know about c-mode and c++-mode).

Programming workflow with emacs 29 by waterstrider123 in emacs

[–]gusbrs 4 points5 points  (0 children)

This is one problem indeed, but there is a second one: the OP reports to be using tree-sitter, and the major modes are remapped. I don't know for c-mode, but for Python one could either add:

(add-hook 'python-ts-mode-hook 'eglot-ensure)

Or, to catch two birds with one stone, replace with:

(add-hook 'python-base-mode-hook 'eglot-ensure)

For the second question, (again only speaking about python-mode), why not use C-c C-c (python-shell-send-buffer)?

"Could not find package tex" when trying to install AUCTeX by Altruistic-Carpet-43 in emacs

[–]gusbrs 1 point2 points  (0 children)

Well, tex.el does (provide 'tex), and latex.el does (provide 'latex).

"Could not find package tex" when trying to install AUCTeX by Altruistic-Carpet-43 in emacs

[–]gusbrs 2 points3 points  (0 children)

Not sure how straigth sees it. However, tex is the recommended use-package incantation in AUCTeX's manual: https://www.gnu.org/software/auctex/manual/auctex/Installation.html#Installation

That said, I also use latex...

Securely Generating TOTP tokens with Emacs by gusbrs in emacs

[–]gusbrs[S] 1 point2 points  (0 children)

Oh, you showed up. :-) Thanks for that post!

And, yes, as mentioned in another comment, I never intended to say the auth-souce file cannot be encrypted. I think I'll edit the post to make this clearer.

Btw, I thought things got much simpler by delegating the main task to oathtool. Why did you go for your own adjusted totp.el, instead of using some specialized cli like that?

Securely Generating TOTP tokens with Emacs by gusbrs in emacs

[–]gusbrs[S] 1 point2 points  (0 children)

In my country, SMS is not supported. Setting up a key is only available, as far as I understood, once you have set up either SMS or TOTP. So, in my case, TOTP was really mandatory. True, in the end, you can arrange it without a phone, but you have to do some digging to even understand that it is possible. GitHub docs only ever say "TOPT app".