emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible wit


From: Vladimir Nikishkin
Subject: 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/)]
Date: Fri, 20 Oct 2023 15:39:07 +0800
User-agent: mu4e 1.10.7; emacs 30.0.50

Ihor Radchenko <yantar92@posteo.net> writes:

> Vladimir Nikishkin <lockywolf@gmail.com> 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 &rest plist) 
#<bytecode 0x76e7a7311110465>))
  #<subr 
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_17>(org-eldoc-documentation-function)
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12>()
  apply(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12> nil)
  timer-event-handler([t 0 0 500000 nil #<subr 
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12> 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]