I passively read the #Emacs subreddit but I have zero desire to be on reddit. Often I come across questions I think I know the answer to and can only hope someone else answers it (and most of the time someone does it).
Not sure what I'm doing wrong, but I'm trying to do some project-find-regexp with an expression like this: func() and it still finds everything with func. I was expecting that it only finds "func()", what did I get wrong?
#emacs and #haskell people, I have an Emacs hoogle frontend on #ELPA called consult-hoogle. It uses consult to present search results from hoogle. I have added another mode in which results are presented in a buffer. As a result it can also display search results from https://hoogle.haskell.org/ using the JSON API.
I have a problem with my #Emacs configuration: I need to #askFedi for some #FediHelp.
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.
@AAMfP you can try moving cursor to a character that is not displayed correctly and pressing "C-h '" (i.e. describe-char). A buffer with information including what Emacs is trying to display and what font is being used will pop up and hopefully will give you a hint.
@AAMfP uft-8-dos is likely the problem.
The documentation of selection-coding-system says,
For MS-Windows and MS-DOS:
When sending or receiving text via selection and clipboard, the text
is encoded or decoded by this coding system. The default value is
the current system default encoding on 9x/Me, utf-16le-dos
(Unicode) on NT/W2K/XP, and iso-latin-1-dos on MS-DOS.
Try changing it to utf-16le-dos and see if that fixes the problem.
Question for #Emacs people: I often find that visual-line-mode doesn't work when called from hooks (especially for read only buffers). The variable visual-line-mode will be t, but no line wrapping happens. To make it work I have to turn it off and on again. Does anyone know why and in what circumstances this happens? I think it has to do with whether the buffer was displayed when visual-line-mode was turned on but I am not sure.
@drewdevault I have been following your post about text-rendering with curiosity and I hope you find a good solution to a problem I have seen quite frequently: my mother tongue is #Urdu which use Arabic script with extra characters. I lot of fonts don't provide these extra characters and as a result when they occur in a word they and only them get substituted by a different font which. This breaks text shaping and visual result is something akin to inserting spaces around these words. I think such substitution should stretch to at least nearest spaces.
@drewdevault yes, how big do you want them to be? My display name is actually an example. The second character "ARABIC LETTER HEH GOAL" is in urdu letter and not present in Arabic.
@drewdevault I think it depends so much on the fonts that it is better to make this configurable. I think scaling by 1.25 will work quite well for most fonts.
Setting it up is a bit fiddly, but I think the end result is quite nice. If you have suggestions for streamlining the setup or other aspects, please open bug reports/pull requests.
#Emacs people: what is the canonical way to read a list of filenames? #Dired and completing-read-multiple can be both be used but are both clumsy when most of the times only one wants to choose on or two files. I am asking because of https://codeberg.org/rahguzar/filechooser
@sqrtminusone I see I made some typos in my original message but the use case is to present a dialogue for selecting some files. The repository I linked to implements an xdg file chooser portal so that one can use Emacs for file selection dialogues in e.g. firefox.
@holgerschurig@sqrtminusone this is already implemented and is pretty good for selecting a large number of files. When I want to choose only 1 or 2 I always end up wishing I was dealing with read-file-name and almost always I want only one file.
@laotang@mykhaylo mastodon-client--active-user-details-plist looks relevant. Maybe try setting it to nil. I haven't tried it myself. Otherwise toggle-debug-on-error as suggested earlier should give you some hint.
@laotang@mykhaylo I also am not too familiar with the #mastodonel codebase, but my guess would be that the file is read once when you load Emacs. For run time it is probably irrelevant and you need to set #elisp variables. mastodon-client--make-current-user-active seems to just save these variables for the next session.
For the coming year: I have a fair bit of #emacs lisp that I use but probably no one else. Maybe I should try upstreaming some of that or put it on #elpa
Recently I wrote some patches (installed on #Emacs master) to allow shr and eww to display small images inline. The motivation was to be able to read #math articles from #wikipedia in eww. They same set of patches also added outline-minor-mode support. All this with some further tweaks in my config makes reading wikipedia in meacs a better experience than firefox most of the time.
One exception is tables: they don't render the images (I think it is to simply the width calculations).
Starting with tech support: is there a way to get #firefox to override fonts for a single script? I have a nice nastaliq font set up for Arabic script to make Urdu on web readable but both here and on a lot of websites, some font that doesn't know how display Urdu characters gets used.