bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#74218: [PATCH] Ask confirmation before sending region to search engi


From: Eshel Yaron
Subject: bug#74218: [PATCH] Ask confirmation before sending region to search engine.
Date: Thu, 07 Nov 2024 10:12:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Eshel Yaron <me@eshelyaron.com>
>> Cc: Fabio Natali <me@fabionatali.com>,  Eli Zaretskii <eliz@gnu.org>,
>>   74218@debbugs.gnu.org
>> Date: Thu, 07 Nov 2024 09:42:29 +0100
>> 
>> I too agree that it's a good idea to optionally require confirmation.
>> However, I suspect that a yes/no question is not the best interface in
>> this case.  Instead, it's better to simply prepopulate the minibuffer
>> with the contents of the region.  Then you confirm with RET and cancel
>> with C-g.  In addition, this lets you examine and edit your input.
>
> Why copy the region into the mini-window when it is already shown in
> the current buffer's window?  By default, it will be highlighted, but
> if not (e.g., transient-mark-mode was disabled), we could forcibly
> highlight it.  Why is that not enough?

While point is always visible, mark can be out of view, so the region
need not be fully visible in the selected window.  But more importantly,
using the minibuffer provides a smoother and more consistent UX compared
to an additional yes/no question, IMO.

> Copying stuff into the minibuffer has the disadvantage of resizing the
> mini-window, and then it could hit the limits on such resizes, which
> will prevent the user from seeing large portions of the text, if the
> region is large.
>
> Also, does anyone have an opinion about asking for confirmation only
> for regions that are large enough?  E.g., when the region is a single
> word, do we want to ask for confirmation anyway?

I think it makes sense to have an option that is sensitive to the size
of the region, although personally I'd probably stick to "always ask",
especially if the prompt for confirmation isn't too obtrusive.





reply via email to

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