Re: Should we extend org-catch-invisible-edits to more interactive commands? (was: Catching invisible edits: problem understanding doc)

2023-02-11 Thread Alain . Cochard
Ihor Radchenko writes on Sat 11 Feb 2023 18:22:

 > We can indeed at such warning, but it will probably be not very
 > helpful.

I don't understand this.  And isn't it better to have a more accurate
manual anyway?

Apart from that, since the default value in 9.6 is 'smart' ('nil' in
9.5), I wonder if the sentence

   "Setting ‘org-fold-catch-invisible-edits’ to non-‘nil’ helps
   preventing this."

is still the most appropriate.

Also, this is another instance where 'C-h v' with the cursor on
'org-fold-catch-invisible-edits' does not offer it right away in the
minibuffer.  I am surprised since it does so in 9.5 (with
'org-catch-invisible-edit').

 > Only typing, deleting char forward/backward and meta-return are
 > considering invisible edits now.

Thanks.  It is helpful to me to know that.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: Should we extend org-catch-invisible-edits to more interactive commands? (was: Catching invisible edits: problem understanding doc)

2023-02-11 Thread Ihor Radchenko
alain.coch...@unistra.fr writes:

> At any rate, shouldn't "2.2.3 Catching invisible edits" be a little
> bit more specific about what kind of invisible edits are concerned?
> Or perhaps just a warning that it is not all of them.

We can indeed at such warning, but it will probably be not very helpful.
Only typing, deleting char forward/backward and meta-return are
considering invisible edits now.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Should we extend org-catch-invisible-edits to more interactive commands? (was: Catching invisible edits: problem understanding doc)

2023-02-11 Thread Alain . Cochard
Ihor Radchenko writes on Fri 10 Feb 2023 09:56:

 > Only a handful of interactive commands support invisible edit
 > checks. In particular: self-insert-command (typing), deleting char
 > forward/backward, and `org-meta-return'.
 > 
 > I guess we may instead provide a defcustom and hook the check into
 > `pre-command-hook'. Would it be of interest?

Thank you for the feedback.  Let me add that the issue I raised was
not at all a theoretical/abstract one for me.  I constantly use 'undo'
to see where in the buffer I was working (then, I insert a space, do
'undo undo', and can resume what I was doing).  So obviously it would
be of a huge interest for me if org-catch-invisible-edits worked in
that case...

At any rate, shouldn't "2.2.3 Catching invisible edits" be a little
bit more specific about what kind of invisible edits are concerned?
Or perhaps just a warning that it is not all of them.



 > > PS: a very minor incidental point: after 'bar' has disappeared, the
 > > headline is then void, so I tend to say that the ellipsis should
 > > immediately disappear as well.
 > 
 > The headline still contains newlines.

Right.  Thanks.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Should we extend org-catch-invisible-edits to more interactive commands? (was: Catching invisible edits: problem understanding doc)

2023-02-10 Thread Ihor Radchenko
alain.coch...@unistra.fr writes:

>M-x undo
>
> I visually see no change, but I can observe by unfolding the headline
> that 'bar' has disappeared.  In my understanding of the documentation
> above and of the docstring for org-fold-catch-invisible-edits, this
> should only happen with 'nil'.
>
> What am I understanding incorrectly?  Thank you.

Only a handful of interactive commands support invisible edit checks. In
particular: self-insert-command (typing), deleting char
forward/backward, and `org-meta-return'.

I guess we may instead provide a defcustom and hook the check into
`pre-command-hook'. Would it be of interest?

> PS: a very minor incidental point: after 'bar' has disappeared, the
> headline is then void, so I tend to say that the ellipsis should
> immediately disappear as well.

The headline still contains newlines.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at