Commit Graph

23 Commits

Author SHA1 Message Date
Ihor Radchenko 319563cef7
ob-R, ob-julia: Do not force-start session in Org Src buffers
* lisp/ob-R.el (org-babel-R-associate-session): Set
`ess-gen-proc-buffer-name-function' to associate the right session
buffer if user requests session interaction from inside Org Src edit
buffer.
(org-babel-edit-prep:R): Remove in favor of
`org-babel-R-associate-session'.
* lisp/ob-julia.el (org-babel-julia-associate-session): Implement
analogous functionality.
(org-babel-edit-prep:julia): Remove in favor of
`org-babel-julia-associate-session'.
* etc/ORG-NEWS (~org-edit-special~ no longer force-starts session in R
and Julia source blocks): Document the change.
* lisp/org-src.el (org-src-associate-babel-session): Run
org-babel-<lang>-associate-session even when session is not yet
initiated.

Link: https://orgmode.org/list/87r0ir2ln8.fsf@gmail.com
2024-01-28 20:04:31 +01:00
Kyle Meyer 72a2db86d9 Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
Po Lu 9f1d6dfd73 Backport commit 8e1c56ae4 from Emacs
; Add 2024 to copyright years
8e1c56ae46754dd7baedff49a464f078f0e9912d
Po Lu
Tue Jan 2 09:47:10 2024 +0800
2024-01-06 15:48:23 -05:00
Ihor Radchenko b6643884cb
ob-R, ob-julia: Use `ess-gen-proc-buffer-name-function' to control session buffer name
* lisp/ob-R.el (org-babel-R-initiate-session):
* lisp/ob-julia.el (org-babel-julia-initiate-session): Do not use the
hack with renaming ESS buffer and instead indicate the session buffer
name to ESS appropriately through `ess-gen-proc-buffer-name-function'.

Link: https://orgmode.org/list/871qb21bp7.fsf@gmail.com
2024-01-05 14:56:21 +01:00
Ihor Radchenko fe92a3cedb
Provide a uniform way to inform users about missing third-party packages
* lisp/org-macs.el (org-require-package): New macro trying to load a
library and displaying custom error message or warning on failure.
The actual package (not library) name can be provided as optional
argument.

* lisp/ob-R.el (org-babel-R-initiate-session):
* lisp/ob-clojure.el (ob-clojure-eval-with-inf-clojure):
(ob-clojure-eval-with-cider):
(ob-clojure-eval-with-slime):
* lisp/ob-forth.el (org-babel-forth-session-execute):
* lisp/ob-gnuplot.el (org-babel-execute:gnuplot):
(org-babel-gnuplot-initiate-session):
* lisp/ob-haskell.el (org-babel-interpret-haskell):
(org-babel-haskell-initiate-session):
* lisp/ob-js.el (org-babel-execute:js):
(org-babel-js-initiate-session):
* lisp/ob-julia.el (org-babel-julia-initiate-session):
* lisp/ob-lisp.el (org-babel-execute:lisp):
* lisp/ob-ocaml.el (org-babel-prep-session:ocaml):
* lisp/ob-octave.el (org-babel-octave-initiate-session):
* lisp/ob-processing.el (org-babel-processing-view-sketch):
* lisp/ob-ruby.el (org-babel-execute:ruby):
(org-babel-ruby-initiate-session):
* lisp/ol-bbdb.el (org-bbdb-open):
(org-bbdb-complete-link):
(org-bbdb-anniv-export-ical):
* lisp/org-agenda.el:
* lisp/org-plot.el (org-plot/gnuplot):
* lisp/org.el:
* lisp/ox-ascii.el (org-ascii-table):
* lisp/ox-html.el (org-html-htmlize-generate-css):
* lisp/ox-org.el: Use the new macro.

* lisp/oc-csl.el: Add FIXME. oc-csl uses a custom function doing
similar job.

* lisp/ob-js.el (org-babel-js-initiate-session): Add FIXME noting that
the third-party package is outdated.
2023-02-17 17:09:23 +03:00
Eli Zaretskii e0815d7545 Backport commit cae528457 from Emacs
; Add 2023 to copyright years.
cae528457cb862dc886a34240c9d4c73035b6659
Eli Zaretskii
Sun Jan 1 05:31:12 2023 -0500
2023-01-01 12:44:47 -05:00
Ihor Radchenko e81a094383
Assert all the Org files to load the same Org version
* lisp/org-compat.el (org-assert-version): New macro comparing Org
version at compile time and laod time.

Add `org-assert-version' call to all files:

* lisp/org-macs.el:
* lisp/org-crypt.el:
* lisp/org-ctags.el:
* lisp/org-cycle.el:
* lisp/org-datetree.el:
* lisp/org-duration.el:
* lisp/org-element.el (avl-tree):
* lisp/org-entities.el:
* lisp/org-faces.el:
* lisp/org-feed.el:
* lisp/org-fold-core.el:
* lisp/org-fold.el:
* lisp/org-footnote.el:
* lisp/org-goto.el:
* lisp/org-habit.el:
* lisp/org-id.el:
* lisp/org-indent.el:
* lisp/org-inlinetask.el:
* lisp/org-keys.el:
* lisp/org-lint.el:
* lisp/org-list.el:
* lisp/org-macro.el:
* lisp/org-mobile.el:
* lisp/org-mouse.el:
* lisp/org-num.el:
* lisp/org-pcomplete.el:
* lisp/org-persist.el:
* lisp/org-plot.el:
* lisp/org-protocol.el:
* lisp/org-refile.el:
* lisp/org-src.el:
* lisp/org-table.el:
* lisp/org-tempo.el:
* lisp/org-timer.el:
* lisp/org.el:
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-icalendar.el:
* lisp/ox-koma-letter.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-publish.el:
* lisp/ox-texinfo.el:
* lisp/ox.el:
2022-09-04 12:24:55 +08:00
Eric S Fraga 3690628398
lisp/ob-julia.el: Fix session support for Julia
* ob-julia.el (org-babel-julia-evaluate-session, commentary): Add line
to initialize ESS so that Julia sessions work.  Also added text in
commentary about Julia packages that sessions require.  Fix
contributed by Stephen Eglen.  See discussion:
https://stat.ethz.ch/pipermail/ess-help/2022-August/013113.html.
2022-08-20 13:53:53 +08:00
Kyle Meyer 5a64429b27 Merge branch 'bugfix'
As mentioned in 2e36ac2ac (Merge single quote fixes from Emacs's
master, 2022-07-24), this merge is keeping Org main's side of
org-babel-lua-read-string and org-agenda-sorting-strategy rather than
the variant introduced in the Emacs repo that's now in bugfix.

Note that for org-agenda-sorting-strategy docstring I think it'd
probably be preferable to change main's

    \\='(time-up category-keep priority-down)

to a bare

    (time-up category-keep priority-down)

but, at least for this merge, I'm sticking to choosing between the
variables that are in one of the sides.
2022-07-24 16:53:32 -04:00
Lars Ingebrigtsen cea0263784 Backport commit bbf389ea6 from Emacs
* lisp/ox-publish.el (org-publish-find-property):
* lisp/ox-html.el (org-html--unlabel-latex-environment):
* lisp/org-table.el (org-table-collapse-header):
* lisp/org-plot.el (org--plot/prime-factors):
* lisp/org-agenda.el (org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/ob-lua.el (org-babel-lua-read-string):
* lisp/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/ob-core.el (org-babel-default-header-args): Fix
quoting in doc strings.  In code examples, the ' character is
quoted with \\=, and regularize 'foo to `foo', and quote strings
like "foo" instead of 'foo'.

Audit quoting the quote character in doc strings
bbf389ea6deab229ba18dc519fe712ec982609d1
Lars Ingebrigtsen
Fri Apr 22 16:17:22 2022 +0200

[km] Org's bugfix branch is currently receiving commits from emacs-28,
     but this commit comes from Emacs's master branch.  I'm porting it
     because it has conflicts with bugfix's 01b0fb14b (Backport from
     main: Escape single left quotes in docstrings, 2022-07-24) and
     only touches docstrings.
2022-07-24 15:58:18 -04:00
Stefan Kangas 13d97ee18c
Prefer "website" to "homepage"
Emacs now advises using "website" (instead of "homepage") and
consequently to use the "URL" comment header instead of "Homepage".

* README:
* README_ELPA:
* doc/org-guide.org (Creating Footnotes):
* doc/org-manual.org (Creating Footnotes):
* etc/styles/README (URL): Prefer "website" to "homepage".

* lisp/*.el:
* mk/org-fixup.el: Replace the "Homepage" header comment with "URL".
2022-06-26 10:10:48 +08:00
Robert Pluim e9da29b6fa
Escape single left quotes in docstrings
* lisp/ob-core.el (org-babel-default-header-args):
* lisp/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/ob-lua.el (org-babel-lua-read-string):
* lisp/ob-table.el (org-sbe):
* lisp/oc-basic.el (org-cite-basic--shorten-names):
* lisp/org-agenda.el (org-agenda-sorting-strategy):
(org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/org-fold-core.el (org-fold-core--specs):
(org-fold-core-remove-folding-spec):
(org-fold-core-get-folding-spec):
(org-fold-core--isearch-overlays):
* lisp/org-plot.el (org--plot/prime-factors):
* lisp/org-table.el (org-table-collapse-header):
* lisp/org.el (org-special-ctrl-o):
(org-latex-to-html-convert-command):
* lisp/ox-html.el (org-html--unlabel-latex-environment):
* lisp/ox-publish.el (org-publish-find-property):
Use \\=' when there's a need for a single left quote in a docstring.

The emacs-29 byte compiler complains about such usage.
2022-06-16 20:51:02 +08:00
Kyle Meyer 5a229cbc44 Update copyright year to 2022 2022-01-01 15:17:08 -05:00
Stefan Kangas db4805c2d7 Backport commit 50b40e1d4 from Emacs
; * lisp/org/ob-julia.el: Fix Author header for authors.el.
50b40e1d4f0063ac78a53673736a2eaa3ba3287b
Stefan Kangas
Wed Dec 1 17:03:52 2021 +0100
2021-12-04 15:29:43 -05:00
Kyle Meyer d0f774b0b4 Merge branch 'km/from-emacs-28' into bugfix 2021-10-02 00:51:56 -04:00
Glenn Morris e83ee601f2 Backport commit d50597189 from Emacs
; Standardize some license headers
d505971894d83e04e8d206be1dcee1cee5e8bb93
Glenn Morris
Fri Oct 1 18:07:45 2021 -0700
2021-10-01 21:57:10 -04:00
Kyle Meyer 1c1614e9b7 Merge branch 'km/from-emacs-28' into bugfix 2021-09-30 21:18:30 -04:00
Stefan Monnier 7325cf186a Backport commit b5e3cc3bc from Emacs
* lisp/ob-julia.el: Use lexical-binding.
(ess-eval-visibly-p): Declare.
(org-babel-julia-assign-elisp): Remove unused vars `header` and
`row-names` and corespondingly remove now unused args `colnames-p` and
`rownames-p`.
(org-babel-variable-assignments:julia): Adjust call to
`org-babel-julia-assign-elisp` accordingly.
(org-babel-julia-initiate-session): Use `bound-and-true-p`.
(org-babel-julia-evaluate-external-process)
(org-babel-julia-evaluate-session, org-babel-julia-evaluate):
Remove unused arg `row-names-p`.
(org-babel-execute:julia): Adjust call to
`org-babel-julia-evaluate` accordingly.

* lisp/org/ob-julia.el: Use lexical-binding
b5e3cc3bc597d56dfe09ee500717344649ea0354
Stefan Monnier
Thu Sep 30 10:02:29 2021 -0400

[ km: This was independently applied covered on the bugfix branch with
  the combination of a3b6728f9 and efa498b67.  I'm applying it here
  too for bookkeeping/traceability purposes, and to bring in one
  missing piece (see merge). ]
2021-09-30 21:17:02 -04:00
Bastien efa498b679 lisp/ob-julia.el: Backport modifications from Emacs b5e3cc3
* (org-babel-julia-initiate-session): Use `bound-and-true-p`.
2021-09-30 23:15:24 +02:00
Bastien a3b6728f9a lisp/ob-julia.el: Use lexical-binding
* lisp/ob-julia.el: Use lexical-binding.
(ess-eval-visibly-p): Declare as dynamically scoped.
(org-babel-execute:julia, org-babel-julia-assign-elisp)
(org-babel-julia-evaluate, org-babel-julia-evaluate-session):
Remove unused references to `colnames-p' and `rownames-p'.

Thanks to Pedro Bruel for reviewing this patch.
2021-09-30 19:32:53 +02:00
Bastien 806ac1b7f6 *el: Fix indentation 2021-09-29 09:22:47 +02:00
Bastien 7e1745d744 lisp/ob-julia.el: Fix copyright header 2021-09-29 09:02:44 +02:00
Pedro Bruel bf1c4c7575 Include support for evaluating julia code
* lisp/ob-julia.el: included from org-contrib
* testing/lisp/test-ob-julia.el: start adapting from testing/lisp/test-ob-python.el
2021-09-25 16:00:02 +02:00