Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin
Yeah, but it's still getting funky when some init files load the
built-in version.

But nevertheless, I don't seem to see this problem any more.

This bug can be closed.

On Tue, 26 Dec 2023 at 22:30, Ihor Radchenko  wrote:
>
> Vladimir Nikishkin  writes:
>
> > :\ that patch doesn't cleanly apply on top of emacs' master by itself.
> >
> > And I don't know how to merge org's master into Emacs gracefully.
> >
> > I will try with melpa's org, but it's likely to produce a mess with the 
> > configs.
> > Let me see what I can do.
>
> See 
> https://orgmode.org/manual/Installation.html#Using-Org_0027s-git-repository-1
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 



-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Ihor Radchenko
Vladimir Nikishkin  writes:

> :\ that patch doesn't cleanly apply on top of emacs' master by itself.
>
> And I don't know how to merge org's master into Emacs gracefully.
>
> I will try with melpa's org, but it's likely to produce a mess with the 
> configs.
> Let me see what I can do.

See 
https://orgmode.org/manual/Installation.html#Using-Org_0027s-git-repository-1

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



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin
:\ that patch doesn't cleanly apply on top of emacs' master by itself.

And I don't know how to merge org's master into Emacs gracefully.

I will try with melpa's org, but it's likely to produce a mess with the configs.
Let me see what I can do.


On Tue, 26 Dec 2023 at 21:27, Ihor Radchenko  wrote:
>
> Vladimir Nikishkin  writes:
>
> > org-version variable returns 9.6.13
> > (org-version) function call also returns 9.6.13
> >
> > The test.org file itself has the org version stamp.
>
> I see. What about the latest development version of Org mode (main branch)?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 



-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Ihor Radchenko
Vladimir Nikishkin  writes:

> org-version variable returns 9.6.13
> (org-version) function call also returns 9.6.13
>
> The test.org file itself has the org version stamp.

I see. What about the latest development version of Org mode (main branch)?

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



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin
org-version variable returns 9.6.13
(org-version) function call also returns 9.6.13

The test.org file itself has the org version stamp.

On Tue, 26 Dec 2023 at 21:19, Ihor Radchenko  wrote:
>
> Vladimir Nikishkin  writes:
>
> > Logs attached, the file is very simple, also attached:
>
> Looks like a bug fixed in Org 9.6.10:
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=37d6bde27
>
> And you seems to be using Org 9.6.8.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 



-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Ihor Radchenko
Vladimir Nikishkin  writes:

> Logs attached, the file is very simple, also attached:

Looks like a bug fixed in Org 9.6.10:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=37d6bde27

And you seems to be using Org 9.6.8.

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



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin
On Tue, 26 Dec 2023 at 20:20, Ihor Radchenko  wrote:
>
> Vladimir Nikishkin  writes:
>
> >> If you are using the latest main, you can set `debug-on-error' to t.
> >> Then, you will see the backtrace of the error that you can share.
> >
> > Did that, but it's not very useful:
> >
> > #+begin_src elisp
> > Debugger entered--Lisp error: (error "Invalid search bound (wrong side of 
> > point)")
> >   org-element-paragraph-parser(23 (23))
>
> Then, you can disable debug-on-error, and add the following to your config:
> (setq org-element--cache-self-verify 'backtrace)
> (setq org-element--cache-self-verify-frequency 1.0)
>
> This will make Org mode produce the detailed parser logs, which you can
> share. (Note that the log may contain parts of your Org file, so you
> may consider sharing privately or obfuscating the logs)
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 

In which buffer?

-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Ihor Radchenko
Vladimir Nikishkin  writes:

>> If you are using the latest main, you can set `debug-on-error' to t.
>> Then, you will see the backtrace of the error that you can share.
>
> Did that, but it's not very useful:
>
> #+begin_src elisp
> Debugger entered--Lisp error: (error "Invalid search bound (wrong side of 
> point)")
>   org-element-paragraph-parser(23 (23))

Then, you can disable debug-on-error, and add the following to your config:
(setq org-element--cache-self-verify 'backtrace)
(setq org-element--cache-self-verify-frequency 1.0)

This will make Org mode produce the detailed parser logs, which you can
share. (Note that the log may contain parts of your Org file, so you
may consider sharing privately or obfuscating the logs)

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



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin


Ihor Radchenko  writes:

> Vladimir Nikishkin  writes:
>
>> So, this might not actually be the case.
>> I am getting a lot of org-element-cache errors recently, and I don't
>> seem to be able to find what triggers them to appear.
>> The error message is always the same,
>> "Invalid search bound (wrong side of point)"
>>
>> Any ideas on how to debug this?
>
> If you are using the latest main, you can set `debug-on-error' to t.
> Then, you will see the backtrace of the error that you can share.

Did that, but it's not very useful:

#+begin_src elisp
Debugger entered--Lisp error: (error "Invalid search bound (wrong side of 
point)")
  org-element-paragraph-parser(23 (23))
  org-element--current-element(23 element nil nil)
  org-element--parse-to(573 nil nil)
  org-element--cache-process-request([552 552 3010 22 nil 1] nil 3010 nil nil 
nil)
  org-element--cache-sync(# 3010)
  org-element-at-point()
  org-eldoc-get-src-lang()
  org-eldoc-documentation-function(#f(compiled-function (string  plist) 
#))
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #()
  apply(# nil)
  timer-event-handler([t 0 0 50 nil # nil idle 0 nil])
#+end_src

The beginning of the call stack may be different, but the deep levels,
with "org-element--parse-to" are always more or less the same, and
produce the same error.

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Ihor Radchenko
Vladimir Nikishkin  writes:

> So, this might not actually be the case.
> I am getting a lot of org-element-cache errors recently, and I don't
> seem to be able to find what triggers them to appear.
> The error message is always the same,
> "Invalid search bound (wrong side of point)"
>
> Any ideas on how to debug this?

If you are using the latest main, you can set `debug-on-error' to t.
Then, you will see the backtrace of the error that you can share.

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



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin


Vladimir Nikishkin  writes:

> Ihor Radchenko  writes:
>
>> Vladimir Nikishkin  writes:
>>
 May you elaborate about incompatibility?

>>>
>>> Yes. With org-eldoc loaded, and having a property '#+date: unpublished'
>>> in an org file, I am having the '*Messages*' buffer filled with
>>> #+begin_src elisp
>>> ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
>>> 2015_Passwords.org.rclignore::53653. Resetting.
>>>  The error was: (error "Invalid search bound (wrong side of point)")
>>>  Backtrace:
>>> "  backtrace-to-string(nil)
>>>   org-element-at-point()
>>
>> This has nothing to do with eldoc.
>> If you can reproduce this problem consistently, may you create a minimal
>> example as described in https://orgmode.org/manual/Feedback.html#Feedback ?
>
> I found and fixed this problem.
> It was actually unrelated to bare org, it was due to my experiments with
> org-ts-mode. Sorry for the confusion.

So, this might not actually be the case.
I am getting a lot of org-element-cache errors recently, and I don't
seem to be able to find what triggers them to appear.
The error message is always the same,
"Invalid search bound (wrong side of point)"

Any ideas on how to debug this?

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-11-09 Thread Vladimir Nikishkin


Ihor Radchenko  writes:

> Vladimir Nikishkin  writes:
>
>>> May you elaborate about incompatibility?
>>>
>>
>> Yes. With org-eldoc loaded, and having a property '#+date: unpublished'
>> in an org file, I am having the '*Messages*' buffer filled with
>> #+begin_src elisp
>> ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
>> 2015_Passwords.org.rclignore::53653. Resetting.
>>  The error was: (error "Invalid search bound (wrong side of point)")
>>  Backtrace:
>> "  backtrace-to-string(nil)
>>   org-element-at-point()
>
> This has nothing to do with eldoc.
> If you can reproduce this problem consistently, may you create a minimal
> example as described in https://orgmode.org/manual/Feedback.html#Feedback ?

I found and fixed this problem.
It was actually unrelated to bare org, it was due to my experiments with
org-ts-mode. Sorry for the confusion.


-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-10-20 Thread Ihor Radchenko
Vladimir Nikishkin  writes:

>> May you elaborate about incompatibility?
>>
>
> Yes. With org-eldoc loaded, and having a property '#+date: unpublished'
> in an org file, I am having the '*Messages*' buffer filled with
> #+begin_src elisp
> ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
> 2015_Passwords.org.rclignore::53653. Resetting.
>  The error was: (error "Invalid search bound (wrong side of point)")
>  Backtrace:
> "  backtrace-to-string(nil)
>   org-element-at-point()

This has nothing to do with eldoc.
If you can reproduce this problem consistently, may you create a minimal
example as described in https://orgmode.org/manual/Feedback.html#Feedback ?

>> That would constitute incompatible change for the existing users.
>> Although, autoload may cause org-eldoc to be loaded for users of
>> org-contrib, who are not interested in org-eldoc.
>> What we might do as a compromise is removing the autoload cookie only
>> and leaving the (add-hook ...) to be executed upon (require 'org-eldoc).
>
> Yes, maybe that is even better. Why would one (require 'org-eldoc) with
> no intention of using it?

Fixed, on master.
https://git.sr.ht/~bzg/org-contrib/commit/6e208c87bf6ede9251c9c5733b81b004b1e44966

As for `require', it is not so simple. Things like C-h f can trigger
loading libraries. But addressing such peculiarities is beyond the level
of maintenance we can provide for org-contrib.

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



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-10-20 Thread Vladimir Nikishkin


Ihor Radchenko  writes:

> Vladimir Nikishkin  writes:
>
>> org-contrib has the following lines 206 and 207 in org-eldoc:
>> #+begin_src elisp
>> ;;;###autoload
>> (add-hook 'org-mode-hook #'org-eldoc-load)
>> #+end_src
>>
>> which set up that hook automatically when the package org-contrib is
>> installed.
>>
>> that hook is, seemingly, incompatible with the recent org-element,
>
> May you elaborate about incompatibility?
>

Yes. With org-eldoc loaded, and having a property '#+date: unpublished'
in an org file, I am having the '*Messages*' buffer filled with
#+begin_src elisp
⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
2015_Passwords.org.rclignore::53653. Resetting.
 The error was: (error "Invalid search bound (wrong side of point)")
 Backtrace:
"  backtrace-to-string(nil)
  org-element-at-point()
  org-eldoc-get-src-lang()
  org-eldoc-documentation-function(#f(compiled-function (string  plist) 
#))
  #(org-eldoc-documentation-function)
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #()
  apply(# nil)
  timer-event-handler([t 0 0 50 nil # nil idle 0 nil])
"
 Please report this to Org mode mailing list (M-x org-submit-bug-report).
#+end_src

>> Could those lines be removed? If someone is interested in
>> patching/using/maintaining that code, he can probably try to refactor it
>> in a better way.
>>
>> (In any case, it is probably better to add such hooks in the :hook
>> clause of use-package.)
>
> That would constitute incompatible change for the existing users.
> Although, autoload may cause org-eldoc to be loaded for users of
> org-contrib, who are not interested in org-eldoc.
> What we might do as a compromise is removing the autoload cookie only
> and leaving the (add-hook ...) to be executed upon (require 'org-eldoc).

Yes, maybe that is even better. Why would one (require 'org-eldoc) with
no intention of using it?

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-10-20 Thread Ihor Radchenko
Vladimir Nikishkin  writes:

> org-contrib has the following lines 206 and 207 in org-eldoc:
> #+begin_src elisp
> ;;;###autoload
> (add-hook 'org-mode-hook #'org-eldoc-load)
> #+end_src
>
> which set up that hook automatically when the package org-contrib is
> installed.
>
> that hook is, seemingly, incompatible with the recent org-element,

May you elaborate about incompatibility?

> ... and in general it seems dubious to automatically add features from a
> deprecated repo.

This repo not deprecated, but rather not much maintained.

> Could those lines be removed? If someone is interested in
> patching/using/maintaining that code, he can probably try to refactor it
> in a better way.
>
> (In any case, it is probably better to add such hooks in the :hook
> clause of use-package.)

That would constitute incompatible change for the existing users.
Although, autoload may cause org-eldoc to be loaded for users of
org-contrib, who are not interested in org-eldoc.
What we might do as a compromise is removing the autoload cookie only
and leaving the (add-hook ...) to be executed upon (require 'org-eldoc).

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



[BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-10-19 Thread Vladimir Nikishkin
Dear Org developers,

org-contrib has the following lines 206 and 207 in org-eldoc:
#+begin_src elisp
;;;###autoload
(add-hook 'org-mode-hook #'org-eldoc-load)
#+end_src

which set up that hook automatically when the package org-contrib is
installed.

that hook is, seemingly, incompatible with the recent org-element,
and in general it seems dubious to automatically add features from a
deprecated repo.

Could those lines be removed? If someone is interested in
patching/using/maintaining that code, he can probably try to refactor it
in a better way.

(In any case, it is probably better to add such hooks in the :hook
clause of use-package.)

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)