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 10:53:23 +0200 Message-ID: <86bjyrqvb0.fsf@gnu.org> References: <20241106005544.26516-1-me@fabionatali.com> <86pln8sfqe.fsf@gnu.org> <87ikt0gz7b.fsf@fabionatali.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22870"; 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 09:54:31 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 1t8yHe-0005mv-K7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Nov 2024 09:54:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8yHH-00029S-2z; Thu, 07 Nov 2024 03:54:07 -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 1t8yHE-00028s-2N for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 03:54:05 -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 1t8yHD-0002Yf-JC for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 03:54: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=6QWSysG718oRaiuOeleYbUje7bvCYOVqpbhWv4ztJgI=; b=eMGuXkxf/A11zebHmRmuarJ9U6ccdYcizuJ78QOeiwvVoo4Z30AMkBizv0CJRCB32P/4lXiYMGz/RSnRnNiRH4+6Wqm9R1OH4wNUMa09HdGBkFRyfT45MjDPpz+h3FrCG4H4QaAYk+s1C6shGZpp/+xbWA92CsIhic6c0bi4vAaoXISvLfmBvADVMxy9CmUA9+dTyg4yy9ydrEpf58xF+KD+06upe0ZQJLz+EqM+A2WRcbuFAn3t9y8AfVFrFy68mIFbc8LdtUlIZb8T5R3kvGmvDFhG6vaWak8rExlW2HbrkaXRywNMb6u3mggWrpILqGRMFYk5i0QHNLHv0T4bzg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8yHC-00043I-Du for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 03:54: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 08:54: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.173096961715546 (code B ref 74218); Thu, 07 Nov 2024 08:54:02 +0000 Original-Received: (at 74218) by debbugs.gnu.org; 7 Nov 2024 08:53:37 +0000 Original-Received: from localhost ([127.0.0.1]:47100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8yGn-00042g-Ca for submit@debbugs.gnu.org; Thu, 07 Nov 2024 03:53:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8yGk-00042S-CC for 74218@debbugs.gnu.org; Thu, 07 Nov 2024 03:53:35 -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 1t8yGd-0002Wv-9P; Thu, 07 Nov 2024 03:53:27 -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=6QWSysG718oRaiuOeleYbUje7bvCYOVqpbhWv4ztJgI=; b=gHzXvGsxVLDG xBnziAGrNU0e14PJUM8/+RjhxO2HovgVdbDsDXGdbhdv0mnk00sqxO/2mwsgpLMKXIej+OZ2M7/T4 4OCfF6GwSqiEuAUK/j+l5CQCW3myxFM3/EcGajj4FkxDedlwh2Xrazf+9YLp/0jR91bDKzcaM01lR 1sNzHVcOIe1rHGnoNZu3L5nqWMrK/suP1D1XVKjpU26N3ec7s7205mfvzUxs44QYaXhiwWrkrljIy 8WzxPzSKK3EfP7s9aW4jJBcga2oCSPTws4jUEEcz2xReWjEy4mwU44QMPeYTFj8mktv327q74DpGF f6YFv2mNiVR0Xv4XWAzJ9w==; In-Reply-To: (message from Eshel Yaron on Thu, 07 Nov 2024 09:42:29 +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:295001 Archived-At: > 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? 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?