unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-01  3:46 org-mode 9.6 and Emacs Built from Git HEAD T.V Raman
@ 2022-12-01  1:31 ` Ihor Radchenko
  2022-12-01 15:01   ` T.V Raman
  2022-12-01  7:30 ` Eli Zaretskii
  1 sibling, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2022-12-01  1:31 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

"T.V Raman" <raman@google.com> writes:

> How exactly would I debug this? Started happening after switching to
> the recently released org-mode 9.6

Do you fiddle with char-property-alias-alist? That's what Org now uses
for hiding links.

A more general suggestion is bisecting.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



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

* org-mode 9.6 and Emacs Built from Git HEAD
@ 2022-12-01  3:46 T.V Raman
  2022-12-01  1:31 ` Ihor Radchenko
  2022-12-01  7:30 ` Eli Zaretskii
  0 siblings, 2 replies; 17+ messages in thread
From: T.V Raman @ 2022-12-01  3:46 UTC (permalink / raw)
  To: emacs-devel

Trying to and failing to debug an org issue with/without my settings:

1. With  emacs -q and emacspeak loaded, links in org-buffers show up
   correctly when using "descriptive" ie org-link-descriptive set to
   T, the URL portion of org links is correctly hidden.

2. But when I do the same with my customizations from custom loaed,
   the links show up in their raw form.

How exactly would I debug this? Started happening after switching to
the recently released org-mode 9.6


-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-01  3:46 org-mode 9.6 and Emacs Built from Git HEAD T.V Raman
  2022-12-01  1:31 ` Ihor Radchenko
@ 2022-12-01  7:30 ` Eli Zaretskii
  1 sibling, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2022-12-01  7:30 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

> Date: Wed, 30 Nov 2022 19:46:05 -0800
> From: "T.V Raman" <raman@google.com>
> 
> Trying to and failing to debug an org issue with/without my settings:
> 
> 1. With  emacs -q and emacspeak loaded, links in org-buffers show up
>    correctly when using "descriptive" ie org-link-descriptive set to
>    T, the URL portion of org links is correctly hidden.
> 
> 2. But when I do the same with my customizations from custom loaed,
>    the links show up in their raw form.
> 
> How exactly would I debug this? Started happening after switching to
> the recently released org-mode 9.6

I suggest to ask this on the Org list first.



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-01 16:15     ` T.V Raman
@ 2022-12-01 11:48       ` Ihor Radchenko
  2022-12-01 21:31         ` T.V Raman
  2022-12-04  3:37         ` T.V Raman
  0 siblings, 2 replies; 17+ messages in thread
From: Ihor Radchenko @ 2022-12-01 11:48 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

"T.V Raman" <raman@google.com> writes:

> For org-mode folks: could you point me at what to implement  to get the
> text-property version  at my end; typically means I need to understand
> what makes things invisible and have that make things inaudible.

See `org-fold-core-region'.

The basic idea: we make use of 'invisible text property.
The value of 'invisible text property is actually set via other
properties that are linked to 'invisible via
`char-property-alias-alist'.
Links in particular are making use of a combination of two 'invisible
values: one set to be hidden via `buffer-invisibility-spec' and the other
is set to be displayed.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-01  1:31 ` Ihor Radchenko
@ 2022-12-01 15:01   ` T.V Raman
  2022-12-01 16:15     ` T.V Raman
  0 siblings, 1 reply; 17+ messages in thread
From: T.V Raman @ 2022-12-01 15:01 UTC (permalink / raw)
  To: yantar92; +Cc: raman, emacs-devel


Not directly -- just did a quick check.
Still mysterious since emacs -q with emacspeak doesn't exhibit the
problem.

I went back to emacs 29 and still see the problem, so it's somewhere
in org.

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-01 15:01   ` T.V Raman
@ 2022-12-01 16:15     ` T.V Raman
  2022-12-01 11:48       ` Ihor Radchenko
  0 siblings, 1 reply; 17+ messages in thread
From: T.V Raman @ 2022-12-01 16:15 UTC (permalink / raw)
  To: yantar92; +Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 786 bytes --]

"T.V Raman" <raman@google.com> writes:
I found  the cause and the temporary fix for emacspeak is to set 
'(org-fold-core-style 'overlays)

For org-mode folks: could you point me at what to implement  to get the
text-property version  at my end; typically means I need to understand
what makes things invisible and have that make things inaudible.


> Not directly -- just did a quick check.
> Still mysterious since emacs -q with emacspeak doesn't exhibit the
> problem.
>
> I went back to emacs 29 and still see the problem, so it's somewhere
> in org.
>
> -- 
>
> Thanks,
>
> --Raman(I Search, I Find, I Misplace, I Research)
> 7©4 Id: kg:/m/0285kf1  •0Ü8

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-01 11:48       ` Ihor Radchenko
@ 2022-12-01 21:31         ` T.V Raman
  2022-12-02  5:08           ` Ihor Radchenko
  2022-12-04  3:37         ` T.V Raman
  1 sibling, 1 reply; 17+ messages in thread
From: T.V Raman @ 2022-12-01 21:31 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 455 bytes --]

also for org developers:

The documentation for the org-fold customization says "use overlays for
third party packages that haven't updated support" or something to that
effect.

Would be nice from  a discoverability point of view for it to say right
there, or provide a pointer to something that says what third-parties
should actually do.

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-01 21:31         ` T.V Raman
@ 2022-12-02  5:08           ` Ihor Radchenko
       [not found]             ` <25482.2636.186975.666369@retriever.mtv.corp.google.com>
  0 siblings, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2022-12-02  5:08 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

"T.V Raman" <raman@google.com> writes:

> also for org developers:
>
> The documentation for the org-fold customization says "use overlays for
> third party packages that haven't updated support" or something to that
> effect.
>
> Would be nice from  a discoverability point of view for it to say right
> there, or provide a pointer to something that says what third-parties
> should actually do.

Please check ORG-NEWS. "Important announcements and breaking changes"
section.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
       [not found]               ` <87zgc6jfr1.fsf@localhost>
@ 2022-12-02 15:09                 ` T.V Raman
  0 siblings, 0 replies; 17+ messages in thread
From: T.V Raman @ 2022-12-02 15:09 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1069 bytes --]

I think I made some progress chasing this down:

1. Problem: With Emacspeak as implemented, org-fold-core-style set to
   text-properties  results in hidden links being spoken.

2. The underlying cause appears to be how  copying such text into
   another buffer works.

3. Emacspeak implements its core speech logic by copying over what is to
   be spoken (text) to a scratch buffer, pre-processing it, and then
   doing its work.

4. The "invisibility" gets lost in the new org fold implementation.

See here for the relevant logic and code.

I verified that the copy/insert  to be the problem by:

A. Open an org file with a link in it with org-fold-core-style set to
   text-properties.
B. Set mark and do 
M-: (setq text (buffer-substring (point) (mark)))
C. Switch to a new buffer "foo"
M-: (insert-for-yank text)D. Insert: 
E. Move point to the portion of the link that should be hidden and  do
M-: (invisible-p (point)) Returns nil.
-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-01 11:48       ` Ihor Radchenko
  2022-12-01 21:31         ` T.V Raman
@ 2022-12-04  3:37         ` T.V Raman
  2022-12-05  4:13           ` T.V Raman
  2022-12-07 12:28           ` Ihor Radchenko
  1 sibling, 2 replies; 17+ messages in thread
From: T.V Raman @ 2022-12-04  3:37 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1027 bytes --]

Hi Ihor,

After looking through the code in org-fold-core.el,
I see the following:

org-fold-core.el: Line 1413

The comments in that section talk about preserving/not-preserving
folding when copying among indirect buffers.

But the lines at the afore-mentioned position indicate that the solution
for how to do this  when  pasting to a non-indirect buffer.

Note that emacspeak needs  a solution to the above,  --- at present,
when it tries to speak a folded line in org-9.6 with org-fold-core-style
set to text-properties, the invisibility gets lost, which is why content
that is folded in the original buffer gets spoken by emacspeak.

While we wait for a clean way for a third-party app to handle this, can
you tell me what I need to do on my end, e.g. perhaps inherit some magic
property from the source buffer into the scratch buffer where I
manipulate the text before speaking it perhaps?



-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-04  3:37         ` T.V Raman
@ 2022-12-05  4:13           ` T.V Raman
  2022-12-07 12:29             ` Ihor Radchenko
  2022-12-07 12:28           ` Ihor Radchenko
  1 sibling, 1 reply; 17+ messages in thread
From: T.V Raman @ 2022-12-05  4:13 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1888 bytes --]


Hi Ihor,

Could you please this to the relevant folks on the org devel team?

I solved my issue with org folding in org-9.6 when org-fold-core-style
is set to transparencies -- TL;DR:

I created myself a small function by cloning function org-mode and
taking out most of the code so that what I had left were the bits that
set up org-fold magic; I then call this function in my code where I
create a temporary buffer for processing the text to speak. 

A better solution might be for org itself to provide such a function; my
initial solution was to just call (org-mode) but that function does a
lot of work that isn't needed just to set up the fold hiding bits.

See
https://github.com/tvraman/emacspeak/blob/master/lisp/dtk-speak.el#L1662
for the relevant code.

"T.V Raman" <raman@google.com> writes:
> Hi Ihor,
>
> After looking through the code in org-fold-core.el,
> I see the following:
>
> org-fold-core.el: Line 1413
>
> The comments in that section talk about preserving/not-preserving
> folding when copying among indirect buffers.
>
> But the lines at the afore-mentioned position indicate that the solution
> for how to do this  when  pasting to a non-indirect buffer.
>
> Note that emacspeak needs  a solution to the above,  --- at present,
> when it tries to speak a folded line in org-9.6 with org-fold-core-style
> set to text-properties, the invisibility gets lost, which is why content
> that is folded in the original buffer gets spoken by emacspeak.
>
> While we wait for a clean way for a third-party app to handle this, can
> you tell me what I need to do on my end, e.g. perhaps inherit some magic
> property from the source buffer into the scratch buffer where I
> manipulate the text before speaking it perhaps?

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-04  3:37         ` T.V Raman
  2022-12-05  4:13           ` T.V Raman
@ 2022-12-07 12:28           ` Ihor Radchenko
  1 sibling, 0 replies; 17+ messages in thread
From: Ihor Radchenko @ 2022-12-07 12:28 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

"T.V Raman" <raman@google.com> writes:

> While we wait for a clean way for a third-party app to handle this, can
> you tell me what I need to do on my end, e.g. perhaps inherit some magic
> property from the source buffer into the scratch buffer where I
> manipulate the text before speaking it perhaps?

Maybe just a simple `org-copy-visible'?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-05  4:13           ` T.V Raman
@ 2022-12-07 12:29             ` Ihor Radchenko
       [not found]               ` <25488.44727.272656.782779@retriever.mtv.corp.google.com>
  0 siblings, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2022-12-07 12:29 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

"T.V Raman" <raman@google.com> writes:

> Could you please this to the relevant folks on the org devel team?

I am the relevant guy :)
Sorry for the delay, I am moving countries now.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
       [not found]                                 ` <87edt97qtt.fsf@localhost>
@ 2022-12-18  4:12                                   ` T.V Raman
  2022-12-18 12:56                                     ` Ihor Radchenko
  2022-12-19  3:24                                     ` T.V Raman
  0 siblings, 2 replies; 17+ messages in thread
From: T.V Raman @ 2022-12-18  4:12 UTC (permalink / raw)
  To: yantar92; +Cc: raman, emacs-devel

This may be an org-mode bug:

If you have '_' chars in a URL, they dont appear to turn invisible in
org mode :

Try as an example
put  this  in an org buffer:

for my [[http://awards.acm.org/award_winners/raman_4110221.cfm][PhD]].
This release

Notice that the parts with '_' remain visible.
Turn the '_' into a '-' and org folding appears to do the right thing.

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-18  4:12                                   ` T.V Raman
@ 2022-12-18 12:56                                     ` Ihor Radchenko
  2022-12-19  3:25                                       ` T.V Raman
  2022-12-19  3:24                                     ` T.V Raman
  1 sibling, 1 reply; 17+ messages in thread
From: Ihor Radchenko @ 2022-12-18 12:56 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

"T.V Raman" <raman@google.com> writes:

> Try as an example
> put  this  in an org buffer:
>
> for my [[http://awards.acm.org/award_winners/raman_4110221.cfm][PhD]].
> This release
>
> Notice that the parts with '_' remain visible.
> Turn the '_' into a '-' and org folding appears to do the right thing.

I am unable to reproduce using Org 9.6 and emacs -Q.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-18  4:12                                   ` T.V Raman
  2022-12-18 12:56                                     ` Ihor Radchenko
@ 2022-12-19  3:24                                     ` T.V Raman
  1 sibling, 0 replies; 17+ messages in thread
From: T.V Raman @ 2022-12-19  3:24 UTC (permalink / raw)
  To: raman; +Cc: yantar92, emacs-devel

Suspect this time it's being caused by some other org or other
package, doesn't repro with emacspeak -q either.

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



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

* Re: org-mode 9.6 and Emacs Built from Git HEAD
  2022-12-18 12:56                                     ` Ihor Radchenko
@ 2022-12-19  3:25                                       ` T.V Raman
  0 siblings, 0 replies; 17+ messages in thread
From: T.V Raman @ 2022-12-19  3:25 UTC (permalink / raw)
  To: yantar92; +Cc: raman, emacs-devel

Doesn't repro with emacspeak -q either --- so this time it's must be
some other package I have that's biting.


-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



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

end of thread, other threads:[~2022-12-19  3:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-01  3:46 org-mode 9.6 and Emacs Built from Git HEAD T.V Raman
2022-12-01  1:31 ` Ihor Radchenko
2022-12-01 15:01   ` T.V Raman
2022-12-01 16:15     ` T.V Raman
2022-12-01 11:48       ` Ihor Radchenko
2022-12-01 21:31         ` T.V Raman
2022-12-02  5:08           ` Ihor Radchenko
     [not found]             ` <25482.2636.186975.666369@retriever.mtv.corp.google.com>
     [not found]               ` <87zgc6jfr1.fsf@localhost>
2022-12-02 15:09                 ` T.V Raman
2022-12-04  3:37         ` T.V Raman
2022-12-05  4:13           ` T.V Raman
2022-12-07 12:29             ` Ihor Radchenko
     [not found]               ` <25488.44727.272656.782779@retriever.mtv.corp.google.com>
     [not found]                 ` <878rjintu4.fsf@localhost>
     [not found]                   ` <25489.63879.848634.401102@retriever.mtv.corp.google.com>
     [not found]                     ` <87mt7y6ief.fsf@localhost>
     [not found]                       ` <25490.266.362467.616997@retriever.mtv.corp.google.com>
     [not found]                         ` <87k0317w2e.fsf@localhost>
     [not found]                           ` <25490.4343.137735.654592@retriever.mtv.corp.google.com>
     [not found]                             ` <87h6y57t0y.fsf@localhost>
     [not found]                               ` <25490.6757.786967.103592@retriever.mtv.corp.google.com>
     [not found]                                 ` <87edt97qtt.fsf@localhost>
2022-12-18  4:12                                   ` T.V Raman
2022-12-18 12:56                                     ` Ihor Radchenko
2022-12-19  3:25                                       ` T.V Raman
2022-12-19  3:24                                     ` T.V Raman
2022-12-07 12:28           ` Ihor Radchenko
2022-12-01  7:30 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).