From: Alan Mackenzie <acm@muc.de>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Reopen bug 535: Problem with highlit regions on Linux virtual terminal
Date: Tue, 7 Apr 2009 20:55:09 +0000 [thread overview]
Message-ID: <20090407205509.GA3452@muc.de> (raw)
In-Reply-To: <buohc12gmdn.fsf@dhlpc061.dev.necel.com>
Hi, Miles!
On Mon, Apr 06, 2009 at 06:30:28PM +0900, Miles Bader wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > When I start Emacs 23 -Q, all of my buffers (loaded by desktop) are
> > foghorned - I find Emacs in this state unusable.
> All of your buffers have activated regions when Emacs starts?
> If so, _that_ sounds like a bug (so please try to send a test case);
> needless to say, I think, I do not see this behavior.
In Emacs-22 -Q, enable desktop-save-mode, load some files, create a
region in each file. DO NOT enable transient-mark-mode (or anything
similar). Exit Emacs, creating .emacs.desktop.
Have a look at this .emacs.desktop. It will contain buffer entries like
this:
(desktop-create-buffer 206
"/home/acm/emacs/emacs.cvs/src/callint.c"
"callint.c"
'c-mode
'(abbrev-mode hi-lock-mode)
1
'(8314 t) ; <==============================================
nil
nil
'((buffer-file-coding-system . undecided-unix)))
The cons in the marked line is of the mark and the variable
`mark-active'. This variable doesn't have a coherent definition, but it
causes the region to be highlit. It is "defined" as
Non-nil means the mark and region are currently active in this
buffer.
As I have pointed out before, this is Humpty Dumpty language, liable to
cause bugs. The mark and the region are never "active" and cannot be
active - so to assert is a category error; they don't do anything, they
are never agents. I don't know what it means for a mark to be "active"
and for a region to be "active" - I don't think it's defined anywhere,
and there is certainly no entry in the Concept Index for "active". It
seems that the hacker who created `mark-active' had a different
understanding from the hacker who wrote desktop.el, hence this bug. As
it is, `mark-active' is meaningless unless transient-mark-mode is
enabled. Hence the arbitrariness of the `t' in (8314 t).
My suggestion for a fix:
(i) The variable `mark-active' should be renamed to what it actually
means, together with an alias. Other similarly named variables should
also be renamed as needed to make their names meaningful; all uses of
these variables should be checked.
(ii) The concept "active" should be defined in the Emacs manual.
(ii) desktop-mode.el should be enhanced to record the state of
`transient-mark-mode' in .emacs.desktop.
(iii) On loading the desktop, buffers' regions should not be highlit
unless `transient-mark-mode' is recorded with a non-nil state.
> -Miles
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2009-04-07 20:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-05 23:05 Reopen bug 535: Problem with highlit regions on Linux virtual terminal Alan Mackenzie
2009-04-06 1:12 ` Miles Bader
2009-04-06 3:10 ` Chong Yidong
2009-04-06 9:36 ` Alan Mackenzie
2009-04-06 9:03 ` Alan Mackenzie
2009-04-06 9:30 ` Miles Bader
2009-04-06 12:52 ` Alan Mackenzie
2009-04-06 15:35 ` David De La Harpe Golden
2009-04-07 21:46 ` Alan Mackenzie
2009-04-07 20:55 ` Alan Mackenzie [this message]
2009-04-08 5:35 ` Stephen J. Turnbull
2009-04-08 8:13 ` Alan Mackenzie
2009-04-08 9:16 ` Eli Zaretskii
2009-04-08 9:26 ` Stephen J. Turnbull
2009-04-08 13:05 ` Alan Mackenzie
2009-04-08 14:44 ` Stephen J. Turnbull
2009-04-06 3:03 ` Chong Yidong
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=20090407205509.GA3452@muc.de \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=miles@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).