From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>, Vitalie Spinu <spinuvit@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Indirect buffers
Date: Sun, 08 Jun 2014 19:39:49 +0300 [thread overview]
Message-ID: <83egyz2w4q.fsf@gnu.org> (raw)
In-Reply-To: <61933bd2-7a72-4666-bf23-deb677e1d62f@default>
> Date: Sun, 8 Jun 2014 08:53:54 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
>
> [Beyond this, I hope you will revisit the behavior wrt jit-lock and
> indirect buffers, to DTRT following the (unfinished) emacs-devel thread
> "Re: trunk r116426: * lisp/jit-lock.el (jit-lock-mode): Keep it disabled
> in indirect buffers." (2014-05-21 to 2014-05-30). Like Vitalie, I would
> like to see a solution to the problem of font-locking indirect buffers
> independently of each other and of the base buffer, each according to
> its major mode etc.]
And I wish you and Vitalie just dropped the idea. It's unworkable.
It's against the very design of the Emacs display engine. Stefan is
right: indirect buffers are an attractive nuisance.
By the time Vitalie or someone else solves the basic problems whose
discussion has just begun in that thread, we will discover that
problems pop up all over the place. Just wait until people start
using multi-mode implemented via indirect buffers with all the arsenal
of display-related tricks and hacks that Emacs lets you play with.
IME, you cannot possibly envision most, let alone all, of the
complications that the existing display features impose on something
like that.
And we didn't even start talking about performance, of which this
implementation will surely be a killer, except in very small buffers.
Something that at first sight already looks as going against the
current design of redisplay is simply not worth the time. For such
fundamental features, "almost works" is really another way of saying
"broken". If it isn't clear how to make it work "perfectly" now,
before all the complications are known, you can be sure there will be
unsolvable problems once work will have begun in earnest.
So I suggest to step back a notch, and try looking for ideas to
implement these features in a way that doesn't require different
buffers to share text. E.g., even manually keeping several separate
buffers in sync by updating their text when it changes in one of them,
sounds like an easier way. Emacs is very good at inserting and
deleting chunks of text into/from a buffer, and from what I've read,
all the major problems Vitalie complained about will be miraculously
solved. It should be easy to implement a prototype in Lisp, and if it
turns out it is too slow (which I sincerely doubt), we could add some
simple infrastructure in C to speed that up.
next prev parent reply other threads:[~2014-06-08 16:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-08 15:53 bug#17738: 24.4.50; (jit-lock-mode nil) in indirect buffer: wrong message Drew Adams
2014-06-08 16:39 ` Eli Zaretskii [this message]
2014-06-09 10:49 ` Indirect buffers Phillip Lord
2014-06-09 14:41 ` Eli Zaretskii
2016-04-29 20:44 ` bug#17738: 24.4.50; (jit-lock-mode nil) in indirect buffer: wrong message Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83egyz2w4q.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=spinuvit@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.