emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive
@ 2024-05-05 16:19 Bastien
  2024-05-05 17:32 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2024-05-05 16:19 UTC (permalink / raw)
  To: emacs-orgmode

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

Recent versions of Emacs complain about org-clock-save.el:

  ⛔ Warning (lexical-binding): File
  /home/bzg/.emacs.d/org-clock-save.el lacks `lexical-binding'
  directive on its first line

The attached patch should fix this.  Is it okay to add it to bugfix?

Thanks,

-- 
 Bastien

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-clock.el.patch --]
[-- Type: text/x-diff, Size: 596 bytes --]

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 67feb6b35..806bc02de 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -3233,7 +3233,7 @@ The details of what will be saved are regulated by the variable
 		 org-clock-has-been-used
 		 (not (file-exists-p org-clock-persist-file))))
     (with-temp-file org-clock-persist-file
-      (insert (format ";; %s - %s at %s\n"
+      (insert (format ";; %s - %s at %s -*- lexical-binding: t; -*-\n"
 		      (file-name-nondirectory org-clock-persist-file)
 		      (system-name)
 		      (format-time-string (org-time-stamp-format t))))

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

* Re: [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive
  2024-05-05 16:19 [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive Bastien
@ 2024-05-05 17:32 ` Ihor Radchenko
  2024-05-06  8:10   ` Bastien Guerry
  2024-05-07 11:00   ` Ihor Radchenko
  0 siblings, 2 replies; 5+ messages in thread
From: Ihor Radchenko @ 2024-05-05 17:32 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Recent versions of Emacs complain about org-clock-save.el:
>
>   ⛔ Warning (lexical-binding): File
>   /home/bzg/.emacs.d/org-clock-save.el lacks `lexical-binding'
>   directive on its first line
>
> The attached patch should fix this.  Is it okay to add it to bugfix?

I think that it is premature.
This is a warning recently introduced on Emacs master, and it is still
being debated upon. See
https://yhetil.org/emacs-devel/50E29988-D354-4D10-990F-31828DBE6411@gmail.com/t/#u

-- 
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] 5+ messages in thread

* Re: [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive
  2024-05-05 17:32 ` Ihor Radchenko
@ 2024-05-06  8:10   ` Bastien Guerry
  2024-05-07 11:00   ` Ihor Radchenko
  1 sibling, 0 replies; 5+ messages in thread
From: Bastien Guerry @ 2024-05-06  8:10 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> I think that it is premature.
> This is a warning recently introduced on Emacs master, and it is still
> being debated upon. See
> https://yhetil.org/emacs-devel/50E29988-D354-4D10-990F-31828DBE6411@gmail.com/t/#u

Okay, fair enough.

-- 
 Bastien Guerry


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

* Re: [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive
  2024-05-05 17:32 ` Ihor Radchenko
  2024-05-06  8:10   ` Bastien Guerry
@ 2024-05-07 11:00   ` Ihor Radchenko
  2024-05-07 11:13     ` Bastien Guerry
  1 sibling, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2024-05-07 11:00 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

>>   ⛔ Warning (lexical-binding): File
>>   /home/bzg/.emacs.d/org-clock-save.el lacks `lexical-binding'
>>   directive on its first line
>>
>> The attached patch should fix this.  Is it okay to add it to bugfix?
>
> I think that it is premature.
> This is a warning recently introduced on Emacs master, and it is still
> being debated upon. See
> https://yhetil.org/emacs-devel/50E29988-D354-4D10-990F-31828DBE6411@gmail.com/t/#u

And they reverted the warning at the end.
https://git.savannah.gnu.org/cgit/emacs.git/commit?id=d51de0c5d90117bc1dc4bc5bc700253d71cd4579

Canceled.

-- 
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] 5+ messages in thread

* Re: [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive
  2024-05-07 11:00   ` Ihor Radchenko
@ 2024-05-07 11:13     ` Bastien Guerry
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien Guerry @ 2024-05-07 11:13 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> And they reverted the warning at the end.
> https://git.savannah.gnu.org/cgit/emacs.git/commit?id=d51de0c5d90117bc1dc4bc5bc700253d71cd4579

Yes, it makes sense.

-- 
 Bastien Guerry


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

end of thread, other threads:[~2024-05-07 11:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-05 16:19 [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive Bastien
2024-05-05 17:32 ` Ihor Radchenko
2024-05-06  8:10   ` Bastien Guerry
2024-05-07 11:00   ` Ihor Radchenko
2024-05-07 11:13     ` Bastien Guerry

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