Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-30 Thread Van L


> Nicolas Goaziou writes:
> 
> I assume you mean that sub/superscript markers are hidden (i.e.,
> relevant configuration settings for WYSIWYG).
> 
> But in what cases do users need to edit the textual markup? Can they be
> avoided ?

I use the markup to help read language with differing variations in sounds, 
graphs and meaning.

The following is an example. Now I always enclose sup/subscripts with the curly 
braces to lessen the chances of WYSIWYG dropping out. And, in that case, I 
would need to edit the textual markup. Sometimes the markup mechanism won’t let 
me switch from sup/subscript appending to the end of the line.

#+BEGIN_EXAMPLE
  - 我永远感激郭先生对我在学术上的启迪和指导。

I will always feel my teacher showed me the way at school.

我^wo3_ngo5^{*1* I}_{*2* me}^{*3* my}
永^yong3_wing5^{(_streams flow forever_)}_forever^always_perpetual
远^yuan3_yun5^{(/robe/ moving)}_far^distant_remote^{by far intensifier}_much 
*1* forever *2* eternal
感^gan3_gam2^{(/salty/ mind-heart)}_{(_seeing_ /sounding/ meaning)}^{to 
feel}_{to move}^{to touch}_{to affect}^feeling_emotion^{sense of …}
激^ji1_gik1^{(_flowing water_ /clear-bright/)} *1* to be grateful *2* to 
appreciate *3* thankful
郭^guo1_gwok3^23_30^{_/city/ on hill_}_{city wall}^{family name}
先^xian1_sin1
生^sheng1_saang1 teacher
对^dui4_deui3
我^wo3_ngo5 assessed me
在^zai4_joi6^at
学^xue2_hok6^school
术^shu4_seut6
上^shang4_seung5
的^de5_dik1
启^qi3_kai2^78_8^{(_door opening open_)}
迪^di2_dik6^113_9^{(_move to low hanging fruit_)} to enlighten
和^he4_wo4^{(_grain and mouth_)}
指^zhi3_ji2
导^dao3_dou6 *1* to guide *2* to give directions *3* to direct *4* to coach 
*5* guidance *6* tuition

#+END_EXAMPLE




Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-30 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> +1 on this idea from me.

I created a "next" branch that we can merge in master once we're out
feature freeze.

> I describe the problem as: Org tries to be slightly WYSIWYG in terms of
> subscripts (with the relevant configuration settings).  But the facade
> over the underlying textual markup is imperfect.  Users sometimes need
> to edit the textual markup.

I assume you mean that sub/superscript markers are hidden (i.e.,
relevant configuration settings for WYSIWYG).

But in what cases do users need to edit the textual markup? Can they be
avoided ?

> The patch I created is based on a very similar emacs feature
> (prettify-symbols-mode).  (Unlike the org feature, the emacs feature
> only font-locks a static list of strings; it doesnʼt handle subscripts
> where the content to be font-locked can vary).  Once org supports emacs
> 25+ only (is it actually the case already?),

We officially support Emacs 24.3, even though at least Emacs 24.4 is
expected.

> I think it would be a good idea to replace the org-entities
> font-locking with the emacs built-in feature. Then my patch could
> extend that for subscripts (and we could recycle the core emacs
> defcustoms which control the featureʼs optionality, rather than
> needing our own).

About entities, we need to be able to distinguish between users entities
unrelated to Org, and the fixed set of entities in Org. Otherwise, if
can re-use code from Emacs, I'm all for it.

Regards,

-- 
Nicolas Goaziou



Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-28 Thread Aaron Ecay
Hi Nicolas,

2018ko maiatzak 27an, Nicolas Goaziou-ek idatzi zuen:
> 
> Aaron Ecay  writes:
> 
>> Of course, done in c32938b7f.  I did not realize how the freeze for 9.2
>> was working.
> 
> Thank you.
> 
> BTW, I'm considering creating a "next" branch for pending patches that
> I'm refraining to push to master. It could help moving forward.

+1 on this idea from me.


> 
> We can of course discuss it on the ML, but it would be nice to make
> clear what is the problem to solve first.

I describe the problem as: Org tries to be slightly WYSIWYG in terms of
subscripts (with the relevant configuration settings).  But the facade
over the underlying textual markup is imperfect.  Users sometimes need
to edit the textual markup.

The patch I created is based on a very similar emacs feature
(prettify-symbols-mode).  (Unlike the org feature, the emacs feature
only font-locks a static list of strings; it doesnʼt handle subscripts
where the content to be font-locked can vary).  Once org supports emacs
25+ only (is it actually the case already?), I think it would be a good
idea to replace the org-entities font-locking with the emacs built-in
feature.  Then my patch could extend that for subscripts (and we could
recycle the core emacs defcustoms which control the featureʼs
optionality, rather than needing our own).

-- 
Aaron Ecay



Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-27 Thread Nicolas Goaziou
Aaron Ecay  writes:

> Of course, done in c32938b7f.  I did not realize how the freeze for 9.2
> was working.

Thank you.

BTW, I'm considering creating a "next" branch for pending patches that
I'm refraining to push to master. It could help moving forward.

>> However, your fix is not great at all. It was discussed on this ML,
>> about square brackets in links: it causes "jumpings" during editing,
>> which some users, including me, find annoying. Even if it was optional,
>> it would need to be discussed beforehand.
>
> I must have missed that discussion.  I would say that the “jump” in
> this case is only three characters,

Not at all. If you're fontifying sub/superscripts, it changes size of
the whole script (e.g., a_{0123456789}), so it can be obnoxious.

Besides, even if a single character changes its size, the whole line
"jumps". This is distracting.

> whereas for links it is much more (as the whole link becomes un- and
> re-hidden).

Actually, that was only square brackets around the link, not the link
itself, so there was really 2 characters involved. But, see above.

> I would not like links to work this way, but for foo-scripts I found
> it to be quite natural in my testing. So I hope that we can discuss it
> (as an optional feature, certainly) once 9.2 is out.

We can of course discuss it on the ML, but it would be nice to make
clear what is the problem to solve first.



Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-27 Thread Aaron Ecay
Hi Nicolas,

2018ko maiatzak 27an, Nicolas Goaziou-ek idatzi zuen:

[...]

> 
> Also, we are in feature freeze for Org 9.2, so this would need, in any
> case, to wait for the release.
> 
> As a consequence, would you mind reverting the patches related to this
> feature?

Of course, done in c32938b7f.  I did not realize how the freeze for 9.2
was working.

> 
> However, your fix is not great at all. It was discussed on this ML,
> about square brackets in links: it causes "jumpings" during editing,
> which some users, including me, find annoying. Even if it was optional,
> it would need to be discussed beforehand.

I must have missed that discussion.  I would say that the “jump” in
this case is only three characters, whereas for links it is much more
(as the whole link becomes un- and re-hidden).  I would not like links
to work this way, but for foo-scripts I found it to be quite natural in
my testing.  So I hope that we can discuss it (as an optional feature,
certainly) once 9.2 is out.

-- 
Aaron Ecay



Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-27 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> OTOH, we need to provide a way to edit those curly braces.  I have just
> pushed commit 102832e66 to the master branch.  That will cause any
> sub/superscript under the point to have its font lock properties
> removed, so that the braces will become visible for editing.  It is
> modeled after a similar feature in emacs built-in
> prettify-symbols-mode.
>
> So, I think that should address your usecase.

As far as the initial problem is concerned, this is an issue with
indirect buffers, a feature that is not well considered even by Emacs
developers. It has clear limitations.

On the other hand, I agree that editing sub/superscripts is not optimal.
In particular, hiding braces and using skeleton pairs for curly brackets
is not a nice editing experience. It would be nice if we could make it
smoother.

However, your fix is not great at all. It was discussed on this ML,
about square brackets in links: it causes "jumpings" during editing,
which some users, including me, find annoying. Even if it was optional,
it would need to be discussed beforehand.

Also, we are in feature freeze for Org 9.2, so this would need, in any
case, to wait for the release.

As a consequence, would you mind reverting the patches related to this
feature?

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-27 Thread Aaron Ecay
Hi Van,

What you describe is fragile and should not work.

OTOH, we need to provide a way to edit those curly braces.  I have just
pushed commit 102832e66 to the master branch.  That will cause any
sub/superscript under the point to have its font lock properties
removed, so that the braces will become visible for editing.  It is
modeled after a similar feature in emacs built-in
prettify-symbols-mode.

So, I think that should address your usecase.

Thanks for raising the issue.

-- 
Aaron Ecay