all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <klaus.berndl@capgemini-sdm.com>
To: <monnier@iro.umontreal.ca>, <eric@siege-engine.com>
Cc: 3018@emacsbugs.donarmstrong.com
Subject: bug#3018: AW: AW: bug#3018: clone-indirect-buffer-hook should be make-indirect-buffer-hook
Date: Sun, 19 Apr 2009 06:55:38 +0200	[thread overview]
Message-ID: <84D8FEFE8D23E94E9C2A6F0C58EE07E314C83B@mucmail3.sdm.de> (raw)
In-Reply-To: jwv1vrqkouh.fsf-monnier+emacsbugreports@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2756 bytes --]

Ah, now i understand - when calling make-indirect-buffer interactively
the clone-arg is always nil... major-mode is fundamental-mode (e.g.),
no overlays are copied ==> the buffer is not setup for semantic...
Just tested - with respect to semantic indirect-buffers made by
make-indirect-buffer are quite useless, because not even the major-mode
is copied, so semantic is in consequence not active for such a non-clone.

Well, so if a user wants a real clone then he must use clone-indirect-buffer.
I have misunderstood this...thanks for explanation.

Well, then it might be ok, only having the clone-indirect-buffer hook because
semantic has only to deal with indirect-buffers which are real clones not with 
that ones created by make-indirect-buffer...

Eric: Now for me the clone-indirect-buffer-hook solution is ok and save.

Topic after-change-function: Stefan, what do you think? Are there chances that this
bug will be fixed in the near future or do have any idea for a practicable work-
around?

Ciao,
Klaus

-----Ursprüngliche Nachricht-----
Von: Stefan Monnier [mailto:monnier@iro.umontreal.ca]
Gesendet: Sa 18.04.2009 19:54
An: Eric M. Ludlam
Cc: Berndl, Klaus; 3018@emacsbugs.donarmstrong.com
Betreff: Re: AW: bug#3018: clone-indirect-buffer-hook should be make-indirect-buffer-hook
 
>   Klaus' explanation is accurate.  Semantic's parsing engine needs to
> have separate tag streams (tracked by overlays) for each buffer.  When
> the clone replicates the overlays and local variables, they share the
> same cons cells in Semantic's tag data structure.  When Semantic then
> incrementally parses the buffer, and splices new tags in, things get a
> bit unreliable.  If the two buffers were in two different modes (ie,
> one of the multi-modes?) with different parsers, I can imagine things
> being even stranger.

Yes, this is a "common" problem, and is the reason why
clone-indirect-buffer-hook was introduced.  If `make-indirect-buffer' is
called with a nil `clone' argument this problem shouldn't show up
(because such a call shouldn't copy the overlays).  So the problem might
only show up when calling `make-indirect-buffer' with a non-nil `clone'
argument without going through clone-indirect-buffer.  When did you come
across such a situation?

>   The after-change function does not seem to be called for all linked
> buffers.  Changing a base buffer doesn't call the same hooks in the
> indirect buffer, and vice-versa.  This means that changes get lost, as
> each buffer appears to need Semantic to track the changes separately.

Indeed, it might be that *-change-functions only get called in the
buffer from which they are performed, which is probably a bug.


        Stefan


[-- Attachment #2: Type: text/html, Size: 3604 bytes --]

  reply	other threads:[~2009-04-19  4:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 15:46 bug#3018: clone-indirect-buffer-hook should be make-indirect-buffer-hook klaus.berndl
2009-04-17  9:53 ` Lennart Borgman
2009-04-17 20:26 ` Stefan Monnier
2009-04-18  8:49   ` bug#3018: AW: " klaus.berndl
2009-04-18 12:56     ` bug#3018: Re[1]: " Eric M. Ludlam
2009-04-18 17:54       ` bug#3018: " Stefan Monnier
2009-04-19  4:55         ` klaus.berndl [this message]
2022-05-01 10:00 ` bug#3018: bug#3038: 23.0.91; after-change-functions and indirect buffers 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=84D8FEFE8D23E94E9C2A6F0C58EE07E314C83B@mucmail3.sdm.de \
    --to=klaus.berndl@capgemini-sdm.com \
    --cc=3018@emacsbugs.donarmstrong.com \
    --cc=eric@siege-engine.com \
    --cc=monnier@iro.umontreal.ca \
    /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.