* unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
@ 2018-05-27 11:14 Van L
2018-05-27 16:24 ` Aaron Ecay
0 siblings, 1 reply; 8+ messages in thread
From: Van L @ 2018-05-27 11:14 UTC (permalink / raw)
To: org-mode-email
Hello.
Is it possible to edit a buffer in org mode
and its indirect-buffer in fundamental mode
without losing pretty printing in the org mode base buffer?
At the indirect-buffer, I switch to fundamental mode and
that causes the base buffer in org mode to
lose the pretty printing for superscript, subscript.
The two mode lines are set: org mode and fundamental mode.
I drop into fundamental mode to adjust the curly braces for
super/subscripting and want to see the changes in the base buffer
in org mode.
I use the following to create the indirect buffer.
clone-indirect-buffer-other-window
Org mode version 9.1.9
GNU Emacs 26.1-rc1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
2018-05-27 11:14 unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode Van L
@ 2018-05-27 16:24 ` Aaron Ecay
2018-05-27 19:50 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Aaron Ecay @ 2018-05-27 16:24 UTC (permalink / raw)
To: Van L, org-mode-email
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
2018-05-27 16:24 ` Aaron Ecay
@ 2018-05-27 19:50 ` Nicolas Goaziou
2018-05-27 20:37 ` Aaron Ecay
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2018-05-27 19:50 UTC (permalink / raw)
To: Van L; +Cc: org-mode-email
Hello,
Aaron Ecay <aaronecay@gmail.com> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
2018-05-27 19:50 ` Nicolas Goaziou
@ 2018-05-27 20:37 ` Aaron Ecay
2018-05-27 20:53 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Aaron Ecay @ 2018-05-27 20:37 UTC (permalink / raw)
To: Nicolas Goaziou, Van L; +Cc: org-mode-email
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
2018-05-27 20:37 ` Aaron Ecay
@ 2018-05-27 20:53 ` Nicolas Goaziou
2018-05-28 15:32 ` Aaron Ecay
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2018-05-27 20:53 UTC (permalink / raw)
To: Van L; +Cc: org-mode-email
Aaron Ecay <aaronecay@gmail.com> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
2018-05-27 20:53 ` Nicolas Goaziou
@ 2018-05-28 15:32 ` Aaron Ecay
2018-05-30 11:40 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Aaron Ecay @ 2018-05-28 15:32 UTC (permalink / raw)
To: Nicolas Goaziou, Van L; +Cc: org-mode-email
Hi Nicolas,
2018ko maiatzak 27an, Nicolas Goaziou-ek idatzi zuen:
>
> Aaron Ecay <aaronecay@gmail.com> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
2018-05-28 15:32 ` Aaron Ecay
@ 2018-05-30 11:40 ` Nicolas Goaziou
2018-05-31 3:24 ` Van L
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2018-05-30 11:40 UTC (permalink / raw)
To: Van L; +Cc: org-mode-email
Hello,
Aaron Ecay <aaronecay@gmail.com> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
2018-05-30 11:40 ` Nicolas Goaziou
@ 2018-05-31 3:24 ` Van L
0 siblings, 0 replies; 8+ messages in thread
From: Van L @ 2018-05-31 3:24 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: org-mode-email
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-05-31 3:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-27 11:14 unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode Van L
2018-05-27 16:24 ` Aaron Ecay
2018-05-27 19:50 ` Nicolas Goaziou
2018-05-27 20:37 ` Aaron Ecay
2018-05-27 20:53 ` Nicolas Goaziou
2018-05-28 15:32 ` Aaron Ecay
2018-05-30 11:40 ` Nicolas Goaziou
2018-05-31 3:24 ` Van L
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).