unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* failing creating multiple indirect org buffers .
@ 2024-03-01  7:47 Alexandros Prekates
  2024-03-01  8:23 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandros Prekates @ 2024-03-01  7:47 UTC (permalink / raw)
  To: help-gnu-emacs

In emacs 29  M-x clone-indirect-buffer will work only once.
So lets say i have a Base buffer and a CloneA .
If i try to create a new clone on Base i will get a new buffer but it
will behave like CloneA.

Also M-x make-indirect-buffer creates new buffers but
the are not visible in the GUI buffer list and also
if visited with C-x C-b they appear in fundamental mode
and not in Org mode.

Alexandros.



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

* Re: failing creating multiple indirect org buffers .
  2024-03-01  7:47 failing creating multiple indirect org buffers Alexandros Prekates
@ 2024-03-01  8:23 ` Eli Zaretskii
  2024-03-01  8:47   ` Alexandros Prekates
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-03-01  8:23 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Fri,  1 Mar 2024 07:47:52 +0000
> From: Alexandros Prekates <aprekates@posteo.net>
> 
> In emacs 29  M-x clone-indirect-buffer will work only once.
> So lets say i have a Base buffer and a CloneA .
> If i try to create a new clone on Base i will get a new buffer but it
> will behave like CloneA.

What do you mean by "behave like CloneA"?

> Also M-x make-indirect-buffer creates new buffers but
> the are not visible in the GUI buffer list

What command do you use to show the buffer list?  The default binding
of "C-x C-b", which invokes list-buffers, does show indirect buffers
created by make-indirect-buffer.

> and also if visited with C-x C-b they appear in fundamental mode and
> not in Org mode.

That's the intended behavior.  If you want the indirect buffer to have
the same mode as its base buffer, use clone-indirect-buffer instead.



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

* Re: failing creating multiple indirect org buffers .
  2024-03-01  8:23 ` Eli Zaretskii
@ 2024-03-01  8:47   ` Alexandros Prekates
  2024-03-02  7:47     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandros Prekates @ 2024-03-01  8:47 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, 01 Mar 2024 10:23:13 +0200
Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Fri,  1 Mar 2024 07:47:52 +0000
> > From: Alexandros Prekates <aprekates@posteo.net>
> > 
> > In emacs 29  M-x clone-indirect-buffer will work only once.
> > So lets say i have a Base buffer and a CloneA .
> > If i try to create a new clone on Base i will get a new buffer but
> > it will behave like CloneA.
> 
> What do you mean by "behave like CloneA"?

Speaking of Org files i mean that trying to create a CloneB of the
Base will not have it's own heading's folding but mirrow that of
the CloneA or Base. 

> 
> > Also M-x make-indirect-buffer creates new buffers but
> > the are not visible in the GUI buffer list
> 
> What command do you use to show the buffer list?  The default binding
> of "C-x C-b", which invokes list-buffers, does show indirect buffers
> created by make-indirect-buffer.

Yes. I meant the GUI buffer list. If i use M-x clone-indirect-buffer 
then the new buffers will be listed in the GUI buffer top menu.
But M-x make-indirect-buffer new buffers wont.

> 
> > and also if visited with C-x C-b they appear in fundamental mode and
> > not in Org mode.
> 
> That's the intended behavior.  If you want the indirect buffer to have
> the same mode as its base buffer, use clone-indirect-buffer instead.
>
I didnt knew this. Thanks.

Alexandros. 




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

* Re: failing creating multiple indirect org buffers .
  2024-03-01  8:47   ` Alexandros Prekates
@ 2024-03-02  7:47     ` Eli Zaretskii
  2024-03-03  1:07       ` Michael Heerdegen via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-03-02  7:47 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Fri,  1 Mar 2024 08:47:31 +0000
> From: Alexandros Prekates <aprekates@posteo.net>
> 
> On Fri, 01 Mar 2024 10:23:13 +0200
> Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > Date: Fri,  1 Mar 2024 07:47:52 +0000
> > > From: Alexandros Prekates <aprekates@posteo.net>
> > > 
> > > In emacs 29  M-x clone-indirect-buffer will work only once.
> > > So lets say i have a Base buffer and a CloneA .
> > > If i try to create a new clone on Base i will get a new buffer but
> > > it will behave like CloneA.
> > 
> > What do you mean by "behave like CloneA"?
> 
> Speaking of Org files i mean that trying to create a CloneB of the
> Base will not have it's own heading's folding but mirrow that of
> the CloneA or Base. 

Isn't that expected?  That's what clone-indirect-buffer is about, I
think.

> > > Also M-x make-indirect-buffer creates new buffers but
> > > the are not visible in the GUI buffer list
> > 
> > What command do you use to show the buffer list?  The default binding
> > of "C-x C-b", which invokes list-buffers, does show indirect buffers
> > created by make-indirect-buffer.
> 
> Yes. I meant the GUI buffer list. If i use M-x clone-indirect-buffer 
> then the new buffers will be listed in the GUI buffer top menu.
> But M-x make-indirect-buffer new buffers wont.

In "emacs -Q"?  If so, I cannot reproduce this.



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

* Re: failing creating multiple indirect org buffers .
  2024-03-02  7:47     ` Eli Zaretskii
@ 2024-03-03  1:07       ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-03-03  4:15         ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-03-04  8:37         ` Alexandros Prekates
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-03-03  1:07 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

> > Speaking of Org files i mean that trying to create a CloneB of the
> > Base will not have it's own heading's folding but mirrow that of
> > the CloneA or Base. 
>
> Isn't that expected?  That's what clone-indirect-buffer is about, I
> think.

Not really: Org headline folding is implemented using overlays carrying
an 'invisible' overlay property.  So folding could work in indirect
clones independently - because overlays are not shared.

But I am exactly seeing this, actually.  Folding in all indirect clones
works independently for me, even when there are more than 2 clones.  And
even if I clone a clone.  In emacs -Q.

Such things don't work reliably always, however.  For example, when
anything relies on text properties, which are shared, things break.  So
whether things like this work as expected often depends on
implementation details that don't matter in any other situation (and
what the user expects).  Using indirect clones is always an a bit
fragile matter in my experience.


Michael.




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

* Re: failing creating multiple indirect org buffers .
  2024-03-03  1:07       ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-03-03  4:15         ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-03-04  8:37         ` Alexandros Prekates
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-03-03  4:15 UTC (permalink / raw)
  To: help-gnu-emacs

> Using indirect clones is always an a bit fragile matter in
> my experience.

I recommend people stay away from them, indeed.

Using indirect buffers can make sense, but you need the clone to be
setup and controlled by a dedicated package which knows/understands
what is shared, what isn't, and how to accommodate its needs to
those realities.


        Stefan




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

* Re: failing creating multiple indirect org buffers .
  2024-03-03  1:07       ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-03-03  4:15         ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-03-04  8:37         ` Alexandros Prekates
  1 sibling, 0 replies; 7+ messages in thread
From: Alexandros Prekates @ 2024-03-04  8:37 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, 03 Mar 2024 02:07:20 +0100
Michael Heerdegen via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> wrote:

 
> But I am exactly seeing this, actually.  Folding in all indirect
> clones works independently for me, even when there are more than 2
> clones.  And even if I clone a clone.  In emacs -Q.


Unfortunately emacs -Q doesnt change things.

> 
> Such things don't work reliably always, however.  For example, when
> anything relies on text properties, which are shared, things break.
> So whether things like this work as expected often depends on
> implementation details that don't matter in any other situation (and
> what the user expects).  Using indirect clones is always an a bit
> fragile matter in my experience.
> 

Thanks for that insight. 

> 
> Michael.
> 
> 

Alexandros



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

end of thread, other threads:[~2024-03-04  8:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-01  7:47 failing creating multiple indirect org buffers Alexandros Prekates
2024-03-01  8:23 ` Eli Zaretskii
2024-03-01  8:47   ` Alexandros Prekates
2024-03-02  7:47     ` Eli Zaretskii
2024-03-03  1:07       ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-03-03  4:15         ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-03-04  8:37         ` Alexandros Prekates

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).