From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74218: [PATCH] Ask confirmation before sending region to search engine. Date: Thu, 07 Nov 2024 12:52:44 +0200 Message-ID: <864j4jqps3.fsf@gnu.org> References: <20241106005544.26516-1-me@fabionatali.com> <86pln8sfqe.fsf@gnu.org> <87ikt0gz7b.fsf@fabionatali.com> <86bjyrqvb0.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32267"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74218@debbugs.gnu.org, stefankangas@gmail.com, me@fabionatali.com To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 07 11:53:29 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t908l-0008DS-6u for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Nov 2024 11:53:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t908Q-0008AW-Hb; Thu, 07 Nov 2024 05:53:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t908O-0008A0-VG for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 05:53:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t908N-0007ao-Mt for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 05:53:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=ldjfgmuYZnP0NMYfgnGw/MPVHUuvems1Nc1VTKs36IQ=; b=hF78GSptyHjxWkNSviVC+41ToddQE2oSzgFk86tbrfbZhCnYyDTxmPDUUdB4M4kyg66htoGb7DhFsIalaCNwq5Co5bxgMpYd/R20eJZ+Ol4nSWQ1jCK0XDjSDYHVveuYM2k624u/e7RCZqhAgTOkzoipSeNzH2PRyujBvMhWZQj18U59HWT/vcCftqs8tKW/jzIt5T1yGCi8yCTyk/K6kYHVIGIIR33eXS/7IWLl/4tO0qEtD5UBqIbUN2ethbg/7Y8Q8qvBmCU221TqEAyKPbNMgE7sDxfNtk46YPODUz0CKSRVhasAyjnrB17bSjYDe2DfrAyAsYRcaexKkfET/w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t908M-0000uD-HC for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 05:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Nov 2024 10:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74218-submit@debbugs.gnu.org id=B74218.17309767763462 (code B ref 74218); Thu, 07 Nov 2024 10:53:02 +0000 Original-Received: (at 74218) by debbugs.gnu.org; 7 Nov 2024 10:52:56 +0000 Original-Received: from localhost ([127.0.0.1]:47337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t908F-0000tl-H2 for submit@debbugs.gnu.org; Thu, 07 Nov 2024 05:52:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t908C-0000tV-ON for 74218@debbugs.gnu.org; Thu, 07 Nov 2024 05:52:53 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9087-0007Zk-3O; Thu, 07 Nov 2024 05:52:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ldjfgmuYZnP0NMYfgnGw/MPVHUuvems1Nc1VTKs36IQ=; b=CMitBVGzZp9D IZmTzhfVZUMkdwvJNPaOVTV4SZWiPIxgGZAa6b6RGx5QNyfhB0PoFnrLTdMHj6LHa7idgvFZ+ywZE A3mwiN8SQupvL7I+F6uPLroSZ6fs0ypsSIHLpN9hRdMN5/0QJhPNXdVjjv3nqVc0IODgxvZa9SV+V 0w3RLBvWs+/V3cfvDmYwWJKbJJwhMjkO5eFxRQUOR77FFL/LCPqlU8GLDDq47BrDMZvEXmPMFwp3j ReT+gRkHIZY1g7Vm0MkB7YqvYcWdPxxsJedxPXWbs90KDUqvS9eGu5NGSemEvGBMtJJwoxQSIhiQ8 dIxterIOpACDmRoTSSD1LQ==; In-Reply-To: (message from Eshel Yaron on Thu, 07 Nov 2024 10:12:53 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295013 Archived-At: > From: Eshel Yaron > Cc: 74218@debbugs.gnu.org, stefankangas@gmail.com, me@fabionatali.com > Date: Thu, 07 Nov 2024 10:12:53 +0100 > > Eli Zaretskii writes: > > >> From: Eshel Yaron > >> Cc: Fabio Natali , Eli Zaretskii , > >> 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. Not all the region is always visible, but I'm sure you will agree that in most cases _more_ of it will be visible in its buffer than if copied to minibuffer. To say nothing of the fact that resizing the mini-window has adverse effect on visibility of other windows, and thus on the window where the current buffer is displayed. > > 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. We can argue about defaults later, but personally I fail to see how asking for confirmation when a single word is sent would be TRT.