emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings
@ 2023-01-31  7:19 gerard.vermeulen
  2023-01-31 10:34 ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: gerard.vermeulen @ 2023-01-31  7:19 UTC (permalink / raw)
  To: Emacs orgmode

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

Hi,

I have been replacing to calls to =custom-set-variables= with calls to 
the safer
=setopt= (new in Emacs-29.0.60) and I discovered that calling
src_emacs-lisp{(setopt org-babel-load-languages '((eshell t) (emacs-lisp 
t)))}
raises a warning because =eshell= is missing from the 
=org-babel-load-languages=
=defcustom=.  The code below shows that this =defcustom= is quit out of 
sync with
the rest of the code base:

#+header: :wrap "src emacs-lisp :results silent :tangle no"
#+begin_src emacs-lisp :exports both :results value pp :exports both
(defun all-org-babel-execute-fns ()
   "Find `ob-LANGUAGE' files in Org defining 
`org-babel-execute:LANGUAGE'.

Return a list of items where the filename is the `car' of each item and 
the
`cdr' of each item lists the `org-babel-execute:LANGUAGE' functions."
   (let* ((dir (file-name-parent-directory (locate-library "org")))
          (names (directory-files dir t (rx "ob-" (+ print)  ".el" 
eos))))
     (cl-loop for name in names
              for found = (has-org-babel-execute-fn name)
              when found collect found)))

(defun has-org-babel-execute-fn (name)
   (let* ((buffer (find-file-noselect name))
          (base (file-name-base (buffer-file-name buffer)))
          (regexp (rx "defun" (+ blank) "org-babel-execute:" (group (+ 
graphic))))
          (matches))
     (save-match-data
       (save-excursion
         (with-current-buffer buffer
           (save-restriction
             (widen)
             (goto-char 1)
             (while (re-search-forward regexp nil t 1)
               (push (match-string-no-properties 1) matches))))))
     (when matches
       `(,base ,@matches))))

(all-org-babel-execute-fns)
#+end_src

#+RESULTS:
#+begin_src emacs-lisp :results silent :tangle no
(("ob-C" "C" "D" "C++" "cpp")
  ("ob-R" "R")
  ("ob-awk" "awk")
  ("ob-calc" "calc")
  ("ob-clojure" "clojurescript" "clojure")
  ("ob-css" "css")
  ("ob-ditaa" "ditaa")
  ("ob-dot" "dot")
  ("ob-emacs-lisp" "emacs-lisp")
  ("ob-eshell" "eshell")
  ("ob-forth" "forth")
  ("ob-fortran" "fortran")
  ("ob-gnuplot" "gnuplot")
  ("ob-groovy" "groovy")
  ("ob-haskell" "haskell")
  ("ob-java" "java")
  ("ob-js" "js")
  ("ob-julia" "julia")
  ("ob-latex" "latex")
  ("ob-lilypond" "lilypond")
  ("ob-lisp" "lisp")
  ("ob-lua" "lua")
  ("ob-makefile" "makefile")
  ("ob-maxima" "maxima")
  ("ob-ocaml" "ocaml")
  ("ob-octave" "octave" "matlab")
  ("ob-org" "org")
  ("ob-perl" "perl")
  ("ob-plantuml" "plantuml")
  ("ob-processing" "processing")
  ("ob-python" "python")
  ("ob-ruby" "ruby")
  ("ob-sass" "sass")
  ("ob-scheme" "scheme")
  ("ob-screen" "screen")
  ("ob-sed" "sed")
  ("ob-shell" "shell")
  ("ob-sql" "sql")
  ("ob-sqlite" "sqlite"))
#+end_src

The attached patch synchronizes the =defcustom= with the rest of the
code base, groups languages by org-babel file, and uses camel-case to
spell languages (the new fashion).

Best regards -- Gerard

[-- Attachment #2: fix-org-babel-load-languages.patch --]
[-- Type: application/octet-stream, Size: 2151 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 1947c63a8..a3471ff64 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -302,42 +302,44 @@ requirement."
 		:key-type
 		(choice
 		 (const :tag "Awk" awk)
-		 (const :tag "C" C)
+		 (const :tag "C, D, C++, and cpp" C)
 		 (const :tag "R" R)
                  (const :tag "Calc" calc)
-		 (const :tag "Clojure" clojure)
+		 (const :tag "Clojure and ClojureScript" clojure)
 		 (const :tag "CSS" css)
 		 (const :tag "Ditaa" ditaa)
 		 (const :tag "Dot" dot)
                  (const :tag "Emacs Lisp" emacs-lisp)
+                 (const :tag "Eshell" eshell)
 		 (const :tag "Forth" forth)
 		 (const :tag "Fortran" fortran)
-		 (const :tag "Gnuplot" gnuplot)
+		 (const :tag "GnuPlot" gnuplot)
+		 (const :tag "Groovy" groovy)
 		 (const :tag "Haskell" haskell)
                  (const :tag "Java" java)
-		 (const :tag "Javascript" js)
-		 (const :tag "LaTeX" latex)
-                 (const :tag "Lilypond" lilypond)
+		 (const :tag "JavaScript" js)
+                 (const :tag "Julia" julia)
+                 (const :tag "LaTeX" latex)
+                 (const :tag "LilyPond" lilypond)
 		 (const :tag "Lisp" lisp)
+                 (const :tag "Lua" lua)
 		 (const :tag "Makefile" makefile)
 		 (const :tag "Maxima" maxima)
-		 (const :tag "Matlab" matlab)
-                 (const :tag "Ocaml" ocaml)
-		 (const :tag "Octave" octave)
+                 (const :tag "OCaml" ocaml)
+		 (const :tag "Octave and MatLab" octave)
 		 (const :tag "Org" org)
 		 (const :tag "Perl" perl)
-		 (const :tag "Pico Lisp" picolisp)
+                 (const :tag "Processing" processing)
 		 (const :tag "PlantUML" plantuml)
 		 (const :tag "Python" python)
 		 (const :tag "Ruby" ruby)
 		 (const :tag "Sass" sass)
-		 (const :tag "Scala" scala)
 		 (const :tag "Scheme" scheme)
 		 (const :tag "Screen" screen)
+                 (const :tag "Sed" sed)
 		 (const :tag "Shell Script" shell)
                  (const :tag "Sql" sql)
-		 (const :tag "Sqlite" sqlite)
-		 (const :tag "Stan" stan))
+		 (const :tag "Sqlite" sqlite))
 		:value-type (boolean :tag "Activate" :value t)))
 
 ;;;; Customization variables

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

* Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings
  2023-01-31  7:19 [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings gerard.vermeulen
@ 2023-01-31 10:34 ` Ihor Radchenko
  2023-02-01 14:22   ` gerard.vermeulen
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2023-01-31 10:34 UTC (permalink / raw)
  To: gerard.vermeulen; +Cc: Emacs orgmode

gerard.vermeulen@posteo.net writes:

> The attached patch synchronizes the =defcustom= with the rest of the
> code base, groups languages by org-babel file, and uses camel-case to
> spell languages (the new fashion).

Thanks!
May you please convert the diff into a patch with changelog entry and
commit message? See https://orgmode.org/worg/org-contribute.html#org045e318

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

* Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings
  2023-01-31 10:34 ` Ihor Radchenko
@ 2023-02-01 14:22   ` gerard.vermeulen
  2023-02-02  8:26     ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: gerard.vermeulen @ 2023-02-01 14:22 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs orgmode

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

Hi Igor,

On 31.01.2023 11:34, Ihor Radchenko wrote:
> gerard.vermeulen@posteo.net writes:
> 
>> The attached patch synchronizes the =defcustom= with the rest of the
>> code base, groups languages by org-babel file, and uses camel-case to
>> spell languages (the new fashion).
> 
> Thanks!
> May you please convert the diff into a patch with changelog entry and
> commit message? See 
> https://orgmode.org/worg/org-contribute.html#org045e318

patch attached.

Two points:
1. I have assigned my copyright for Emacs stuff to the FSF
2. My initial version of the patch was against bugfix and now I have set 
:package-version to "9.6"
     according to the instructions on the org-contribute page. I do not 
know if this is acceptable (it
     feels a bit like breaking the rules), but I am happy to redo the 
patch for main.

Best regards -- Gerard

[-- Attachment #2: 0001-org.el-Sync-org-babel-load-languages-with-Babel-file.patch --]
[-- Type: application/octet-stream, Size: 2983 bytes --]

From 1327d62675dc5a5f09cf9705bc3cc10554c1d5a8 Mon Sep 17 00:00:00 2001
From: Gerard Vermeulen <gerard.vermeulen@posteo.net>
Date: Wed, 1 Feb 2023 15:03:43 +0100
Subject: [PATCH] org.el: Sync org-babel-load-languages with Babel files in Org

* lisp/org.el (org-babel-load-languages): Sync with Babel files

(org-babel-load-languages): Synchronize the defcustom with the rest of
the code base, group languages by Org Babel file, and spell languages
using camel case (the current fashion).

Link: https://list.orgmode.org/712f2ef5b4edb2d9b565f6467e582030@posteo.net/
---
 lisp/org.el | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 1b829d837..4e31e090d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -298,46 +298,49 @@ requirement."
   :group 'org-babel
   :set 'org-babel-do-load-languages
   :version "24.1"
+  :package-version '(Org . "9.6")
   :type '(alist :tag "Babel Languages"
 		:key-type
 		(choice
 		 (const :tag "Awk" awk)
-		 (const :tag "C" C)
+		 (const :tag "C, D, C++, and cpp" C)
 		 (const :tag "R" R)
                  (const :tag "Calc" calc)
-		 (const :tag "Clojure" clojure)
+		 (const :tag "Clojure and ClojureScript" clojure)
 		 (const :tag "CSS" css)
 		 (const :tag "Ditaa" ditaa)
 		 (const :tag "Dot" dot)
                  (const :tag "Emacs Lisp" emacs-lisp)
+                 (const :tag "Eshell" eshell)
 		 (const :tag "Forth" forth)
 		 (const :tag "Fortran" fortran)
-		 (const :tag "Gnuplot" gnuplot)
+		 (const :tag "GnuPlot" gnuplot)
+		 (const :tag "Groovy" groovy)
 		 (const :tag "Haskell" haskell)
                  (const :tag "Java" java)
-		 (const :tag "Javascript" js)
-		 (const :tag "LaTeX" latex)
-                 (const :tag "Lilypond" lilypond)
+		 (const :tag "JavaScript" js)
+                 (const :tag "Julia" julia)
+                 (const :tag "LaTeX" latex)
+                 (const :tag "LilyPond" lilypond)
 		 (const :tag "Lisp" lisp)
+                 (const :tag "Lua" lua)
 		 (const :tag "Makefile" makefile)
 		 (const :tag "Maxima" maxima)
-		 (const :tag "Matlab" matlab)
-                 (const :tag "Ocaml" ocaml)
-		 (const :tag "Octave" octave)
+                 (const :tag "OCaml" ocaml)
+		 (const :tag "Octave and MatLab" octave)
 		 (const :tag "Org" org)
 		 (const :tag "Perl" perl)
-		 (const :tag "Pico Lisp" picolisp)
+                 (const :tag "Processing" processing)
 		 (const :tag "PlantUML" plantuml)
 		 (const :tag "Python" python)
 		 (const :tag "Ruby" ruby)
 		 (const :tag "Sass" sass)
-		 (const :tag "Scala" scala)
 		 (const :tag "Scheme" scheme)
 		 (const :tag "Screen" screen)
+                 (const :tag "Sed" sed)
 		 (const :tag "Shell Script" shell)
                  (const :tag "Sql" sql)
-		 (const :tag "Sqlite" sqlite)
-		 (const :tag "Stan" stan))
+		 (const :tag "Sqlite" sqlite))
 		:value-type (boolean :tag "Activate" :value t)))
 
 ;;;; Customization variables
-- 
2.39.1


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

* Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings
  2023-02-01 14:22   ` gerard.vermeulen
@ 2023-02-02  8:26     ` Ihor Radchenko
  2023-02-02 19:33       ` gerard.vermeulen
  2023-02-28  9:31       ` Bastien Guerry
  0 siblings, 2 replies; 8+ messages in thread
From: Ihor Radchenko @ 2023-02-02  8:26 UTC (permalink / raw)
  To: gerard.vermeulen, Bastien; +Cc: Emacs orgmode

gerard.vermeulen@posteo.net writes:

>> May you please convert the diff into a patch with changelog entry and
>> commit message? See 
>> https://orgmode.org/worg/org-contribute.html#org045e318
>
> patch attached.

Thanks!

> 1. I have assigned my copyright for Emacs stuff to the FSF

Bastien, may you please confirm?

> 2. My initial version of the patch was against bugfix and now I have set 
> :package-version to "9.6"

Correct.
You can also remove :version tag while we are at it. It is redundant
when :package-version is provided (we are slowly getting rid of the
:version tags across Org).

>      according to the instructions on the org-contribute page. I do not 
> know if this is acceptable (it
>      feels a bit like breaking the rules), but I am happy to redo the 
> patch for main.

bugfix is fine. This is a trivial patch.

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

* Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings
  2023-02-02  8:26     ` Ihor Radchenko
@ 2023-02-02 19:33       ` gerard.vermeulen
  2023-03-03 14:58         ` Ihor Radchenko
  2023-02-28  9:31       ` Bastien Guerry
  1 sibling, 1 reply; 8+ messages in thread
From: gerard.vermeulen @ 2023-02-02 19:33 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: Bastien, Emacs orgmode,
	emacs-orgmode-bounces+gerard.vermeulen=posteo.net

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



On 02.02.2023 09:26, Ihor Radchenko wrote:
> gerard.vermeulen@posteo.net writes:
> 
>>> May you please convert the diff into a patch with changelog entry and
>>> commit message? See
>>> https://orgmode.org/worg/org-contribute.html#org045e318
>> 
>> patch attached.
> 
> Thanks!
> 
>> 1. I have assigned my copyright for Emacs stuff to the FSF
> 
> Bastien, may you please confirm?
> 
>> 2. My initial version of the patch was against bugfix and now I have 
>> set
>> :package-version to "9.6"
> 
> Correct.
> You can also remove :version tag while we are at it. It is redundant
> when :package-version is provided (we are slowly getting rid of the
> :version tags across Org).
> 
>>      according to the instructions on the org-contribute page. I do 
>> not
>> know if this is acceptable (it
>>      feels a bit like breaking the rules), but I am happy to redo the
>> patch for main.
> 
> bugfix is fine. This is a trivial patch.

I have attached an amended patch with the :version tag removed.

[-- Attachment #2: 0001-org.el-Sync-org-babel-load-languages-with-Babel-file.patch --]
[-- Type: application/octet-stream, Size: 3046 bytes --]

From 54834588332fd4acc196fb5f006738b0f3a54cb1 Mon Sep 17 00:00:00 2001
From: Gerard Vermeulen <gerard.vermeulen@posteo.net>
Date: Wed, 1 Feb 2023 15:03:43 +0100
Subject: [PATCH] org.el: Sync org-babel-load-languages with Babel files in Org

* lisp/org.el (org-babel-load-languages): Sync with Babel files

(org-babel-load-languages): Synchronize the defcustom with the rest of
the code base, group languages by Org Babel file, and spell languages
using camel case (the current fashion).

Link: https://list.orgmode.org/712f2ef5b4edb2d9b565f6467e582030@posteo.net/
---
 lisp/org.el | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 1b829d837..1c1866dee 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -297,47 +297,49 @@ default, only Emacs Lisp is loaded, since it has no specific
 requirement."
   :group 'org-babel
   :set 'org-babel-do-load-languages
-  :version "24.1"
+  :package-version '(Org . "9.6")
   :type '(alist :tag "Babel Languages"
 		:key-type
 		(choice
 		 (const :tag "Awk" awk)
-		 (const :tag "C" C)
+		 (const :tag "C, D, C++, and cpp" C)
 		 (const :tag "R" R)
                  (const :tag "Calc" calc)
-		 (const :tag "Clojure" clojure)
+		 (const :tag "Clojure and ClojureScript" clojure)
 		 (const :tag "CSS" css)
 		 (const :tag "Ditaa" ditaa)
 		 (const :tag "Dot" dot)
                  (const :tag "Emacs Lisp" emacs-lisp)
+                 (const :tag "Eshell" eshell)
 		 (const :tag "Forth" forth)
 		 (const :tag "Fortran" fortran)
-		 (const :tag "Gnuplot" gnuplot)
+		 (const :tag "GnuPlot" gnuplot)
+		 (const :tag "Groovy" groovy)
 		 (const :tag "Haskell" haskell)
                  (const :tag "Java" java)
-		 (const :tag "Javascript" js)
-		 (const :tag "LaTeX" latex)
-                 (const :tag "Lilypond" lilypond)
+		 (const :tag "JavaScript" js)
+                 (const :tag "Julia" julia)
+                 (const :tag "LaTeX" latex)
+                 (const :tag "LilyPond" lilypond)
 		 (const :tag "Lisp" lisp)
+                 (const :tag "Lua" lua)
 		 (const :tag "Makefile" makefile)
 		 (const :tag "Maxima" maxima)
-		 (const :tag "Matlab" matlab)
-                 (const :tag "Ocaml" ocaml)
-		 (const :tag "Octave" octave)
+                 (const :tag "OCaml" ocaml)
+		 (const :tag "Octave and MatLab" octave)
 		 (const :tag "Org" org)
 		 (const :tag "Perl" perl)
-		 (const :tag "Pico Lisp" picolisp)
+                 (const :tag "Processing" processing)
 		 (const :tag "PlantUML" plantuml)
 		 (const :tag "Python" python)
 		 (const :tag "Ruby" ruby)
 		 (const :tag "Sass" sass)
-		 (const :tag "Scala" scala)
 		 (const :tag "Scheme" scheme)
 		 (const :tag "Screen" screen)
+                 (const :tag "Sed" sed)
 		 (const :tag "Shell Script" shell)
                  (const :tag "Sql" sql)
-		 (const :tag "Sqlite" sqlite)
-		 (const :tag "Stan" stan))
+		 (const :tag "Sqlite" sqlite))
 		:value-type (boolean :tag "Activate" :value t)))
 
 ;;;; Customization variables
-- 
2.39.1


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

* Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings
  2023-02-02  8:26     ` Ihor Radchenko
  2023-02-02 19:33       ` gerard.vermeulen
@ 2023-02-28  9:31       ` Bastien Guerry
  2023-03-03 15:00         ` Ihor Radchenko
  1 sibling, 1 reply; 8+ messages in thread
From: Bastien Guerry @ 2023-02-28  9:31 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: gerard.vermeulen, Emacs orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

>> 1. I have assigned my copyright for Emacs stuff to the FSF
>
> Bastien, may you please confirm?

I do, sorry for the delay.

-- 
 Bastien Guerry


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

* Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings
  2023-02-02 19:33       ` gerard.vermeulen
@ 2023-03-03 14:58         ` Ihor Radchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Ihor Radchenko @ 2023-03-03 14:58 UTC (permalink / raw)
  To: gerard.vermeulen
  Cc: Bastien, Emacs orgmode,
	emacs-orgmode-bounces+gerard.vermeulen=posteo.net

gerard.vermeulen@posteo.net writes:

> I have attached an amended patch with the :version tag removed.

Thanks!
Applied onto bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e8010e8a9

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

* Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings
  2023-02-28  9:31       ` Bastien Guerry
@ 2023-03-03 15:00         ` Ihor Radchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Ihor Radchenko @ 2023-03-03 15:00 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: gerard.vermeulen, Emacs orgmode

Bastien Guerry <bzg@gnu.org> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>>> 1. I have assigned my copyright for Emacs stuff to the FSF
>>
>> Bastien, may you please confirm?
>
> I do, sorry for the delay.

Updated the contributor list.
https://git.sr.ht/~bzg/worg/commit/a5eaeb0d

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

end of thread, other threads:[~2023-03-03 14:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-31  7:19 [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings gerard.vermeulen
2023-01-31 10:34 ` Ihor Radchenko
2023-02-01 14:22   ` gerard.vermeulen
2023-02-02  8:26     ` Ihor Radchenko
2023-02-02 19:33       ` gerard.vermeulen
2023-03-03 14:58         ` Ihor Radchenko
2023-02-28  9:31       ` Bastien Guerry
2023-03-03 15:00         ` Ihor Radchenko

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