Subject: bug#1436 closed by Chong Yidong <[email-masked]> (Re: 23.0.60; region-active-p and kill-ring-save)

From: [email-masked] (Emacs bug Tracking System)

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 <[email-masked]>.

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 <[email-masked]> by
replying to this email.

-- 
1436: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1436
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Thu Nov 27 09:11:32 2008
From: Chong Yidong <[email-masked]>
To: Leo <[email-masked]>
Cc: [email-masked]
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.

>From [email-masked] Wed Nov 26 09:46:30 2008
From: Leo <[email-masked]>
To: [email-masked]
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
Sender: "Leo, Shidai Liu" <[email-masked]>

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 [email-masked] 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