@rahguzar@emacs.ch avatar

rahguzar

@rahguzar@emacs.ch

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

rahguzar, to emacs
@rahguzar@emacs.ch avatar

I passively read the 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).

Case in point: https://old.reddit.com/r/emacs/comments/1coumhm/elisp_determine_if_mouse_posn_is_within_region/

I think they are looking for posn-point.

ArneBab, to emacs German
@ArneBab@rollenspiel.social avatar

(add-hook 'shell-mode-hook 'goto-address-mode)

If you use , you want that.

Also with magit-process-mode-hook

And for all other modes that may show links ☺

rahguzar,
@rahguzar@emacs.ch avatar

@ArneBab there is also the global-goto-address-mode

louis, (edited ) to emacs
@louis@emacs.ch avatar

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?

rahguzar,
@rahguzar@emacs.ch avatar

@RogerBW @louis this seems to be case in #elisp My way of dealing with regexes in Elisp is to use rx and (rx "func()") outputs "func()".

rahguzar, to emacs
@rahguzar@emacs.ch avatar

and people, I have an Emacs hoogle frontend on 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 someone wants to try it out and have feedback the code is at https://codeberg.org/rahguzar/consult-hoogle/src/branch/hoogle-buffer

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.

rahguzar,
@rahguzar@emacs.ch avatar

@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.

rahguzar,
@rahguzar@emacs.ch avatar

@AAMfP check the value for selection-coding-system. Reset it back to default if you have changed it and see if the problem goes away.

rahguzar,
@rahguzar@emacs.ch avatar

@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.

rahguzar,
@rahguzar@emacs.ch avatar

@AAMfP sorry! I am out of ideas now. Can you paste correctly if you start with emacs -Q ? If not you should file a bug.

rahguzar, to emacs
@rahguzar@emacs.ch avatar

Question for 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.

rahguzar,
@rahguzar@emacs.ch avatar

@holgerschurig I have submitted a few bugs too and I agree response was great and also pretty fast.

But I would like to have an emacs -Q recipe before submitting a and that requires a bit of work. Some day ...

drewdevault, to random
@drewdevault@fosstodon.org avatar

tfw either have to write a fontconfig wrapper or re-invent fontconfig

rahguzar,
@rahguzar@emacs.ch avatar

@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 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.

rahguzar,
@rahguzar@emacs.ch avatar

@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.

rahguzar,
@rahguzar@emacs.ch avatar

@drewdevault oh wow! This definitely better and you can see the difference in height. I think https://mehrtype.com/product/mehr-nastaliq-web/ and the classic Jameel Noori Nastaliq are better fonts than the ones made by Apple/Google etc

rahguzar,
@rahguzar@emacs.ch avatar

@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.

rahguzar, to emacs
@rahguzar@emacs.ch avatar

people, if you want to use Emacs for selecting files in or other programs that use for choosing files, please try out https://codeberg.org/rahguzar/filechooser

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.

rahguzar, to emacs
@rahguzar@emacs.ch avatar

people: what is the canonical way to read a list of filenames? 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

rahguzar,
@rahguzar@emacs.ch avatar

@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.

rahguzar,
@rahguzar@emacs.ch avatar

@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, to emacs
@laotang@emacs.ch avatar

What is the best way to use multiple accounts with without restarting ? 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.

rahguzar,
@rahguzar@emacs.ch avatar

@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.

rahguzar,
@rahguzar@emacs.ch avatar

@laotang @mykhaylo I also am not too familiar with the 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 variables. mastodon-client--make-current-user-active seems to just save these variables for the next session.

Better ask on the bug-tracker for mastodon.el

sachac, to random
@sachac@emacs.ch avatar

I occasionally get auth errors when I use mastodon.el. This seems to work around them:

(defun my-mastodon-clear-auth ()  
 "Fix alist-get: Wrong type argument: listp, (error . \"The access token is invalid\") error."  
 (interactive)  
 (setq mastodon-auth--token-alist nil))  
rahguzar,
@rahguzar@emacs.ch avatar

@sachac @laotang this looks like the same problem as you are experiencing.

mms, to random
@mms@emacs.ch avatar

How doe one develops ? I'm currently C-e m source code but it doesn't seem too great with far from great error messages.

Does anyone have a developer-env guide at hand?

rahguzar,
@rahguzar@emacs.ch avatar

@louis @mms eval-defun is on C-M-x. Not very convenient so I have only used that binding when I want to test something in emacs -Q.

rahguzar, to emacs
@rahguzar@emacs.ch avatar

For the coming year: I have a fair bit of lisp that I use but probably no one else. Maybe I should try upstreaming some of that or put it on

rahguzar, to emacs
@rahguzar@emacs.ch avatar

Recently I wrote some patches (installed on master) to allow shr and eww to display small images inline. The motivation was to be able to read articles from 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).

Why would tables have images? Well wikipedia uses them for collapsable sections like the proof here https://en.wikipedia.org/wiki/Cyclotomic_polynomial#Applications : in eww all the inline typset images end up below the table.

For people who know html: do you see a way to handle cases like this specially?

rahguzar, to firefox
@rahguzar@emacs.ch avatar

Starting with tech support: is there a way to get 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.

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