From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: "Andreas Röhler" <andreas.roehler@online.de>
Cc: Richard Stallman <rms@gnu.org>,
Reiner Steib <reinersteib+gmane@imap.cc>,
emacs-devel@gnu.org, Juri Linkov <juri@jurta.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
Miles Bader <miles@gnu.org>
Subject: Re: region-active-p
Date: Sat, 27 Oct 2007 06:53:19 +0900 [thread overview]
Message-ID: <874pgd5yr4.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <200710261303.13426.andreas.roehler@online.de>
Andreas Röhler writes:
> > Right. However, if zmacs-region-extent is non-nil, it is possible
> > that (region-beginning) equals (region-end),
>
> If this is possible--my little check rather
> contradicts
Try "C-SPC C-x C-x M-: (list (region-beginning) (region-end)
zemacs-region-extent) RET" and you will see it is quite possible.
> --than I consider it as not congruent with its name "extent" or a
> bug.
Please read the documentation on extents. Extents are *objects* with
properties. For example, zero-length extents are the usual way to
insert images in a window that are not attached to any particular
buffer text. I see no particular reason why an extent of zero length
should be impossible; it's the obviously limiting case.
> At stake are AFAIU tree different and hierarchical conditions:
>
> 1 region exists but has no extent
> 2 region has extent but is not visible
> 3 region is visible
You're using "extent" as a property of the region. However, in XEmacs
extents are Lisp_Objects, and the test for zmacs-region-extent is a
test for whether such an object is attached to the region. In XEmacs
2 and 3 are almost the same, because the highlighting is carried by
the extent. The region is visible if and only if the extent exists,
with the sole exception of zero-length regions. (It would be possible
to make them visible by adding an image to them.)
> For appropriate names I held something like
>
> 1 region-exist-p
> 2 region-extent-p
This is not compatible with XEmacs usage of the word "extent". You
can use it as you like, of course, but if you choose to use it in this
way you will find it very difficult to communicate with XEmacs
developers.
> 3 region-visible-p
>
> In GNU Emacs these conditions are expressed by
>
> 1 mark-active
> 2 (and mark-active (not (eq (region-beginning) (region-end))))
> 3 (and transient-mark-mode mark-active
> (not (eq (region-beginning) (region-end))))
>
> XEmacs has AFAIS
>
> 1 region-exist-p
>
> 3 region-active-p
No. 1 and XEmacs's `region-exists-p' may be equivalent (but maybe
not: if zmacs-regions is non-nil, then region exists if and only if it
is active), but `region-active-p' is surely not equivalent to 3,
because an active region can have zero length in the buffer. I'm not
sure whether this is more useful than the definition you suggest, but
that is the way XEmacs works.
Also, for a region to be active, the buffer containing it must be
current. I'm not sure why this test is necessary in XEmacs, or
whether it would be useful in Emacs.
next prev parent reply other threads:[~2007-10-26 21:53 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 9:49 region-active-p Andreas Röhler
2007-10-19 20:57 ` region-active-p Juri Linkov
2007-10-21 7:25 ` region-active-p Richard Stallman
2007-10-21 13:56 ` region-active-p Stefan Monnier
2007-10-21 14:48 ` region-active-p Miles Bader
2007-10-21 19:22 ` region-active-p Andreas Röhler
2007-10-23 7:12 ` region-active-p Richard Stallman
2007-10-23 8:53 ` region-active-p Andreas Röhler
2007-10-23 17:53 ` region-active-p Richard Stallman
2007-10-24 7:33 ` region-active-p Andreas Röhler
2007-10-25 2:10 ` region-active-p Richard Stallman
2007-10-24 19:34 ` region-active-p Stephen J. Turnbull
2007-10-25 9:01 ` region-active-p Richard Stallman
2007-10-26 5:38 ` region-active-p Stephen J. Turnbull
2007-10-26 8:17 ` region-active-p Andreas Röhler
2007-10-26 9:21 ` region-active-p Stephen J. Turnbull
2007-10-26 11:03 ` region-active-p Andreas Röhler
2007-10-26 21:53 ` Stephen J. Turnbull [this message]
2007-10-27 2:28 ` region-active-p Richard Stallman
2007-10-27 5:20 ` region-active-p Stephen J. Turnbull
2007-10-27 6:17 ` region-active-p Miles Bader
2007-10-27 7:57 ` region-active-p Andreas Röhler
2007-10-28 6:55 ` region-active-p Stephen J. Turnbull
2007-10-28 7:32 ` region-active-p Miles Bader
2007-10-28 12:15 ` region-active-p Johan Bockgård
2007-10-28 21:07 ` region-active-p Stefan Monnier
2007-10-28 21:07 ` region-active-p Stefan Monnier
2007-10-27 23:41 ` region-active-p Richard Stallman
2007-10-28 1:21 ` region-active-p Stefan Monnier
2007-10-28 1:27 ` region-active-p Miles Bader
2007-10-28 2:43 ` region-active-p Stefan Monnier
2007-10-29 0:11 ` region-active-p Richard Stallman
2007-10-29 1:40 ` region-active-p Stefan Monnier
2007-12-10 23:08 ` region-active-p Richard Stallman
2007-12-11 8:15 ` region-active-p Andreas Röhler
2007-12-11 9:57 ` region-active-p Juri Linkov
2007-12-11 11:52 ` region-active-p Andreas Röhler
2007-12-11 14:55 ` region-active-p Stefan Monnier
2007-12-11 17:05 ` region-active-p Andreas Röhler
2007-12-11 18:16 ` region-active-p Stefan Monnier
2007-12-11 9:07 ` region-active-p Andreas Röhler
2007-12-11 9:59 ` region-active-p Juri Linkov
2007-12-11 11:50 ` region-active-p Andreas Röhler
2007-10-28 7:29 ` region-active-p Stephen J. Turnbull
2007-10-28 21:06 ` region-active-p Stefan Monnier
2007-10-29 0:11 ` region-active-p Richard Stallman
2007-10-30 0:12 ` region-active-p Stephen J. Turnbull
2007-10-30 8:22 ` region-active-p Richard Stallman
2007-10-30 8:59 ` region-active-p David Kastrup
2007-10-31 7:46 ` region-active-p Richard Stallman
2007-10-30 15:03 ` region-active-p Drew Adams
2007-10-30 19:03 ` region-active-p Stefan Monnier
2007-10-30 19:49 ` region-active-p Drew Adams
2007-10-30 20:15 ` region-active-p Stefan Monnier
2007-10-30 20:28 ` region-active-p Drew Adams
2007-10-30 21:30 ` region-active-p Stefan Monnier
2007-10-30 23:43 ` region-active-p Miles Bader
2007-10-31 6:35 ` region-active-p David Kastrup
2007-10-31 7:59 ` region-active-p Miles Bader
2007-11-03 21:08 ` region-active-p Stephen J. Turnbull
2007-10-31 7:47 ` region-active-p Richard Stallman
2007-10-31 7:47 ` region-active-p Richard Stallman
2007-10-31 8:00 ` region-active-p Miles Bader
2007-10-31 23:58 ` region-active-p Richard Stallman
2007-11-01 2:33 ` region-active-p Miles Bader
2007-11-01 2:55 ` region-active-p Stefan Monnier
2007-11-01 10:06 ` region-active-p Kim F. Storm
2007-11-01 15:46 ` region-active-p Drew Adams
2007-11-01 17:56 ` region-active-p David Kastrup
2007-11-01 23:08 ` region-active-p Richard Stallman
2007-11-01 19:04 ` region-active-p Richard Stallman
2007-11-02 0:18 ` region-active-p Miles Bader
2007-11-02 15:02 ` region-active-p Richard Stallman
2007-11-02 21:39 ` region-active-p Stefan Monnier
2007-11-02 22:31 ` region-active-p Miles Bader
2007-11-03 20:48 ` region-active-p Richard Stallman
2007-11-05 6:48 ` region-active-p Miles Bader
2007-10-29 8:24 ` region-active-p Andreas Röhler
2007-10-22 6:09 ` region-active-p Andreas Röhler
2007-10-21 17:18 ` region-active-p Stephen J. Turnbull
2007-10-21 20:54 ` region-active-p Reiner Steib
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874pgd5yr4.fsf@uwakimon.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=andreas.roehler@online.de \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.org \
--cc=miles@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=reinersteib+gmane@imap.cc \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).