unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33383: 26; `count-words-region'
@ 2018-11-14 15:47 Drew Adams
  2019-07-10 12:42 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2018-11-14 15:47 UTC (permalink / raw)
  To: 33383

Please consider a minor enhancement: Change the message from this:

(count-words--message "Region" start end) to this:

(count-words--message
  (if (use-region-p) "Active region" "Inactive region")
  start
  end)

It's not so obvious that the report is for the region even when
inactive, and many Emacs users will nowadays think of the region only as
the active region.  So if the region is inactive and they see a non-zero
number they might wonder (and need to consult the doc string to
understand).

They might also, without consulting the doc string, expect that if the
region is not active then the report is for the whole buffer, as that is
the behavior for lots of commands these days.  The number they then see
is for the inactive region and not the whole buffer.  With a small
buffer they might well mistake the meaning of the result.


In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor `Microsoft Corp.', version 10.0.16299
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#33383: 26; `count-words-region'
  2018-11-14 15:47 bug#33383: 26; `count-words-region' Drew Adams
@ 2019-07-10 12:42 ` Lars Ingebrigtsen
  2019-07-10 14:28   ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-10 12:42 UTC (permalink / raw)
  To: Drew Adams; +Cc: 33383

Drew Adams <drew.adams@oracle.com> writes:

> Please consider a minor enhancement: Change the message from this:
>
> (count-words--message "Region" start end) to this:
>
> (count-words--message
>   (if (use-region-p) "Active region" "Inactive region")
>   start
>   end)
>
> It's not so obvious that the report is for the region even when
> inactive, and many Emacs users will nowadays think of the region only as
> the active region.  So if the region is inactive and they see a non-zero
> number they might wonder (and need to consult the doc string to
> understand).

I think this command is the wrong place to teach people about what a
region is, and how it pertains to the "active region mode" (which I
think uses unfortunate terminology, but that's a different matter).

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#33383: 26; `count-words-region'
  2019-07-10 12:42 ` Lars Ingebrigtsen
@ 2019-07-10 14:28   ` Drew Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2019-07-10 14:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 33383

> > Please consider a minor enhancement: Change the message from this:
> >
> > (count-words--message "Region" start end) to this:
> >
> > (count-words--message
> >   (if (use-region-p) "Active region" "Inactive region")
> >   start
> >   end)
> >
> > It's not so obvious that the report is for the region even when
> > inactive, and many Emacs users will nowadays think of the region only as
> > the active region.  So if the region is inactive and they see a non-zero
> > number they might wonder (and need to consult the doc string to
> > understand).
> 
> I think this command is the wrong place to teach people about what a
> region is, and how it pertains to the "active region mode" (which I
> think uses unfortunate terminology, but that's a different matter).
> 
> So I'm closing this bug report.

It's unfortunate that you feel that way.

1. The doc string explicitly calls this out:
   "(whether or not the region is active)".
   Why, if this is not the place to talk about it?

   That was added to the doc string because it was
   not obvious to many/most users what was going on
   when they saw no region highlighting.

   The same thing is true for `count-lines-region'.
   When `transient-mark-mode' came along, with the
   notion of "active" region and highlighting the
   region, its doc string added that text because
   of such confusion.

2. How many users these days even know that there
   is such a thing as an inactive region, i.e.,
   that the region exists even when they see no
   highlighting of selected text?  Few.

   Many/most users will wonder why this command
   tells them about a word count in "the region"
   when it is inactive, and they will wonder why
   the doc string mentions this.

   Fixing the message clarifies things.  Do you
   think it confuses things?  If not, what reason
   is there _not_ to make this minor change?

   Does your region make you want to also remove
   that text that was added to the doc string?
   If it makes sense to point this out in the doc
   string then it makes even more sense to put it
   in the message - which many more users will see
   than will see the doc string.






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-10 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 15:47 bug#33383: 26; `count-words-region' Drew Adams
2019-07-10 12:42 ` Lars Ingebrigtsen
2019-07-10 14:28   ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).