GNU bug report logs - #1436
23.0.60; region-active-p and kill-ring-save

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Wed, 26 Nov 2008 17:55:05 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1436 in the body.
You can then email your comments to 1436 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1436; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; region-active-p and kill-ring-save
Date: Wed, 26 Nov 2008 17:46:22 +0000
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 <at> 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




Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 1436-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Leo <sdl.web <at> gmail.com>
Cc: 1436-done <at> debbugs.gnu.org
Subject: Re: 23.0.60; region-active-p and kill-ring-save
Date: Thu, 27 Nov 2008 12:11:50 -0500
> *** `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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 26 Dec 2008 15:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.