emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] Add project.el command to replace symbol at point throughout


From: Jon Eskin
Subject: Re: [Patch] Add project.el command to replace symbol at point throughout project
Date: Mon, 17 Jan 2022 01:36:39 -0500

No problem! Thank you for helping walk me through this along the way, I really 
appreciate it and learned a lot.

> On Jan 16, 2022, at 8:41 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> 
> Jon,
> 
> Thanks for taking a stab at this, by the way.
> 
> To clarify why your patch was not enough:
> 
> On 15.01.2022 11:55, Jon Eskin wrote:
>> When I first let-bound `read-regexp-defaults-function` around the call to 
>> `query-replace-read-args`, it didn't work- it looks like `read-regexp` needs 
>> to be passed a symbol for its `DEFAULTS` parameter or it ignores 
>> `read-regexp-default-function`. I passed in the symbol at point to 
>> `DEFAULTS` which works- if I understand correctly the value of any I pass in 
>> doesn't end up making a difference as long as it's a symbol. I wasn't sure 
>> what the reason was for that behavior, but I didn't want to mess with stuff 
>> I didn't understand.
> 
> This change (having query-replace-read-from use symbol-at-point) affects all 
> its callers, whereas the idea was to delegate the default detection logic to 
> a piece of code determined by the caller.
> 
> That's why the next step was to determine why binding 
> 'read-regexp-defaults-function' didn't have the desired effect, rather than 
> calling 'symbol-at-point' directly.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]