emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-fold documentation
@ 2022-05-05 18:03 Vikas Rawal
  2022-05-07  4:15 ` Ihor Radchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Vikas Rawal @ 2022-05-05 18:03 UTC (permalink / raw)
  To: org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

After upgrading to 9.5.3, I am getting warnings such as this, which I
suspect are due to org-fold.et.

Warning (comp): org-fold.el:834:27: Warning: Unused lexical variable
`org-hide-macro-markers' Disable showing Disable logging
Warning (comp): org.el:76:30: Warning: Package cl is deprecated Disable
showing Disable logging
Warning (comp): ox.el:79:1: Warning: the function ‘org-back-to-heading’
might not be defined at runtime. Disable showing Disable logging
Warning (comp): ox.el:79:1: Warning: the function
‘org-next-visible-heading’ might not be defined at runtime. Disable showing
Disable logging
Warning (comp): ox.el:79:1: Warning: the function ‘org-at-heading-p’ might
not be defined at runtime. Disable showing Disable logging

Is org-fold.el documented already? Any pointers to what might be causing
the above?

Thanks,

V.

[-- Attachment #2: Type: text/html, Size: 1036 bytes --]

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

* Re: org-fold documentation
  2022-05-05 18:03 org-fold documentation Vikas Rawal
@ 2022-05-07  4:15 ` Ihor Radchenko
  2022-05-07  4:26   ` Samuel Wales
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ihor Radchenko @ 2022-05-07  4:15 UTC (permalink / raw)
  To: Vikas Rawal; +Cc: org-mode mailing list

Vikas Rawal <vikasrawal@gmail.com> writes:

> After upgrading to 9.5.3, I am getting warnings such as this, which I
> suspect are due to org-fold.et.
>
> Warning (comp): org-fold.el:834:27: Warning: Unused lexical variable
> `org-hide-macro-markers' Disable showing Disable logging
> Warning (comp): org.el:76:30: Warning: Package cl is deprecated Disable
> showing Disable logging
> Warning (comp): ox.el:79:1: Warning: the function ‘org-back-to-heading’
> might not be defined at runtime. Disable showing Disable logging
> Warning (comp): ox.el:79:1: Warning: the function
> ‘org-next-visible-heading’ might not be defined at runtime. Disable showing
> Disable logging
> Warning (comp): ox.el:79:1: Warning: the function ‘org-at-heading-p’ might
> not be defined at runtime. Disable showing Disable logging
>
> Is org-fold.el documented already? Any pointers to what might be causing
> the above?

These are native-comp warnings. They are not uncommon when
native-compiling Org (not only org-fold.el) and generally harmless.
If you are sufficiently annoyed with them, most of these warnings can be
"fixed" by declaring the missing functions. The functions are available
at runtime, but not during native-compilation.

Best,
Ihor


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

* Re: org-fold documentation
  2022-05-07  4:15 ` Ihor Radchenko
@ 2022-05-07  4:26   ` Samuel Wales
  2022-05-07  4:41     ` Ihor Radchenko
  2022-05-07  7:34   ` Max Nikulin
  2022-05-07  9:25   ` Vikas Rawal
  2 siblings, 1 reply; 10+ messages in thread
From: Samuel Wales @ 2022-05-07  4:26 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Vikas Rawal, org-mode mailing list

is there a quick trick like loading everything first?  for .el under
my control i have a[n otherwise] strict policy of clean compilation
but don't declare.  just load before compiling.

not using native yet so idk if the q makes sense.


On 5/6/22, Ihor Radchenko <yantar92@gmail.com> wrote:
> Vikas Rawal <vikasrawal@gmail.com> writes:
>
>> After upgrading to 9.5.3, I am getting warnings such as this, which I
>> suspect are due to org-fold.et.
>>
>> Warning (comp): org-fold.el:834:27: Warning: Unused lexical variable
>> `org-hide-macro-markers' Disable showing Disable logging
>> Warning (comp): org.el:76:30: Warning: Package cl is deprecated Disable
>> showing Disable logging
>> Warning (comp): ox.el:79:1: Warning: the function ‘org-back-to-heading’
>> might not be defined at runtime. Disable showing Disable logging
>> Warning (comp): ox.el:79:1: Warning: the function
>> ‘org-next-visible-heading’ might not be defined at runtime. Disable
>> showing
>> Disable logging
>> Warning (comp): ox.el:79:1: Warning: the function ‘org-at-heading-p’
>> might
>> not be defined at runtime. Disable showing Disable logging
>>
>> Is org-fold.el documented already? Any pointers to what might be causing
>> the above?
>
> These are native-comp warnings. They are not uncommon when
> native-compiling Org (not only org-fold.el) and generally harmless.
> If you are sufficiently annoyed with them, most of these warnings can be
> "fixed" by declaring the missing functions. The functions are available
> at runtime, but not during native-compilation.
>
> Best,
> Ihor
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


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

* Re: org-fold documentation
  2022-05-07  4:26   ` Samuel Wales
@ 2022-05-07  4:41     ` Ihor Radchenko
  2022-05-07  4:45       ` Samuel Wales
  0 siblings, 1 reply; 10+ messages in thread
From: Ihor Radchenko @ 2022-05-07  4:41 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Vikas Rawal, org-mode mailing list

Samuel Wales <samologist@gmail.com> writes:

> is there a quick trick like loading everything first?  for .el under
> my control i have a[n otherwise] strict policy of clean compilation
> but don't declare.  just load before compiling.

I am not aware about such trick. native-comp works in isolated Emacs
process for each individual .el file.

Properly resolving the warning on Org side is impossible because we rely
on runtime. Putting all the necessary requires would cause circular
requires :(

Best,
Ihor


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

* Re: org-fold documentation
  2022-05-07  4:41     ` Ihor Radchenko
@ 2022-05-07  4:45       ` Samuel Wales
  2022-05-07  5:17         ` Ihor Radchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Samuel Wales @ 2022-05-07  4:45 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Vikas Rawal, org-mode mailing list

so one would not be able to load all of org then compile?

On 5/6/22, Ihor Radchenko <yantar92@gmail.com> wrote:
> Samuel Wales <samologist@gmail.com> writes:
>
>> is there a quick trick like loading everything first?  for .el under
>> my control i have a[n otherwise] strict policy of clean compilation
>> but don't declare.  just load before compiling.
>
> I am not aware about such trick. native-comp works in isolated Emacs
> process for each individual .el file.
>
> Properly resolving the warning on Org side is impossible because we rely
> on runtime. Putting all the necessary requires would cause circular
> requires :(
>
> Best,
> Ihor
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


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

* Re: org-fold documentation
  2022-05-07  4:45       ` Samuel Wales
@ 2022-05-07  5:17         ` Ihor Radchenko
  0 siblings, 0 replies; 10+ messages in thread
From: Ihor Radchenko @ 2022-05-07  5:17 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Vikas Rawal, org-mode mailing list

Samuel Wales <samologist@gmail.com> writes:

> so one would not be able to load all of org then compile?

Not using native-comp, AFAIK.

Best,
Ihor


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

* Re: org-fold documentation
  2022-05-07  4:15 ` Ihor Radchenko
  2022-05-07  4:26   ` Samuel Wales
@ 2022-05-07  7:34   ` Max Nikulin
  2022-05-08  7:18     ` Ihor Radchenko
  2022-05-07  9:25   ` Vikas Rawal
  2 siblings, 1 reply; 10+ messages in thread
From: Max Nikulin @ 2022-05-07  7:34 UTC (permalink / raw)
  To: emacs-orgmode

On 07/05/2022 11:15, Ihor Radchenko wrote:
> Vikas Rawal writes:
> 
>> After upgrading to 9.5.3, I am getting warnings such as this, which I
>> suspect are due to org-fold.et.
>>
>> Warning (comp): org-fold.el:834:27: Warning: Unused lexical variable
>> `org-hide-macro-markers' Disable showing Disable logging
>> Warning (comp): org.el:76:30: Warning: Package cl is deprecated Disable
>> showing Disable logging
>> Warning (comp): ox.el:79:1: Warning: the function ‘org-back-to-heading’
>> might not be defined at runtime. Disable showing Disable logging
>> Warning (comp): ox.el:79:1: Warning: the function
>> ‘org-next-visible-heading’ might not be defined at runtime. Disable showing
>> Disable logging
>> Warning (comp): ox.el:79:1: Warning: the function ‘org-at-heading-p’ might
>> not be defined at runtime. Disable showing Disable logging
>>
>> Is org-fold.el documented already?

I see that org-fold-core.el has several screens of comments at the top 
of the file. Is it what you are asking for?

>> Any pointers to what might be causing
>> the above?
> 
> These are native-comp warnings. They are not uncommon when
> native-compiling Org (not only org-fold.el) and generally harmless.
> If you are sufficiently annoyed with them, most of these warnings can be
> "fixed" by declaring the missing functions. The functions are available
> at runtime, but not during native-compilation.

The org-fold.el file has some `declare-function' forms. Do you mean it 
is just necessary to declare more names?

In c++ to speed-up compiling and to deal with circular dependence for 
declarations, there are some *_fwd.h header files with forward 
declarations. Such files are enough to make compiler aware that some 
word is a class, a type, or a function with arguments of certain types. 
They do not allow to allocate proper amount of space for an object and 
to construct it (it is necessary to "#include" full header for such 
purpose), but while e.g. a pointer is passed in the file to be compiled 
then nothing more is required.

Will it help to create files like org-fwd.el with function declarations 
to allow other packages (even from org-mode) to use "(require 
'org-fwd.el)" instead of adding a lot of `declare-function' forms that 
must be kept in sync with function definitions?

It is easier to notice new warnings introduced by changes when where 
were no warnings before.



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

* Re: org-fold documentation
  2022-05-07  4:15 ` Ihor Radchenko
  2022-05-07  4:26   ` Samuel Wales
  2022-05-07  7:34   ` Max Nikulin
@ 2022-05-07  9:25   ` Vikas Rawal
  2022-05-07 10:22     ` Eric S Fraga
  2 siblings, 1 reply; 10+ messages in thread
From: Vikas Rawal @ 2022-05-07  9:25 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

>
> These are native-comp warnings. They are not uncommon when
> native-compiling Org (not only org-fold.el) and generally harmless.
> If you are sufficiently annoyed with them, most of these warnings can be
> "fixed" by declaring the missing functions. The functions are available
> at runtime, but not during native-compilation.
>
>
I am not sure I understand fully, but are you suggesting that the problem
is because I forgot to compile org and therefore these files were being
compiled during runtime? Would running "make" solve it then? I have  done
that anyway since I was not sure if I did it earlier.

Thanks,

Vikas


>

[-- Attachment #2: Type: text/html, Size: 1107 bytes --]

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

* Re: org-fold documentation
  2022-05-07  9:25   ` Vikas Rawal
@ 2022-05-07 10:22     ` Eric S Fraga
  0 siblings, 0 replies; 10+ messages in thread
From: Eric S Fraga @ 2022-05-07 10:22 UTC (permalink / raw)
  To: Vikas Rawal; +Cc: Ihor Radchenko, org-mode mailing list

On Saturday,  7 May 2022 at 14:55, Vikas Rawal wrote:
> I am not sure I understand fully, but are you suggesting that the
> problem is because I forgot to compile org and therefore these files
> were being compiled during runtime? Would running "make" solve it
> then? I have  done that anyway since I was not sure if I did it
> earlier. 

Native compilation happens during runtime (i.e. when you are using
Emacs) for any .elc files loaded during use that are newer than an
existing .eln file or if the .eln file does not already exist.

-- 
: Eric S Fraga, with org release_9.5.3-472-gd2a459 in Emacs 29.0.50


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

* Re: org-fold documentation
  2022-05-07  7:34   ` Max Nikulin
@ 2022-05-08  7:18     ` Ihor Radchenko
  0 siblings, 0 replies; 10+ messages in thread
From: Ihor Radchenko @ 2022-05-08  7:18 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

Max Nikulin <manikulin@gmail.com> writes:

> Will it help to create files like org-fwd.el with function declarations 
> to allow other packages (even from org-mode) to use "(require 
> 'org-fwd.el)" instead of adding a lot of `declare-function' forms that 
> must be kept in sync with function definitions?

It is an interesting idea, though I would not put a priority on such a
change. Also, properly fixing circular dependencies will be even better.
The current situation highlights the inconsistencies of our current code
design.

Best,
Ihor


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

end of thread, other threads:[~2022-05-08  7:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 18:03 org-fold documentation Vikas Rawal
2022-05-07  4:15 ` Ihor Radchenko
2022-05-07  4:26   ` Samuel Wales
2022-05-07  4:41     ` Ihor Radchenko
2022-05-07  4:45       ` Samuel Wales
2022-05-07  5:17         ` Ihor Radchenko
2022-05-07  7:34   ` Max Nikulin
2022-05-08  7:18     ` Ihor Radchenko
2022-05-07  9:25   ` Vikas Rawal
2022-05-07 10:22     ` Eric S Fraga

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).