@laotang@emacs.ch
@laotang@emacs.ch avatar

laotang

@laotang@emacs.ch

This is a complementary account to laotang@mastodon.social, much more focused on hacking Emacs.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

laotang, to emacs
@laotang@emacs.ch avatar

people: Is there an easy way to customise org-capture (and perhaps org-agenda) to just use the same window and leave my window management alone?

I’m knee-deep into stack overflow posts and wasting way too much time here. This is one of my most longstanding annoyances of

(This is actually one of the reasons does not use org-capture for new notes.)

laotang,
@laotang@emacs.ch avatar

@mykhaylo Oh, I remember this. Could it be that org-agenda and org-capture ignore display-buffer-alist? I use this for several other functions without issue but here it does not seem to work.

laotang,
@laotang@emacs.ch avatar

@mykhaylo Yes, that video was very helpful. However, orgmode currently does not respect display-buffer-alist (hence my frustration).

laotang, to emacs
@laotang@emacs.ch avatar

Introducing Cleandesk.el, a small collection of functions to rapidly rename and process files in Dired.

Pictures, PDFs and many other kinds of files frequently end up on my Desktop. In the past, I used Hazel and/or Devonthink (both macOS only) to automatically rename and refile. Cleandesk offers an alternative (manual) approach for these tasks from within . It draws on and .

To be sure, vanilla Dired probably can do most of this. But perhaps neither as convenient nor as swift. 😉

https://github.com/rtrppl/cleandesk

laotang, to emacs
@laotang@emacs.ch avatar

For the past few years (basically within the first few months of using Emacs in 2020) I’ve been using . My understanding of how completing-read and the minibuffer in should work are thereby strongly influenced by this experience.

This weekend I finally had some time to play with (and marginalia, consult, orderless… inspired by Prot's video). Probably I’m holding it wrong but it was not a smooth experience. Is it correct that vertico ignores the sorting of the collection used? Is there a way to change this? Why is the minibuffer here broken? Any advice would be welcome.

The images attached show the results for (completing-read "" orgrr-selection-list) in helm and vertico.

(completing-read "" orgrr-selection-list) in vertico

laotang,
@laotang@emacs.ch avatar

@sachac Thanks! This would explain why sorting is correct in Helm. It also explains why (setq vertico-sort-function nil) produces the correct order in Vertico.

laotang, to emacs
@laotang@emacs.ch avatar

The latest version of orgrr (https://github.com/rtrppl/orgrr) adds support for zettel IDs and "Folgezettel" (sequence of notes). For a long time I was not really convinced that orgrr would need something like this, even after being familiar with the great "Folgezettel"-debate (https://zettelkasten.de/folgezettel/).

But, I have to admit, this is a great way to work on a sequence of notes or on draft for a publication. Two weeks into this, it changed the way I interact with my notes.

Btw getting Luhmann's sorting right was way more complex than I thought. There are now six new user-facing functions, all documented in the readme.

AAMfP, to emacs
@AAMfP@fosstodon.org avatar

I have a problem with my configuration: I need to for some .
This https://marcoxbresciani.codeberg.page/emacs/emacs.html is my current Emacs config file.
The strange thing that happens is that when I yank into an Emacs buffer some text in Japanese (say, from Internet or Notepad), instead of proper characters I see lots of ??????
Font supports Japanese, I also have Japanese IME.

Any idea what I'm doing wrong?
I just started using Emacs so I'm basically blinding copy config pieces here and there.

laotang,
@laotang@emacs.ch avatar

@AAMfP Not sure if this helps but is your source perhaps in Shift JIS and not UTF-8? See webpage>encoding, see also https://www.sljfaq.org/afaq/encodings.html and/or are you pasting to an org buffer or not?

laotang,
@laotang@emacs.ch avatar

@AAMfP Ok. It was just a wild guess. 😉There is something like language encoding to render CJK symbols readable. Usually this UTF8, but there is also Shift-JIS for Japanese (or GB2312 for simplified Chinese; see attached image). Copy&pasting from one encoding to another may cause issues.

I just checked my config and all I needed to set was:

(prefer-coding-system 'utf-8)

But I have no experience with (Emacs on) Windows.

laotang,
@laotang@emacs.ch avatar

@AAMfP Hmm. I still think that the root of your problem is that the copied text is not Unicode/utf-8. I might be wrong here (no Windows to check) but Notepad++ doesn’t seem to use UTF8 out of the box and your browser might neither.

laotang,
@laotang@emacs.ch avatar

@AAMfP That's a bummer. Sorry, no ideas left.

laotang,
@laotang@emacs.ch avatar

@AAMfP Are you running emacs in WSL2? Or via Cygwin or some other way?

laotang,
@laotang@emacs.ch avatar

@AAMfP So now you use "(set-selection-coding-system 'utf-16-le)"? I have to write this down if I ever have to work with Windows again. Thanks for the follow-up!

laotang, to emacs
@laotang@emacs.ch avatar

What is the best way to use multiple accounts with #mastodonel without restarting #emacs? Right now I’m using this https://gist.github.com/rtrppl/2afd098470d9c74086d412a59ff852c1 to select one of my accounts after Emacs has started but I would prefer to be able to switch accounts without restarting.

laotang,
@laotang@emacs.ch avatar

@mykhaylo I get this error. And there is a line about needing to restart Emacs in the manual. I played with mastodon-return-credential-account and other functions but did not get it to work.

laotang,
@laotang@emacs.ch avatar

@mykhaylo Thanks! The problem here might be related to the fact that I'm trying to hack mastodon.el to accept multiple accounts, so I'm not only running my own code :). Right now I don’t pass any tokens, as mastodon.el has the correct tokens for both accounts stored somewhere. I am just trying to find a way to clear the existing token and load the correct one (to avoid having to restart emacs).

laotang,
@laotang@emacs.ch avatar

@rahguzar @mykhaylo Thanks for the suggestions! Still am figuring out how #mastodonel works. The tokens (of multiple accounts) are stored in a plist file (mastodon.plstore). In this file it is also noted which account is active. The active account can be changed via mastodon-client--make-current-user-active. But somehow the old token is still active and is used somewhere in mastodon.el. Sorry for all the boring details.

laotang,
@laotang@emacs.ch avatar

@mykhaylo @rahguzar The first option is what I have been doing 😉 will try edebug-defun later.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • tacticalgear
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • provamag3
  • ethstaker
  • GTA5RPClips
  • modclub
  • tester
  • Leos
  • osvaldo12
  • cisconetworking
  • everett
  • cubers
  • normalnudes
  • anitta
  • megavids
  • lostlight
  • All magazines