From unknown Sat Aug 16 23:46:29 2025 X-Loop: don@donarmstrong.com Subject: bug#1436: 23.0.60; region-active-p and kill-ring-save Reply-To: Leo , 1436@debbugs.gnu.org Resent-From: Leo Original-Sender: "Leo, Shidai Liu" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 26 Nov 2008 17:55:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1436 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12277215901433 (code B ref -1); Wed, 26 Nov 2008 17:55:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2008 17:46:30 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAQHkRmV001423 for ; Wed, 26 Nov 2008 09:46:29 -0800 Received: from mx10.gnu.org ([199.232.76.166]:32881) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1L5OSm-0007FS-7B for emacs-pretest-bug@gnu.org; Wed, 26 Nov 2008 12:46:08 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1L5OT3-00014l-Mk for emacs-pretest-bug@gnu.org; Wed, 26 Nov 2008 12:46:26 -0500 Received: from ppsw-0.csi.cam.ac.uk ([131.111.8.130]:54416) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L5OT3-00014R-D1 for emacs-pretest-bug@gnu.org; Wed, 26 Nov 2008 12:46:25 -0500 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from smaug.linux.pwf.cam.ac.uk ([193.60.95.72]:46889) by ppsw-0.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.150]:587) with esmtpsa (LOGIN:sl392) (TLSv1:DHE-RSA-AES256-SHA:256) id 1L5OT1-0001mC-2B (Exim 4.70) for emacs-pretest-bug@gnu.org (return-path ); Wed, 26 Nov 2008 17:46:23 +0000 From: Leo To: emacs-pretest-bug@gnu.org Organization: University of Cambridge, England Date: Wed, 26 Nov 2008 17:46:22 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: "Leo, Shidai Liu" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: The news says: *** `region-active-p' returns non-nil when Transient Mark mode is enabled and there is an active region. This is NOT the best function to use to test whether a command should operate on the region instead of the usual behavior -- for that, use `use-region-p'. However, kill-ring-save uses region-active-p, is that not contradictory? BTW, the doc string of use-region-p seems to make little sense. Best, Leo From unknown Sat Aug 16 23:46:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Leo Subject: bug#1436 closed by Chong Yidong (Re: 23.0.60; region-active-p and kill-ring-save) Message-ID: References: <87myflayax.fsf@cyd.mit.edu> X-Emacs-PR-Message: they-closed 1436 X-Emacs-PR-Package: emacs Reply-To: 1436@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1227806403-8992-1" This is a multi-part message in MIME format... ------------=_1227806403-8992-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1436: 23.0.60; region-active-p and kill-ring-save It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 1436: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1436 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1227806403-8992-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From cyd@stupidchicken.com Thu Nov 27 09:11:32 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1436-done) by emacsbugs.donarmstrong.com; 27 Nov 2008 17:11:32 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mARHBTcV007705 for <1436-done@emacsbugs.donarmstrong.com>; Thu, 27 Nov 2008 09:11:30 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 450A957E1D3; Thu, 27 Nov 2008 12:11:50 -0500 (EST) From: Chong Yidong To: Leo Cc: 1436-done@debbugs.gnu.org Subject: Re: 23.0.60; region-active-p and kill-ring-save Date: Thu, 27 Nov 2008 12:11:50 -0500 Message-ID: <87myflayax.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > *** `region-active-p' returns non-nil when Transient Mark mode is > enabled and there is an active region. This is NOT the best function > to use to test whether a command should operate on the region instead > of the usual behavior -- for that, use `use-region-p'. > > However, kill-ring-save uses region-active-p, is that not contradictory? No, because this use-region-p is intended for commands that do one thing when the region is inactive (usually acting on the text near point), and another thing when the region is active (usually acting on the text in the region). Such commands use use-region-p to decide whether to act on the region. That's not what kill-ring-save is using region-active-p for (kill-ring-save always acts on the region). > BTW, the doc string of use-region-p seems to make little sense. I rewrote the docstrings to make them a little clearer. ------------=_1227806403-8992-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From sl392@cam.ac.uk Wed Nov 26 09:46:30 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2008 17:46:30 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAQHkRmV001423 for ; Wed, 26 Nov 2008 09:46:29 -0800 Received: from mx10.gnu.org ([199.232.76.166]:32881) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1L5OSm-0007FS-7B for emacs-pretest-bug@gnu.org; Wed, 26 Nov 2008 12:46:08 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1L5OT3-00014l-Mk for emacs-pretest-bug@gnu.org; Wed, 26 Nov 2008 12:46:26 -0500 Received: from ppsw-0.csi.cam.ac.uk ([131.111.8.130]:54416) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L5OT3-00014R-D1 for emacs-pretest-bug@gnu.org; Wed, 26 Nov 2008 12:46:25 -0500 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from smaug.linux.pwf.cam.ac.uk ([193.60.95.72]:46889) by ppsw-0.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.150]:587) with esmtpsa (LOGIN:sl392) (TLSv1:DHE-RSA-AES256-SHA:256) id 1L5OT1-0001mC-2B (Exim 4.70) for emacs-pretest-bug@gnu.org (return-path ); Wed, 26 Nov 2008 17:46:23 +0000 From: Leo To: emacs-pretest-bug@gnu.org Subject: 23.0.60; region-active-p and kill-ring-save Organization: University of Cambridge, England Date: Wed, 26 Nov 2008 17:46:22 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: "Leo, Shidai Liu" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: The news says: *** `region-active-p' returns non-nil when Transient Mark mode is enabled and there is an active region. This is NOT the best function to use to test whether a command should operate on the region instead of the usual behavior -- for that, use `use-region-p'. However, kill-ring-save uses region-active-p, is that not contradictory? BTW, the doc string of use-region-p seems to make little sense. Best, Leo ------------=_1227806403-8992-1--