update of packages

This commit is contained in:
2023-11-04 19:26:41 +01:00
parent e162a12b58
commit 3b54a3236d
726 changed files with 297673 additions and 34585 deletions
+93 -89
View File
@@ -1,93 +1,97 @@
.NOTPARALLEL: # always run this make serially
.SUFFIXES: # we don't need default suffix rules
ifeq ($(MAKELEVEL), 0)
$(error This make needs to be started as a sub-make from the toplevel directory.)
endif
# Makefile - for the org-mode distribution
# GNU make is required
#
# This file is not part of GNU Emacs
ifneq ($(ORG_ADD_CONTRIB),)
_ORG_ADD_EL_ := \
$(notdir \
$(wildcard \
$(addsuffix .el, \
$(addprefix ../contrib/lisp/, \
$(basename \
$(notdir $(ORG_ADD_CONTRIB)))))))
endif
# set up environment
include mk/default.mk # defaults, customizable via "local.mk"
-include local.mk # optional local customization, use default.mk as template
LISPV := org-version.el
LISPI := org-loaddefs.el
LISPA := $(LISPV) $(LISPI)
LISPB := $(LISPA:%el=%elc) org-install.elc
LISPF := $(filter-out $(LISPA),$(sort $(wildcard *.el) $(_ORG_ADD_EL_)))
LISPC := $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
_ORGCM_ := dirall single source slint1 slint2
-include local.mk
# default target is "all" unless overridden in local.mk
all::
.PHONY: all compile compile-dirty \
$(_ORGCM_) $(_ORGCM_:%=compile-%) \
autoloads addcontrib \
install clean cleanauto cleanall cleanelc clean-install
# Describe valid make targets for org-mode.
.PHONY: targets help helpall
targets: help
help helpall::
$(info )
$(info Getting Help)
$(info ============)
$(info make help - show brief help)
$(info make targets - ditto)
$(info make helpall - show extended help)
$(info )
$(info Build and Check)
$(info ===============)
$(info make - build Org ELisp and all documentation)
$(info make all - ditto)
$(info make compile - build Org ELisp files)
$(info make single - build Org ELisp files, single Emacs per source)
$(info make autoloads - create org-loaddefs.el to load Org in-place)
$(info make test - build Org ELisp files and run test suite)
$(info make vanilla - run Emacs with this Org-mode and no personal config)
helpall::
$(info make test-dirty - check without building first)
$(info make compile-dirty - build only stale Org ELisp files)
$(info )
$(info Compatibility)
$(info =============)
$(info make oldorg - what the old make did: compile autoloads info)
$(info )
$(info Cleaning)
$(info ========)
$(info make clean - remove built Org ELisp files and documentation)
$(info make cleanall - remove everything that can be built and all remnants)
$(info make clean-install - remove previous Org installation)
$(info )
$(info Configuration Check)
$(info ===================)
help helpall::
$(info make config - check main configuration)
helpall::
$(info make config-version - check Org version)
$(info make config-test - check test configuration)
$(info make config-exe - check executables configuration)
$(info make config-cmd - check command configuration)
$(info make config-all - check all configuration)
$(info )
$(info Documentation)
$(info =============)
help helpall::
$(info make doc - build all documentation)
helpall::
$(info make docs - ditto)
help helpall::
$(info make info - build Info documentation)
helpall::
$(info make html - build HTML documentation)
$(info make pdf - build PDF documentation)
$(info make card - build reference cards)
$(info make refcard - ditto)
help helpall::
$(info )
$(info Installation)
$(info ============)
$(info make install - build and install Org)
helpall::
$(info make install-etc - build and install files in /etc)
$(info make install-lisp - build and install Org Elisp files)
$(info make install-info - build and install Info documentation)
$(info )
$(info Convenience)
$(info ===========)
$(info make up0 - pull from upstream)
$(info make up1 - pull from upstream, build and check)
$(info make up2 - pull from upstream, build, check and install)
$(info make update - pull from upstream and build)
$(info make update2 - pull from upstream, build and install)
$(info make uncompiled - combine cleanlisp and autoloads)
$(info make local.mk - create new local.mk as template for adaptation)
help helpall::
$(info )
$(info Full documentation on Worg)
$(info ==========================)
$(info https://orgmode.org/worg/dev/org-build-system.html)
@echo ""
# do not clean here, done in toplevel make
all compile compile-dirty:: autoloads
ifeq ($(filter-out $(_ORGCM_),$(ORGCM)),)
$(MAKE) compile-$(ORGCM)
else
$(error ORGCM has illegal value $(ORGCM) (valid: $(_ORGCM_)))
endif
compile-dirall: dirall
compile-single: single $(LISPC)
compile-source: source dirall
compile-slint1: dirall slint1
compile-slint2: source dirall slint1
# internal
dirall:
@$(info ==================== $@ ====================)
@$(ELCDIR)
single:
@$(info ==================== $@ ====================)
source: cleanelc
@$(info ==================== $@ ====================)
@$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
slint1:
@$(info ==================== $@ ====================)
@$(foreach elc,$(LISPC),$(RM) $(elc); $(MAKE) $(elc);)
%.elc: %.el
@$(info Compiling single $(abspath $<)...)
-@$(ELC) $<
addcontrib:
ifneq ($(ORG_ADD_CONTRIB),)
$(CP) $(addprefix ../contrib/lisp/,$(_ORG_ADD_EL_)) .
endif
autoloads: cleanauto addcontrib $(LISPI) $(LISPV)
$(LISPV): $(LISPF)
@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
@$(RM) $(@)
@$(MAKE_ORG_VERSION)
$(LISPI): $(LISPV) $(LISPF)
@echo "org-loaddefs: $(ORGVERSION) ($(GITVERSION))"
@$(RM) $(@)
@$(MAKE_ORG_INSTALL)
install: compile $(LISPF)
if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
$(MKDIR) $(DESTDIR)$(lispdir) ; \
fi ;
$(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
cleanauto clean cleanall::
$(RM) $(LISPA) $(LISPB)
clean cleanall cleanelc::
$(RM) *.elc
clean-install:
if [ -d $(DESTDIR)$(lispdir) ] ; then \
$(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* $(DESTDIR)$(lispdir)/ol*.el* $(DESTDIR)$(lispdir)/ox*.el* ; \
fi ;
include mk/targets.mk # toplevel make machinery
+7 -7
View File
@@ -6,7 +6,7 @@ effective plain text system.
Check the [Org Mode website] for more.
[Org Mode website] <https://orgmode.org>
[Org Mode website] https://orgmode.org
1 Install Org
@@ -18,7 +18,7 @@ Check the [Org Mode website] for more.
running this command: `M-x package-install RET org RET'
[GNU ELPA] <https://elpa.gnu.org/packages/org.html>
[GNU ELPA] https://elpa.gnu.org/packages/org.html
2 Join the GNU Project
@@ -30,13 +30,13 @@ Check the [Org Mode website] for more.
If you are the author of an awesome program and want to join us in
writing Free (libre) Software, please consider making it an official
GNU program and become a GNU Maintainer. Instructions on how to do
this are here <http://www.gnu.org/help/evaluation>.
this are here [http://www.gnu.org/help/evaluation].
Don't have a program to contribute? Look at all the other ways to
help: <https://www.gnu.org/help/help.html>.
help: [https://www.gnu.org/help/help.html].
And to learn more about Free (libre) Software in general, please read
and share this page: <https://gnu.org/philosophy/free-sw.html>
and share this page: [https://gnu.org/philosophy/free-sw.html]
3 License
@@ -56,7 +56,7 @@ Check the [Org Mode website] for more.
General Public License for more details.
You should have received a copy of the GNU General Public License
along with Org mode. If not, see <https://www.gnu.org/licenses/>.
along with Org mode. If not, see [https://www.gnu.org/licenses/].
[GNU GPLv3 license] <https://www.gnu.org/licenses/gpl-3.0.html>
[GNU GPLv3 license] https://www.gnu.org/licenses/gpl-3.0.html
+1 -1
View File
@@ -1,6 +1,6 @@
# SETUPFILE for Org manual
# Copyright (C) 2021-2022 Free Software Foundation, Inc.
# Copyright (C) 2021-2023 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
+8 -8
View File
@@ -10,7 +10,7 @@
:copying: t
:END:
Copyright \copy 2004--2022 Free Software Foundation, Inc.
Copyright \copy 2004--2023 Free Software Foundation, Inc.
#+begin_quote
Permission is granted to copy, distribute and/or modify this document
@@ -141,7 +141,7 @@ See [[*Miscellaneous]] for a setup to realize this.
Outlines make it possible to hide parts of the text in the buffer.
Org uses just two commands, bound to {{{kbd(TAB)}}} and
{{{kbd{S-TAB)}}} to change the visibility in the buffer.
{{{kbd(S-TAB)}}} to change the visibility in the buffer.
#+attr_texinfo: :sep ,
- {{{kbd(TAB)}}} ::
@@ -667,7 +667,7 @@ of the option ~org-todo-state-tags-triggers~ for details.
:DESCRIPTION: More than just on/off.
:END:
You can use TODO keywords to indicate @emph{sequential} working progress
You can use TODO keywords to indicate /sequential/ working progress
states:
#+begin_src emacs-lisp
@@ -1093,7 +1093,7 @@ a range of times---in a special format, either =<2003-09-16 Tue>= or
=<2003-09-16 Tue 09:39>= or =<2003-09-16 Tue 12:00-12:30>=.
A timestamp can appear anywhere in the headline or body of an Org tree
entry. Its presence causes entries to be shown on specific dates in
the agenda (see [[*The Weekly/daily Agenda]]). We distinguish:
the agenda (see [[*The Weekly/Daily Agenda]]). We distinguish:
- Plain timestamp; Event; Appointment ::
@@ -1111,8 +1111,8 @@ the agenda (see [[*The Weekly/daily Agenda]]). We distinguish:
A timestamp may contain a /repeater interval/, indicating that it
applies not only on the given date, but again and again after
a certain interval of N days (d), weeks (w), months (m), or years
(y). The following shows up in the agenda every Wednesday:
a certain interval of N hours (h), days (d), weeks (w), months (m),
or years (y). The following shows up in the agenda every Wednesday:
#+begin_example
,* Pick up Sam at school
@@ -1294,7 +1294,7 @@ a project.
a {{{kbd(C-u)}}} prefix argument, select the target task from a list
of recently clocked tasks.
The {{{kbd(l)}}} key may be used in the agenda (see [[*The Weekly/daily
The {{{kbd(l)}}} key may be used in the agenda (see [[*The Weekly/Daily
Agenda]]) to show which tasks have been worked on or closed during
a day.
@@ -1527,7 +1527,7 @@ commands:
#+attr_texinfo: :sep ,
- {{{kbd(a)}}} ::
Create the calendar-like agenda (see [[*The Weekly/daily Agenda]]).
Create the calendar-like agenda (see [[*The Weekly/Daily Agenda]]).
- {{{kbd(t)}}}, {{{kbd(T)}}} ::
+49 -34
View File
@@ -1249,11 +1249,12 @@ After the drawer.
#+findex: org-insert-drawer
You can interactively insert a drawer at point by calling
~org-insert-drawer~, which is bound to {{{kbd(C-c C-x d)}}}. With an
active region, this command puts the region inside the drawer. With
a prefix argument, this command calls ~org-insert-property-drawer~,
which creates a =PROPERTIES= drawer right below the current headline.
Org mode uses this special drawer for storing properties (see
[[*Properties and Columns]]). You cannot use it for anything else.
active region, this command puts the region inside the drawer. With a
prefix argument, this command calls non-interactive function
~org-insert-property-drawer~, which creates a =PROPERTIES= drawer
right below the current headline. Org mode uses this special drawer
for storing properties (see [[*Properties and Columns]]). You cannot use
it for anything else.
Completion over drawer keywords is also possible using
{{{kbd(M-TAB)}}}[fn:6].
@@ -1401,7 +1402,7 @@ you, configure the option ~org-table-auto-blank-field~.
- {{{kbd(M-x org-table-blank-field)}}} ::
#+findex: org-table-blank-field
Blank the field at point.
Blank the current table field or active region.
- {{{kbd(S-TAB)}}} (~org-table-previous-field~) ::
@@ -4561,7 +4562,7 @@ all children are done, you can use the following setup:
#+begin_src emacs-lisp
(defun org-summary-todo (n-done n-not-done)
"Switch entry to DONE when all subentries are done, to TODO otherwise."
(let (org-log-done org-log-states) ; turn off logging
(let (org-log-done org-todo-log-states) ; turn off logging
(org-todo (if (= n-not-done 0) "DONE" "TODO"))))
(add-hook 'org-after-todo-statistics-hook #'org-summary-todo)
@@ -5290,7 +5291,7 @@ The following commands help to work with properties:
Set a property in the current entry. Both the property and the
value can be inserted using completion.
- {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-values~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) ::
- {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-value~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) ::
#+kindex: S-RIGHT
#+kindex: S-LEFT
@@ -5957,8 +5958,9 @@ the agenda (see [[*Weekly/daily agenda]]). We distinguish:
#+findex: org-block
For more complex date specifications, Org mode supports using the
special expression diary entries implemented in the Emacs Calendar
package[fn:20]. For example, with optional time:
special expression diary entries implemented in the
[[info:emacs#Special Diary Entries][Emacs Calendar package]][fn:20].
For example, with optional time:
#+begin_example
,* 22:00-23:00 The nerd meeting on every 2nd Thursday of the month
@@ -8787,7 +8789,9 @@ a ~day~, ~week~, ~month~ or ~year~. For weekly agendas, the default
is to start on the previous Monday (see
~org-agenda-start-on-weekday~). You can also set the start date using
a date shift: =(setq org-agenda-start-day "+10d")= starts the agenda
ten days from today in the future.
ten days from today in the future. ~org-agenda-start-on-weekday~
takes precedence over ~org-agenda-start-day~ in weekly and bi-weekly
agendas.
Remote editing from the agenda buffer means, for example, that you can
change the dates of deadlines and appointments from the agenda buffer.
@@ -10249,9 +10253,9 @@ the other commands, point needs to be in the desired line.
Unmark entry for bulk action.
- {{{kbd(U)}}} (~org-agenda-bulk-remove-all-marks~) ::
- {{{kbd(U)}}} (~org-agenda-bulk-unmark-all~) ::
#+kindex: U
#+findex: org-agenda-bulk-remove-all-marks
#+findex: org-agenda-bulk-unmark-all
Unmark all marked entries for bulk action.
@@ -11689,9 +11693,9 @@ When the variable ~org-export-dispatch-use-expert-ui~ is set to
a non-~nil~ value, Org prompts in the minibuffer. To switch back to
the hierarchical menu, press {{{kbd(?)}}}.
- {{{kbd(C-c C-e)}}} (~org-export~) ::
- {{{kbd(C-c C-e)}}} (~org-export-dispatch~) ::
#+kindex: C-c C-e
#+findex: org-export
#+findex: org-export-dispatch
Invokes the export dispatcher interface. The options show default
settings. The {{{kbd(C-u)}}} prefix argument preserves options from
@@ -12229,7 +12233,7 @@ with the custom ID =theory=, you can use
The following command allows navigating to the included document:
- {{{kbd(C-c ')}}} (~org-edit~special~) ::
- {{{kbd(C-c ')}}} (~org-edit-special~) ::
#+kindex: C-c '
#+findex: org-edit-special
@@ -13722,7 +13726,7 @@ A sample Org file with the above headers:
#+vindex: org-export-default-language
LaTeX packages =babel= or =polyglossia= can also be loaded in a
document. The "AUTO" string will be replaced in both cases by the
appropiate value for the =LANGUAGE= keyword, if present in the
appropriate value for the =LANGUAGE= keyword, if present in the
document, or by the value of ~org-export-default-language~. Let's see
some examples in one or another case.
@@ -14360,10 +14364,10 @@ executable. Without it, export cannot finish.
:DESCRIPTION: Invoking export.
:END:
- {{{kbd(C-c C-e o o)}}} (~org-export-to-odt~) ::
- {{{kbd(C-c C-e o o)}}} (~org-odt-export-to-odt~) ::
#+kindex: C-c C-e o o
#+findex: org-export-to-odt
#+findex: org-odt-export-to-odt
Export as OpenDocument Text file.
#+cindex: @samp{EXPORT_FILE_NAME}, property
@@ -16030,7 +16034,12 @@ can remove every headline in the buffer during export like this:
"Remove all headlines in the current buffer.
BACKEND is the export back-end being used, as a symbol."
(org-map-entries
(lambda () (delete-region (point) (line-beginning-position 2)))))
(lambda ()
(delete-region (point) (line-beginning-position 2))
;; We need to tell `org-map-entries' to not skip over heading at
;; point. Otherwise, it would continue from _next_ heading. See
;; the docstring of `org-map-entries' for details.
(setq org-map-continue-from (point)))))
(add-hook 'org-export-before-parsing-hook #'my-headline-removal)
#+end_src
@@ -18093,7 +18102,8 @@ evaluating untrusted code blocks by prompting for a confirmation.
- =yes= ::
Org always evaluates the source code without asking permission.
Org evaluates the source code, possibly asking permission according
to ~org-confirm-babel-evaluate~.
- =never= or =no= ::
@@ -18491,7 +18501,7 @@ options; they are mutually exclusive.
Ignore the results completely. This option is similar to =none=,
but no processing is performed on the return value. Calling the
code block programatically (see [[*How to evaluate source code]]) or by
code block programmatically (see [[*How to evaluate source code]]) or by
reference (see [[*Passing arguments]] and [[*Noweb Reference Syntax]]) will
always yield nil.
@@ -18784,7 +18794,7 @@ a octal shorthand is defined, =oXXX= (=o= for octal). Using this, our
read-only example is =:tangle-mode o444=. Omitting the =o= prefix will
cause the argument to be interpreted as an integer, which can lead to
unexpected results (=444= is the same as =o674=).
Two other shorthands are recognised, ls-style strings like
Two other shorthands are recognized, ls-style strings like
=rw-r--r--=, and chmod-style permissions like =g+w=.
Note that chmod-style permissions are based on
~org-babel-tangle-default-file-mode~, which is =#o544= by default.
@@ -18792,7 +18802,7 @@ Note that chmod-style permissions are based on
When =:tangle-mode= and =:shebang= are both specified, the give
=:tangle-mode= will override the permissions from =:shebang=. When
multiple source code blocks tangle to a single file with conflicting
=:tangle-mode= header arguments, Org's behaviour is undefined.
=:tangle-mode= header arguments, Org's behavior is undefined.
#+cindex: @samp{no-expand}, header argument
By default Org expands code blocks during tangling. The =no-expand=
@@ -20021,11 +20031,16 @@ changes.
| =nofnadjust= | Do not renumber and sort automatically. |
#+vindex: org-hide-block-startup
To hide blocks on startup, use these keywords. The
corresponding variable is ~org-hide-block-startup~.
#+vindex: org-hide-drawer-startup
To hide blocks or drawers on startup, use these keywords. The
corresponding variables are ~org-hide-block-startup~ and
~org-hide-drawer-startup~.
| =hideblocks= | Hide all begin/end blocks on startup. |
| =nohideblocks= | Do not hide blocks on startup. |
| =hidedrawers= | Hide all begin/end blocks on startup. |
| =nohidedrawers= | Do not hide blocks on startup. |
| =hideblocks= | Hide all begin/end blocks on startup. |
| =nohideblocks= | Do not hide blocks on startup. |
#+vindex: org-pretty-entities
The display of entities as UTF-8 characters is governed by the
@@ -20251,12 +20266,12 @@ packages are documented here.
#+vindex: org-table-formula-constants
Org can use names for constants in formulas in tables. Org can also
use calculation suffixes for units, such as =M= for =Mega=. For
a standard collection of such constants, install the =constants=
use calculation suffixes for units, such as =M= for =Mega=. For a
standard collection of such constants, install the =constants=
package. Install version 2.0 of this package, available at
[[http://www.astro.uva.nl/~dominik/Tools]]. Org checks if the function
~constants-get~ has been autoloaded. Installation instructions are
in the file =constants.el=.
[[https://github.com/cdominik/constants-for-Emacs]]. Org checks if the
function ~constants-get~ has been autoloaded. Installation
instructions are in the file =constants.el=.
- =cdlatex.el= by Carsten Dominik ::
#+cindex: @file{cdlatex.el}
@@ -22300,7 +22315,7 @@ that are mentioned in the manual. For a more complete list, use
This manual is for Org version {{{version}}}.
Copyright \copy 2004--2022 Free Software Foundation, Inc.
Copyright \copy 2004--2023 Free Software Foundation, Inc.
#+begin_quote
Permission is granted to copy, distribute and/or modify this document
+2 -2
View File
@@ -1,3 +1,3 @@
@c automatically generated, do not edit
@set VERSION 9.6 ()
@set DATE 2022-12-17
@set VERSION 9.6.11 ()
@set DATE 2023-11-04
+56 -39
View File
@@ -15,7 +15,7 @@
@copying
This manual is for Org version 9.6.
Copyright @copyright{} 2004--2022 Free Software Foundation, Inc.
Copyright @copyright{} 2004--2023 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -1776,11 +1776,12 @@ After the drawer.
@findex org-insert-drawer
You can interactively insert a drawer at point by calling
@code{org-insert-drawer}, which is bound to @kbd{C-c C-x d}. With an
active region, this command puts the region inside the drawer. With
a prefix argument, this command calls @code{org-insert-property-drawer},
which creates a @samp{PROPERTIES} drawer right below the current headline.
Org mode uses this special drawer for storing properties (see
@ref{Properties and Columns}). You cannot use it for anything else.
active region, this command puts the region inside the drawer. With a
prefix argument, this command calls non-interactive function
@code{org-insert-property-drawer}, which creates a @samp{PROPERTIES} drawer
right below the current headline. Org mode uses this special drawer
for storing properties (see @ref{Properties and Columns}). You cannot use
it for anything else.
Completion over drawer keywords is also possible using
@kbd{M-@key{TAB}}@footnote{Many desktops intercept @kbd{M-@key{TAB}} to switch windows.
@@ -1929,7 +1930,7 @@ necessary.
@item @kbd{M-x org-table-blank-field}
@findex org-table-blank-field
Blank the field at point.
Blank the current table field or active region.
@item @kbd{S-@key{TAB}} (@code{org-table-previous-field})
@kindex S-TAB
@@ -5116,7 +5117,7 @@ all children are done, you can use the following setup:
@lisp
(defun org-summary-todo (n-done n-not-done)
"Switch entry to DONE when all subentries are done, to TODO otherwise."
(let (org-log-done org-log-states) ; turn off logging
(let (org-log-done org-todo-log-states) ; turn off logging
(org-todo (if (= n-not-done 0) "DONE" "TODO"))))
(add-hook 'org-after-todo-statistics-hook #'org-summary-todo)
@@ -5882,7 +5883,7 @@ With point in a property drawer, this executes property commands.
Set a property in the current entry. Both the property and the
value can be inserted using completion.
@item @kbd{S-@key{RIGHT}} (@code{org-property-next-allowed-values})
@item @kbd{S-@key{RIGHT}} (@code{org-property-next-allowed-value})
@itemx @kbd{S-@key{LEFT}} (@code{org-property-previous-allowed-value})
@kindex S-RIGHT
@kindex S-LEFT
@@ -6573,8 +6574,8 @@ or years (y). The following shows up in the agenda every Wednesday:
@findex org-block
For more complex date specifications, Org mode supports using the
special expression diary entries implemented in the Emacs Calendar
package@footnote{When working with the standard diary expression functions, you
special expression diary entries implemented in the
@ref{Special Diary Entries,Emacs Calendar package,,emacs,}@footnote{When working with the standard diary expression functions, you
need to be very careful with the order of the arguments. That order
depends evilly on the variable @code{calendar-date-style}. For example, to
specify a date December 1, 2005, the call might look like
@@ -6585,7 +6586,8 @@ these functions, namely @code{org-date}, @code{org-anniversary}, @code{org-cycli
~org-block}. These work just like the corresponding @code{diary-}
functions, but with stable ISO order of arguments (year, month, day)
wherever applicable, independent of the value of
@code{calendar-date-style}.}. For example, with optional time:
@code{calendar-date-style}.}.
For example, with optional time:
@example
* 22:00-23:00 The nerd meeting on every 2nd Thursday of the month
@@ -9435,7 +9437,9 @@ a @code{day}, @code{week}, @code{month} or @code{year}. For weekly agendas, the
is to start on the previous Monday (see
@code{org-agenda-start-on-weekday}). You can also set the start date using
a date shift: @samp{(setq org-agenda-start-day "+10d")} starts the agenda
ten days from today in the future.
ten days from today in the future. @code{org-agenda-start-on-weekday}
takes precedence over @code{org-agenda-start-day} in weekly and bi-weekly
agendas.
Remote editing from the agenda buffer means, for example, that you can
change the dates of deadlines and appointments from the agenda buffer.
@@ -10848,9 +10852,9 @@ Mark all visible agenda entries for bulk action.
Unmark entry for bulk action.
@item @kbd{U} (@code{org-agenda-bulk-remove-all-marks})
@item @kbd{U} (@code{org-agenda-bulk-unmark-all})
@kindex U
@findex org-agenda-bulk-remove-all-marks
@findex org-agenda-bulk-unmark-all
Unmark all marked entries for bulk action.
@@ -12359,9 +12363,9 @@ a non-@code{nil} value, Org prompts in the minibuffer. To switch back to
the hierarchical menu, press @kbd{?}.
@table @asis
@item @kbd{C-c C-e} (@code{org-export})
@item @kbd{C-c C-e} (@code{org-export-dispatch})
@kindex C-c C-e
@findex org-export
@findex org-export-dispatch
Invokes the export dispatcher interface. The options show default
settings. The @kbd{C-u} prefix argument preserves options from
@@ -12886,7 +12890,7 @@ with the custom ID @samp{theory}, you can use
The following command allows navigating to the included document:
@table @asis
@item @kbd{C-c '} (@code{org-edit~special})
@item @kbd{C-c '} (@code{org-edit-special})
@kindex C-c '
@findex org-edit-special
@@ -14449,7 +14453,7 @@ A sample Org file with the above headers:
@vindex org-export-default-language
@LaTeX{} packages @samp{babel} or @samp{polyglossia} can also be loaded in a
document. The ``AUTO'' string will be replaced in both cases by the
appropiate value for the @samp{LANGUAGE} keyword, if present in the
appropriate value for the @samp{LANGUAGE} keyword, if present in the
document, or by the value of @code{org-export-default-language}. Let's see
some examples in one or another case.
@@ -15084,9 +15088,9 @@ executable. Without it, export cannot finish.
@subsection ODT export commands
@table @asis
@item @kbd{C-c C-e o o} (@code{org-export-to-odt})
@item @kbd{C-c C-e o o} (@code{org-odt-export-to-odt})
@kindex C-c C-e o o
@findex org-export-to-odt
@findex org-odt-export-to-odt
Export as OpenDocument Text file.
@cindex @samp{EXPORT_FILE_NAME}, property
@@ -16765,7 +16769,12 @@ can remove every headline in the buffer during export like this:
"Remove all headlines in the current buffer.
BACKEND is the export back-end being used, as a symbol."
(org-map-entries
(lambda () (delete-region (point) (line-beginning-position 2)))))
(lambda ()
(delete-region (point) (line-beginning-position 2))
;; We need to tell `org-map-entries' to not skip over heading at
;; point. Otherwise, it would continue from _next_ heading. See
;; the docstring of `org-map-entries' for details.
(setq org-map-continue-from (point)))))
(add-hook 'org-export-before-parsing-hook #'my-headline-removal)
@end lisp
@@ -16842,7 +16851,7 @@ is the type targeted by the filter. Valid types are:
@tab verse-block
@end multitable
Here is an example filter that replaces non-breaking spaces ~ ~ in the
Here is an example filter that replaces non-breaking spaces @code{ } in the
Org buffer with @samp{~} for the @LaTeX{} back-end.
@lisp
@@ -19106,7 +19115,8 @@ evaluating untrusted code blocks by prompting for a confirmation.
@table @asis
@item @samp{yes}
Org always evaluates the source code without asking permission.
Org evaluates the source code, possibly asking permission according
to @code{org-confirm-babel-evaluate}.
@item @samp{never} or @samp{no}
Org never evaluates the source code.
@@ -19475,7 +19485,7 @@ Usage example: @samp{:results none}.
@item @samp{discard}
Ignore the results completely. This option is similar to @samp{none},
but no processing is performed on the return value. Calling the
code block programatically (see @ref{How to evaluate source code}) or by
code block programmatically (see @ref{How to evaluate source code}) or by
reference (see @ref{Passing arguments} and @ref{Noweb Reference Syntax}) will
always yield nil.
@@ -19756,7 +19766,7 @@ a octal shorthand is defined, @samp{oXXX} (@samp{o} for octal). Using this, our
read-only example is @samp{:tangle-mode o444}. Omitting the @samp{o} prefix will
cause the argument to be interpreted as an integer, which can lead to
unexpected results (@samp{444} is the same as @samp{o674}).
Two other shorthands are recognised, ls-style strings like
Two other shorthands are recognized, ls-style strings like
@samp{rw-r--r--}, and chmod-style permissions like @samp{g+w}.
Note that chmod-style permissions are based on
@code{org-babel-tangle-default-file-mode}, which is @samp{#o544} by default.
@@ -19764,7 +19774,7 @@ Note that chmod-style permissions are based on
When @samp{:tangle-mode} and @samp{:shebang} are both specified, the give
@samp{:tangle-mode} will override the permissions from @samp{:shebang}. When
multiple source code blocks tangle to a single file with conflicting
@samp{:tangle-mode} header arguments, Org's behaviour is undefined.
@samp{:tangle-mode} header arguments, Org's behavior is undefined.
@cindex @samp{no-expand}, header argument
By default Org expands code blocks during tangling. The @samp{no-expand}
@@ -21136,15 +21146,23 @@ corresponding variables are @code{org-footnote-define-inline},
@end multitable
@vindex org-hide-block-startup
To hide blocks on startup, use these keywords. The
corresponding variable is @code{org-hide-block-startup}.
@vindex org-hide-drawer-startup
To hide blocks or drawers on startup, use these keywords. The
corresponding variables are @code{org-hide-block-startup} and
@code{org-hide-drawer-startup}.
@multitable {aaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@multitable {aaaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@item @samp{hideblocks}
@tab Hide all begin/end blocks on startup.
@item @samp{nohideblocks}
@tab Do not hide blocks on startup.
@item @samp{hidedrawers}
@tab Hide all begin/end blocks on startup.
@item @samp{nohidedrawers}
@tab Do not hide blocks on startup.
@end multitable
@end table
@vindex org-pretty-entities
The display of entities as UTF-8 characters is governed by the
@@ -21157,6 +21175,7 @@ variable @code{org-pretty-entities} and the keywords
@tab Leave entities plain.
@end multitable
@table @asis
@item @samp{#+TAGS: TAG1(c1) TAG2(c2)}
@cindex @samp{TAGS}, keyword
@vindex org-tag-alist
@@ -21164,9 +21183,7 @@ These lines (several such lines are allowed) specify the valid tags
in this file, and (potentially) the corresponding @emph{fast tag
selection} keys. The corresponding variable is @code{org-tag-alist}.
@item @samp{#+TODO:}
@itemx @samp{#+SEQ_TODO:}
@itemx @samp{#+TYP_TODO:}
@item @samp{#+TODO:}, @samp{#+SEQ_TODO:}, @samp{#+TYP_TODO:}
@cindex @samp{SEQ_TODO}, keyword
@cindex @samp{TODO}, keyword
@cindex @samp{TYP_TODO}, keyword
@@ -21380,12 +21397,12 @@ embedded calculations. See @ref{Embedded Mode,GNU Emacs Calc Manual,,calc,}.
@vindex org-table-formula-constants
Org can use names for constants in formulas in tables. Org can also
use calculation suffixes for units, such as @samp{M} for @samp{Mega}. For
a standard collection of such constants, install the @samp{constants}
use calculation suffixes for units, such as @samp{M} for @samp{Mega}. For a
standard collection of such constants, install the @samp{constants}
package. Install version 2.0 of this package, available at
@uref{http://www.astro.uva.nl/~dominik/Tools}. Org checks if the function
@code{constants-get} has been autoloaded. Installation instructions are
in the file @samp{constants.el}.
@uref{https://github.com/cdominik/constants-for-Emacs}. Org checks if the
function @code{constants-get} has been autoloaded. Installation
instructions are in the file @samp{constants.el}.
@item @samp{cdlatex.el} by Carsten Dominik
@cindex @file{cdlatex.el}
@@ -24106,4 +24123,4 @@ that are mentioned in the manual. For a more complete list, use
@printindex vr
@bye
@bye
+2 -2
View File
@@ -15,7 +15,7 @@
\pdflayout=(0l)
% Nothing else needs to be changed below this line.
% Copyright (C) 1987, 1993, 1996--1997, 2001--2022 Free Software
% Copyright (C) 1987, 1993, 1996--1997, 2001--2023 Free Software
% Foundation, Inc.
% This document is free software: you can redistribute it and/or modify
@@ -324,7 +324,7 @@
\key{archive subtree using the default command}{C-c C-x C-a}
\key{move subtree to archive file}{C-c C-x C-s}
\key{toggle ARCHIVE tag / to ARCHIVE sibling}{C-c C-x a/A}
\key{force cycling of an ARCHIVEd tree}{C-TAB}
\key{force cycling of an ARCHIVEd tree}{C-c C-TAB}
\section{Filtering and Sparse Trees}
+9 -9
View File
@@ -13,7 +13,7 @@
@c %**end of header
@copying
Copyright @copyright{} 2004--2022 Free Software Foundation, Inc.
Copyright @copyright{} 2004--2023 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -257,7 +257,7 @@ See @ref{Miscellaneous} for a setup to realize this.
Outlines make it possible to hide parts of the text in the buffer.
Org uses just two commands, bound to @kbd{@key{TAB}} and
@{@{@{kbd@{S-TAB)@}@}@} to change the visibility in the buffer.
@kbd{S-@key{TAB}} to change the visibility in the buffer.
@table @asis
@item @kbd{@key{TAB}}
@@ -795,7 +795,7 @@ of the option @code{org-todo-state-tags-triggers} for details.
@node Multi-state Workflow
@section Multi-state Workflow
You can use TODO keywords to indicate @@emph@{sequential@} working progress
You can use TODO keywords to indicate @emph{sequential} working progress
states:
@lisp
@@ -1220,7 +1220,7 @@ a range of times---in a special format, either @samp{<2003-09-16 Tue>} or
@samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 Tue 12:00-12:30>}.
A timestamp can appear anywhere in the headline or body of an Org tree
entry. Its presence causes entries to be shown on specific dates in
the agenda (see [BROKEN LINK: *The Weekly/daily Agenda]). We distinguish:
the agenda (see @ref{Built-in Agenda Views}). We distinguish:
@table @asis
@item Plain timestamp; Event; Appointment
@@ -1237,8 +1237,8 @@ just like writing down an appointment or event in a paper agenda.
@item Timestamp with repeater interval
A timestamp may contain a @emph{repeater interval}, indicating that it
applies not only on the given date, but again and again after
a certain interval of N days (d), weeks (w), months (m), or years
(y). The following shows up in the agenda every Wednesday:
a certain interval of N hours (h), days (d), weeks (w), months (m),
or years (y). The following shows up in the agenda every Wednesday:
@example
* Pick up Sam at school
@@ -1411,7 +1411,7 @@ a @kbd{C-u} prefix argument, select the target task from a list
of recently clocked tasks.
@end table
The @kbd{l} key may be used in the agenda (see [BROKEN LINK: *The Weekly/daily Agenda]) to show which tasks have been worked on or closed during
The @kbd{l} key may be used in the agenda (see @ref{Built-in Agenda Views}) to show which tasks have been worked on or closed during
a day.
@node Capture Refile Archive
@@ -1646,7 +1646,7 @@ commands:
@table @asis
@item @kbd{a}
Create the calendar-like agenda (see [BROKEN LINK: *The Weekly/daily Agenda]).
Create the calendar-like agenda (see @ref{Built-in Agenda Views}).
@item @kbd{t}
@itemx @kbd{T}
@@ -2685,4 +2685,4 @@ support in a file, use
#+STARTUP: hidestars odd
@end example
@bye
@bye
+68 -69
View File
@@ -6,12 +6,11 @@ ORG NEWS -- history of user-visible changes. -*- mode: org; coding: utf-8 -*-
#+LINK: msg https://list.orgmode.org/%s/
#+LINK: git https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=%s
Copyright (C) 2012-2022 Free Software Foundation, Inc.
Copyright (C) 2012-2023 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
* Version 9.7 (not released yet)
* Version 9.6
** Important announcements and breaking changes
@@ -25,7 +24,7 @@ the time being. It will be removed in the next release.
See https://orgmode.org/list/87r0yk7bx8.fsf@localhost for more details.
*** Element cache is enabled by default and work for headings
*** Element cache is enabled by default and works for headings
The old element cache code has been refactored. Emacs does not hang
anymore when the cache is enabled.
@@ -56,7 +55,7 @@ The old folding backend used in Org is poorly scalable when the file
size increases beyond few Mbs. The symptoms usually include slow
cursor motion, especially in long-running Emacs sessions.
A new optimised folding backend is now available, and enabled by
A new optimized folding backend is now available, and enabled by
default. To disable it, put the following to the Emacs config *before*
loading Org:
@@ -64,14 +63,14 @@ loading Org:
(setq org-fold-core-style 'overlays)
#+end_src
Even more performance optimisation can be enabled by customising
Even more performance optimization can be enabled by customizing
=org-fold-core--optimise-for-huge-buffers=. However, this option may
be dangerous. Please, read the variable docstring carefully to
understand the possible consequences.
When =org-fold-core-style= is set to =text-properties=, several new
features will become available and several notable changes will happen
to the Org behaviour. The new features and changes are listed below.
to the Org behavior. The new features and changes are listed below.
**** Hidden parts of the links can now be searched and revealed during isearch
@@ -79,7 +78,7 @@ In the past, hidden parts of the links could not be searched using
isearch (=C-s=). Now, they are searchable by default. The hidden
match is also revealed temporarily during isearch.
To restore the old behaviour add the following core to your Emacs
To restore the old behavior add the following core to your Emacs
config:
#+begin_src emacs-lisp
@@ -131,13 +130,13 @@ Now, it is not the case anymore. The drawer folding state is
preserved. The initial folding state of all the drawers in buffer is
set according to the startup visibility settings.
To restore the old behaviour, add the following code to Emacs config:
To restore the old behavior, add the following code to Emacs config:
#+begin_src emacs-lisp
(add-hook 'org-cycle-hook #'org-cycle-hide-drawers)
#+end_src
Note that old behaviour may cause performance issues when cycling
Note that old behavior may cause performance issues when cycling
headline visibility in large buffers.
**** =outline-*= functions may no longer work correctly in Org mode
@@ -187,6 +186,40 @@ network (CDN) provider from CloudFlare to jsDelivr. You can find the
new terms of service, including the privacy policy, at
https://www.jsdelivr.com/terms.
*** List references in source block variable assignments are now proper lists
List representation of named lists is now converted to a simple list
as promised by the manual section [[info:org#Environment of a Code Block][org#Environment of a Code Block]].
Previously, it was converted to a list of lists.
Before:
#+begin_src org
,#+NAME: example-list
- simple
- not
- nested
- list
,#+BEGIN_SRC emacs-lisp :var x=example-list :results value
(format "%S" x)
,#+END_SRC
,#+RESULTS:
: (("simple" (unordered ("not") ("nested"))) ("list"))
#+end_src
After:
#+begin_src org
,#+BEGIN_SRC emacs-lisp :var x=example-list :results value
(format "%S" x)
,#+END_SRC
,#+RESULTS:
: ("simple" "list")
#+end_src
** New features
*** Clock table can now produce quarterly reports
@@ -299,13 +332,13 @@ When the block type starts from the upper case, structure template
will now insert =#+BEGIN_TYPE=. Previously, lower-case =#+begin_type= was inserted unconditionally.
*** New ox-latex tabbing support for tables.
Latex tables can now be exported to the latex tabbing environment
LaTeX tables can now be exported to the latex tabbing environment
tabbing environment]].
This is done by adding =#+ATTR_LATEX: :mode tabbing= at the top
of the table.
The default column width is set to 1/n times the latex textwidth,
where n is the number of columns.
This behaviour can be changed by supplying a =:align= parameter.
This behavior can be changed by supplying a =:align= parameter.
The tabbing environment can be useful when generating simple tables which
can be span multiple pages and when table cells are allowed to overflow.
@@ -391,6 +424,13 @@ attempt to analyze the results and simply returns nil. This can be
useful when the code block is used for side effects only but generates
large outputs that may be slow to analyze for Org.
*** Add Capture template hook properties
Capture templates can now attach template specific hooks via the
following properties: ~:hook~, ~:prepare-finalize~,
~:before-finalize~, ~:after-finalize~. These nullary functions run
prior to their global counterparts for the selected template.
** New options
*** A new option for custom setting ~org-refile-use-outline-path~ to show document title in refile targets
@@ -445,6 +485,13 @@ The new setting, when set to non-nil, makes Org create alarm at the
event time when the alarm time is set to 0. The default value is
nil -- do not create alarms at the event time.
*** New special value ~'attach~ for src block =:dir= option
Passing the symbol ~attach~ or string ="'attach"= (with quotes) to the =:dir=
option of a src block is now equivalent to =:dir (org-attach-dir) :mkdir yes=
and any file results with a path descended from the attachment directory will
use =attachment:= style links instead of the standard =file:= link type.
** New functions and changes in function arguments
*** New function ~org-get-title~ to get =#+TITLE:= property from buffers
@@ -480,7 +527,7 @@ Diagnostic information about execution speed can be provided according
to ~org-element--cache-map-statistics~ and
~org-element--cache-map-statistics-threshold~.
~org-scan-tags~ and tag views in agenda utilise the new function.
~org-scan-tags~ and tag views in agenda utilize the new function.
*** New function ~org-element-at-point-no-context~
This function is like ~org-element-at-point~, but it does not try to
@@ -505,10 +552,10 @@ argument.
This function is intended for us in the definition of a ~kbd~ macro in
files that are exported to Texinfo.
*** =org-at-heading-p= now recognises optional argument. Its meaning is inverted.
*** =org-at-heading-p= now recognizes optional argument. Its meaning is inverted.
=org-at-heading-p= now returns t by default on headings inside folds.
Passing optional argument will produce the old behaviour.
Passing optional argument will produce the old behavior.
*** =org-babel-execute:plantuml= can output ASCII graphs in the buffer
@@ -632,7 +679,7 @@ a function (called with the same arguments as
An example of a such function for =info:= links is
~org-info-description-as-command~. To access a manual section outside
of Org, description may be pasted to shell prompt or evaluated withing
of Org, description may be pasted to shell prompt or evaluated within
Emacs using =M-:= (wrapped into parenthesis). For example,
description of the =info:org#Tags= link is =info "(org) Tags"=. To
restore earlier behavior add to your Emacs init file the following:
@@ -686,7 +733,7 @@ following snippet to allow multiple different ID formats in Org files.
(and (or (org-uuidgen-p id)
(string-match-p "[0-9a-z]\\{12\\}" id))
(org-attach-id-uuid-folder-format id)))
;; When ID looks like a timestap-based ID. Group by year-month
;; When ID looks like a timestamp-based ID. Group by year-month
;; folders.
(lambda (id)
(and (string-match-p "[0-9]\\{8\\}T[0-9]\\{6\\}\.[0-9]\\{6\\}" id)
@@ -796,40 +843,6 @@ If you prefer to keep the keybinding, you can add it back to
(define-key org-mode-map (kbd "C-c SPC") #'org-table-blank-field)
#+end_src
*** List references in source block variable assignments are now proper lists
List representation of named lists is now converted to a simple list
as promised by the manual section [[info:org#Environment of a Code Block][org#Environment of a Code Block]].
Previously, it was converted to a list of lists.
Before:
#+begin_src org
,#+NAME: example-list
- simple
- not
- nested
- list
,#+BEGIN_SRC emacs-lisp :var x=example-list :results value
(format "%S" x)
,#+END_SRC
,#+RESULTS:
: (("simple" (unordered ("not") ("nested"))) ("list"))
#+end_src
After:
#+begin_src org
,#+BEGIN_SRC emacs-lisp :var x=example-list :results value
(format "%S" x)
,#+END_SRC
,#+RESULTS:
: ("simple" "list")
#+end_src
** New features
*** New citation engine
@@ -878,13 +891,6 @@ When exiting capture mode via ~org-capture-refile~, the variable
~org-refile-targets~ will be temporarily bound to the value of this
template option.
*** Add Capture template hook properties
Capture templates can now attach template specific hooks via the
following properties: ~:hook~, ~:prepare-finalize~,
~:before-finalize~, ~:after-finalize~. These nullary functions run
prior to their global counterparts for the selected template.
*** New startup options =#+startup: show<n>levels=
These startup options complement the existing =overview=, =content=,
@@ -1214,13 +1220,6 @@ Finally, the closures are only evaluated if they're not overridden for
a source block. This improves efficiency in cases where the result of
a compute-expensive closure would otherwise be discarded.
*** New special value ~'attach~ for src block =:dir= option
Passing the symbol ~attach~ or string ="'attach"= (with quotes) to the =:dir=
option of a src block is now equivalent to =:dir (org-attach-dir) :mkdir yes=
and any file results with a path descended from the attachment directory will
use =attachment:= style links instead of the standard =file:= link type.
** Miscellaneous
*** =org-bibtex= includes =doi= and =url= entries when exporting to BiBTeX
=doi= and =url= entries have been made optional for some publication
@@ -4285,7 +4284,7 @@ parameters specific to some pre-defined translators, e.g.,
~:environment~ and ~:booktabs~ for ~orgtbl-to-latex~. See translators
docstrings (including ~orgtbl-to-generic~) for details.
*** Non-floating minted listings in Latex export
*** Non-floating minted listings in LaTeX export
It is not possible to specify =#+attr_latex: :float nil= in conjunction
with source blocks exported by the minted package.
@@ -5432,9 +5431,9 @@ doing computation.
There are now three lookup functions:
- [[doc:org-loopup-first][org-loopup-first]]
- [[doc:org-loopup-last][org-loopup-last]]
- [[doc:org-loopup-all][org-loopup-all]]
- [[doc:org-lookup-first][org-lookup-first]]
- [[doc:org-lookup-last][org-lookup-last]]
- [[doc:org-lookup-all][org-lookup-all]]
See [[https://orgmode.org/org.html#Lookup-functions][the manual]] for details.
*** Startup keywords
@@ -6541,7 +6540,7 @@ that Calc formulas can operate on them.
*** Hyperlinks
**** Org-Bibtex -- major improvements
**** Org-BibTeX -- major improvements
Provides support for managing bibtex bibliographical references
data in headline properties. Each headline corresponds to a
+1 -1
View File
@@ -1,7 +1,7 @@
The files OrgOdtContentTemplate.xml and OrgOdtStyles.xml have the
following copyright information:
Copyright (C) 2010-2022 Free Software Foundation, Inc.
Copyright (C) 2010-2023 Free Software Foundation, Inc.
These files are part of GNU Emacs.
+2 -2
View File
@@ -1,6 +1,6 @@
;;; ob-C.el --- Babel Functions for C and Similar Languages -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Thierry Banel
@@ -339,7 +339,7 @@ FORMAT can be either a format string or a function which is called with VAL."
(type
(pcase basetype
(`integerp '("int" "%d"))
(`floatp '("double" "%f"))
(`floatp '("double" "%s")) ;; %f rounds, use %s to print the float literally
(`stringp
(list
(if (eq org-babel-c-variant 'd) "string" "const char*")
+6 -5
View File
@@ -1,6 +1,6 @@
;;; ob-R.el --- Babel Functions for R -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Dan Davison
@@ -36,7 +36,7 @@
(require 'ob)
(declare-function orgtbl-to-tsv "org-table" (table params))
(declare-function R "ext:essd-r" (&optional start-args))
(declare-function run-ess-r "ext:ess-r-mode" (&optional start-args))
(declare-function inferior-ess-send-input "ext:ess-inf" ())
(declare-function ess-make-buffer-current "ext:ess-inf" ())
(declare-function ess-eval-buffer "ext:ess-inf" (vis))
@@ -241,11 +241,11 @@ This function is called by `org-babel-execute-src-block'."
(defun org-babel-R-assign-elisp (name value colnames-p rownames-p)
"Construct R code assigning the elisp VALUE to a variable named NAME."
(if (listp value)
(let* ((lengths (mapcar 'length (cl-remove-if-not 'sequencep value)))
(let* ((lengths (mapcar 'length (cl-remove-if-not 'listp value)))
(max (if lengths (apply 'max lengths) 0))
(min (if lengths (apply 'min lengths) 0)))
;; Ensure VALUE has an orgtbl structure (depth of at least 2).
(unless (listp (car value)) (setq value (list value)))
(unless (listp (car value)) (setq value (mapcar 'list value)))
(let ((file (orgtbl-to-tsv value '(:fmt org-babel-R-quote-tsv-field)))
(header (if (or (eq (nth 1 value) 'hline) colnames-p)
"TRUE" "FALSE"))
@@ -276,7 +276,8 @@ This function is called by `org-babel-execute-src-block'."
(when (get-buffer session)
;; Session buffer exists, but with dead process
(set-buffer session))
(require 'ess) (R)
(require 'ess-r-mode)
(set-buffer (run-ess-r))
(let ((R-proc (get-process (or ess-local-process-name
ess-current-process-name))))
(while (process-get R-proc 'callbacks)
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-awk.el --- Babel Functions for Awk -*- lexical-binding: t; -*-
;; Copyright (C) 2011-2022 Free Software Foundation, Inc.
;; Copyright (C) 2011-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Tyler Smith <tyler@plantarum.ca>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-calc.el --- Babel Functions for Calc -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Tom Gillespie <tgbugs@gmail.com>
+5 -5
View File
@@ -1,6 +1,6 @@
;;; ob-clojure.el --- Babel Functions for Clojure -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Joel Boehland, Eric Schulte, Oleh Krehel, Frederick Giasson
;; Maintainer: Daniel Kraus <daniel@kraus.my>
@@ -101,13 +101,13 @@
(defcustom ob-clojure-babashka-command (executable-find "bb")
"Path to the babashka executable."
:type 'file
:type '(choice file (const nil))
:group 'org-babel
:package-version '(Org . "9.6"))
(defcustom ob-clojure-nbb-command (executable-find "nbb")
"Path to the nbb executable."
:type 'file
:type '(choice file (const nil))
:group 'org-babel
:package-version '(Org . "9.6"))
@@ -248,8 +248,8 @@ or set the `:backend' header argument"))))
"value")))
result0)))
(ob-clojure-string-or-list
;; Filter out s-expressions that return `nil' (string "nil"
;; from nrepl eval) or comment forms (actual `nil' from nrepl)
;; Filter out s-expressions that return nil (string "nil"
;; from nrepl eval) or comment forms (actual nil from nrepl)
(reverse (delete "" (mapcar (lambda (r)
(replace-regexp-in-string "nil" "" (or r "")))
result0)))))))
+21 -18
View File
@@ -1,6 +1,6 @@
;;; ob-comint.el --- Babel Functions for Interaction with Comint Buffers -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, comint
@@ -81,19 +81,7 @@ or user `keyboard-quit' during execution of body."
(let* ((string-buffer "")
(comint-output-filter-functions
(cons (lambda (text)
(setq string-buffer
(concat
string-buffer
;; Upon concatenation, the prompt may no
;; longer match `comint-prompt-regexp'.
;; In particular, when the regexp has ^
;; and the output does not contain
;; trailing newline. Use more reliable
;; match to split the output later.
(replace-regexp-in-string
comint-prompt-regexp
,org-babel-comint-prompt-separator
text))))
(setq string-buffer (concat string-buffer text)))
comint-output-filter-functions))
dangling-text)
;; got located, and save dangling text
@@ -108,15 +96,30 @@ or user `keyboard-quit' during execution of body."
(while (progn
(goto-char comint-last-input-end)
(not (save-excursion
(and (re-search-forward
(regexp-quote ,eoe-indicator) nil t)
(re-search-forward
comint-prompt-regexp nil t)))))
(and (re-search-forward
(regexp-quote ,eoe-indicator) nil t)
(re-search-forward
comint-prompt-regexp nil t)))))
(accept-process-output (get-buffer-process (current-buffer))))
;; replace cut dangling text
(goto-char (process-mark (get-buffer-process (current-buffer))))
(insert dangling-text)
;; Filter out prompts.
(setq string-buffer
(replace-regexp-in-string
;; Sometimes, we get multiple agglomerated
;; prompts together in a single output:
;; "prompt prompt prompt output"
;; Remove them progressively, so that
;; possible "^" in the prompt regexp gets to
;; work as we remove the heading prompt
;; instance.
(if (string-prefix-p "^" comint-prompt-regexp)
(format "^\\(%s\\)+" (substring comint-prompt-regexp 1))
comint-prompt-regexp)
,org-babel-comint-prompt-separator
string-buffer))
;; remove echo'd FULL-BODY from input
(when (and ,remove-echo ,full-body
(string-match
+28 -22
View File
@@ -1,6 +1,6 @@
;;; ob-core.el --- Working with Code Blocks -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
@@ -1690,6 +1690,7 @@ shown below.
(append
(split-string (if (stringp raw-result)
raw-result
;; FIXME: Arbitrary code evaluation.
(eval raw-result t)))
(cdr (assq :result-params params))))))
(append
@@ -1931,12 +1932,12 @@ buffer or nil if no such result exists."
(defun org-babel-result-names (&optional file)
"Return the names of results in FILE or the current buffer."
(save-excursion
(when file (find-file file)) (goto-char (point-min))
(let ((case-fold-search t) names)
(with-current-buffer (if file (find-file-noselect file) (current-buffer))
(org-with-point-at 1
(let ((case-fold-search t) names)
(while (re-search-forward org-babel-result-w-name-regexp nil t)
(setq names (cons (match-string-no-properties 9) names)))
names)))
names))))
;;;###autoload
(defun org-babel-next-src-block (&optional arg)
@@ -2245,8 +2246,8 @@ Return the list of strings representing top level items:
(item1 item2 ...)
Only consider top level items. See Info node `(org)Environment of \
a Code Block'."
Only consider top level items. See Info node
`(org)Environment of a Code Block'."
(mapcar (lambda (el) (org-babel-read (car el) 'inhibit-lisp-eval))
(cdr (org-list-to-lisp))))
@@ -2357,7 +2358,7 @@ INFO may provide the values of these header arguments (in the
using the argument supplied to specify the export block
or snippet type."
(cond ((stringp result)
(setq result (org-no-properties result))
(setq result (substring-no-properties result))
(when (member "file" result-params)
(setq result
(org-babel-result-to-file
@@ -2425,7 +2426,8 @@ INFO may provide the values of these header arguments (in the
(delete-region (point) (org-babel-result-end)))
((member "append" result-params)
(goto-char (org-babel-result-end)) (setq beg (point-marker)))
((member "prepend" result-params))) ; already there
;; ((member "prepend" result-params)) ; already there
)
(setq results-switches
(if results-switches (concat " " results-switches) ""))
(let ((wrap
@@ -2461,10 +2463,19 @@ INFO may provide the values of these header arguments (in the
(insert
(org-trim
(org-list-to-org
;; We arbitrarily choose to format non-strings
;; as %S.
(cons 'unordered
(mapcar
(lambda (e)
(list (if (stringp e) e (format "%S" e))))
(cond
((stringp e) (list e))
((listp e)
(mapcar
(lambda (x)
(if (stringp x) x (format "%S" x)))
e))
(t (list (format "%S" e)))))
(if (listp result) result
(split-string result "\n" t))))
'(:splicep nil :istart "- " :iend "\n")))
@@ -2709,7 +2720,9 @@ specified as an an \"attachment:\" style link."
((and 'attachment (guard in-attach-dir)) "attachment")
(_ "file"))
(if (and request-attachment in-attach-dir)
(file-relative-name result-file-name)
(file-relative-name
result-file-name
(file-name-as-directory attach-dir))
(if (and default-directory
base-file-name same-directory?)
(if (eq org-link-file-path-type 'adaptive)
@@ -2849,6 +2862,7 @@ parameters when merging lists."
(split-string
(cond ((stringp value) value)
((functionp value) (funcall value))
;; FIXME: Arbitrary code evaluation.
(t (eval value t)))))))
(`(:exports . ,value)
(setq exports (funcall merge
@@ -3177,16 +3191,8 @@ situations in which is it not appropriate."
((and (not inhibit-lisp-eval)
(or (memq (string-to-char cell) '(?\( ?' ?` ?\[))
(string= cell "*this*")))
;; Prevent arbitrary function calls.
(if (and (memq (string-to-char cell) '(?\( ?`))
(not (org-babel-confirm-evaluate
;; See `org-babel-get-src-block-info'.
(list "emacs-lisp" (format "%S" cell)
'((:eval . yes)) nil (format "%S" cell)
nil nil))))
;; Not allowed.
(user-error "Evaluation of elisp code %S aborted." cell)
(eval (read cell) t)))
;; FIXME: Arbitrary code evaluation.
(eval (read cell) t))
((save-match-data
(and (string-match "^[[:space:]]*\"\\(.*\\)\"[[:space:]]*$" cell)
(not (string-match "[^\\]\"" (match-string 1 cell)))))
@@ -3272,7 +3278,7 @@ Emacs shutdown.")
(while (or (not dir) (file-exists-p dir))
(setq dir (expand-file-name
(format "babel-stable-%d" (random 1000))
(temporary-file-directory))))
temporary-file-directory)))
(make-directory dir)
dir))
"Directory to hold temporary files created to execute code blocks.
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-css.el --- Babel Functions for CSS -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-ditaa.el --- Babel Functions for ditaa -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-dot.el --- Babel Functions for dot -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Justin Abrahms <justin@abrah.ms>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-emacs-lisp.el --- Babel Functions for Emacs-lisp Code -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-eshell.el --- Babel Functions for Eshell -*- lexical-binding: t; -*-
;; Copyright (C) 2018-2022 Free Software Foundation, Inc.
;; Copyright (C) 2018-2023 Free Software Foundation, Inc.
;; Author: stardiviner <numbchild@gmail.com>
;; Maintainer: stardiviner <numbchild@gmail.com>
+2 -2
View File
@@ -1,6 +1,6 @@
;;; ob-eval.el --- Babel Functions for External Code Evaluation -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, comint
@@ -59,7 +59,7 @@ Writes QUERY into a temp-buffer that is processed with
(let ((error-buffer (get-buffer-create " *Org-Babel Error*")) exit-code)
(with-current-buffer error-buffer (erase-buffer))
(with-temp-buffer
(insert query)
(insert query "\n")
(setq exit-code
(org-babel--shell-command-on-region
command error-buffer))
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-exp.el --- Exportation of Babel Source Blocks -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-forth.el --- Babel Functions for Forth -*- lexical-binding: t; -*-
;; Copyright (C) 2014-2022 Free Software Foundation, Inc.
;; Copyright (C) 2014-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, forth
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-fortran.el --- Babel Functions for Fortran -*- lexical-binding: t; -*-
;; Copyright (C) 2011-2022 Free Software Foundation, Inc.
;; Copyright (C) 2011-2023 Free Software Foundation, Inc.
;; Authors: Sergey Litvinov
;; Eric Schulte
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-gnuplot.el --- Babel Functions for Gnuplot -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Ihor Radchenko <yantar92@gmail.com>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-groovy.el --- Babel Functions for Groovy -*- lexical-binding: t; -*-
;; Copyright (C) 2013-2022 Free Software Foundation, Inc.
;; Copyright (C) 2013-2023 Free Software Foundation, Inc.
;; Author: Miro Bezjak <bezjak.miro@gmail.com>
;; Maintainer: Palak Mathur <palakmathur@gmail.com>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-haskell.el --- Babel Functions for Haskell -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Lawrence Bottorff <borgauf@gmail.com>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-java.el --- org-babel functions for java evaluation -*- lexical-binding: t -*-
;; Copyright (C) 2011-2022 Free Software Foundation, Inc.
;; Copyright (C) 2011-2023 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
+5 -2
View File
@@ -1,6 +1,6 @@
;;; ob-js.el --- Babel Functions for Javascript -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, js
@@ -69,7 +69,10 @@
:safe #'stringp)
(defvar org-babel-js-function-wrapper
"require('process').stdout.write(require('util').inspect(function(){%s}()));"
;; Note that newline after %s - it makes sure that closing
;; parenthesis are not shadowed if the last line of the body is a
;; line comment.
"require('process').stdout.write(require('util').inspect(function(){%s\n}()));"
"Javascript code to print value of body.")
(defun org-babel-execute:js (body params)
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-julia.el --- org-babel functions for julia code evaluation -*- lexical-binding: t; -*-
;; Copyright (C) 2013-2022 Free Software Foundation, Inc.
;; Copyright (C) 2013-2023 Free Software Foundation, Inc.
;; Authors: G. Jay Kerns
;; Maintainer: Pedro Bruel <pedro.bruel@gmail.com>
;; Keywords: literate programming, reproducible research, scientific computing
+8 -11
View File
@@ -1,6 +1,6 @@
;;; ob-latex.el --- Babel Functions for LaTeX -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
@@ -141,7 +141,7 @@ exporting the literal LaTeX source."
(org-trim body))
(defun org-babel-execute:latex (body params)
"Execute a block of Latex code with Babel.
"Execute a block of LaTeX code with Babel.
This function is called by `org-babel-execute-src-block'."
(setq body (org-babel-expand-body:latex body params))
(if (cdr (assq :file params))
@@ -180,7 +180,7 @@ This function is called by `org-babel-execute-src-block'."
tmp-pdf
(list org-babel-latex-pdf-svg-process)
extension err-msg log-buf)))
(shell-command (format "mv %s %s" img-out out-file)))))
(rename-file img-out out-file t))))
((string-suffix-p ".tikz" out-file)
(when (file-exists-p out-file) (delete-file out-file))
(with-temp-file out-file
@@ -218,17 +218,14 @@ This function is called by `org-babel-execute-src-block'."
(if (string-suffix-p ".svg" out-file)
(progn
(shell-command "pwd")
(shell-command (format "mv %s %s"
(concat (file-name-sans-extension tex-file) "-1.svg")
out-file)))
(rename-file (concat (file-name-sans-extension tex-file) "-1.svg")
out-file t))
(error "SVG file produced but HTML file requested")))
((file-exists-p (concat (file-name-sans-extension tex-file) ".html"))
(if (string-suffix-p ".html" out-file)
(shell-command "mv %s %s"
(concat (file-name-sans-extension tex-file)
".html")
out-file)
(error "HTML file produced but SVG file requested")))))
(rename-file (concat (file-name-sans-extension tex-file) ".html")
out-file t)
(error "HTML file produced but SVG file requested")))))
((or (string= "pdf" extension) imagemagick)
(with-temp-file tex-file
(require 'ox-latex)
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-lilypond.el --- Babel Functions for Lilypond -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Martyn Jago
;; Keywords: babel language, literate programming
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-lisp.el --- Babel Functions for Common Lisp -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Authors: Joel Boehland
;; Eric Schulte
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-lob.el --- Functions Supporting the Library of Babel -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-lua.el --- Org Babel functions for Lua evaluation -*- lexical-binding: t; -*-
;; Copyright (C) 2014, 2016-2022 Free Software Foundation, Inc.
;; Copyright (C) 2014, 2016-2023 Free Software Foundation, Inc.
;; Authors: Dieter Schoen
;; Keywords: literate programming, reproducible research
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-makefile.el --- Babel Functions for Makefile -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Thomas S. Dye
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-matlab.el --- Babel support for Matlab -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Dan Davison
;; Keywords: literate programming, reproducible research
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-maxima.el --- Babel Functions for Maxima -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric S Fraga
;; Eric Schulte
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-ocaml.el --- Babel Functions for Ocaml -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
+4 -4
View File
@@ -1,6 +1,6 @@
;;; ob-octave.el --- Babel Functions for Octave and Matlab -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Dan Davison
;; Keywords: literate programming, reproducible research
@@ -91,7 +91,7 @@ end")
(list
"set (0, \"defaultfigurevisible\", \"off\");"
full-body
(format "print -dpng %s" gfx-file))
(format "print -dpng %S\nans=%S" gfx-file gfx-file))
"\n")
full-body)
result-type matlabp)))
@@ -243,8 +243,8 @@ value of the last statement in BODY, as elisp."
(`output
(setq results
(if matlabp
(cdr (reverse (delq "" (mapcar #'org-strip-quotes
(mapcar #'org-trim raw)))))
(cdr (reverse (delete "" (mapcar #'org-strip-quotes
(mapcar #'org-trim raw)))))
(cdr (member org-babel-octave-eoe-output
(reverse (mapcar #'org-strip-quotes
(mapcar #'org-trim raw)))))))
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-org.el --- Babel Functions for Org Code Blocks -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-perl.el --- Babel Functions for Perl -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Authors: Dan Davison
;; Eric Schulte
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-plantuml.el --- Babel Functions for Plantuml -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Zhang Weize
;; Keywords: literate programming, reproducible research
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-processing.el --- Babel functions for processing -*- lexical-binding: t; -*-
;; Copyright (C) 2015-2022 Free Software Foundation, Inc.
;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
;; Author: Jarmo Hurri (adapted from ob-asymptote.el written by Eric Schulte)
;; Maintainer: Jarmo Hurri <jarmo.hurri@iki.fi>
+2 -2
View File
@@ -1,6 +1,6 @@
;;; ob-python.el --- Babel Functions for Python -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
@@ -235,7 +235,7 @@ then create. Return the initialized session."
;; multiple prompts during initialization.
(with-current-buffer py-buffer
(while (not org-babel-python--initialized)
(org-babel-comint-wait-for-output py-buffer)))
(sleep-for 0 10)))
(org-babel-comint-wait-for-output py-buffer))
(setq org-babel-python-buffers
(cons (cons session py-buffer)
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-ref.el --- Babel Functions for Referencing External Data -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
+3 -4
View File
@@ -1,6 +1,6 @@
;;; ob-ruby.el --- Babel Functions for Ruby -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
@@ -29,11 +29,10 @@
;; - ruby and irb executables :: https://www.ruby-lang.org/
;;
;; - ruby-mode :: Can be installed through ELPA, or from
;; https://github.com/eschulte/rinari/raw/master/util/ruby-mode.el
;; - ruby-mode :: Comes with Emacs.
;;
;; - inf-ruby mode :: Can be installed through ELPA, or from
;; https://github.com/eschulte/rinari/raw/master/util/inf-ruby.el
;; https://raw.githubusercontent.com/nonsequitur/inf-ruby/master/inf-ruby.el
;;; Code:
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-sass.el --- Babel Functions for the Sass CSS generation language -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-scheme.el --- Babel Functions for Scheme -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Michael Gauland
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-screen.el --- Babel Support for Interactive Terminal -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Benjamin Andresen
;; Maintainer: Ken Mankoff <mankoff@gmail.com>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-sed.el --- Babel Functions for Sed Scripts -*- lexical-binding: t; -*-
;; Copyright (C) 2015-2022 Free Software Foundation, Inc.
;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
;; Author: Bjarte Johansen
;; Keywords: literate programming, reproducible research
+12 -4
View File
@@ -1,6 +1,6 @@
;;; ob-shell.el --- Babel Functions for Shell Evaluation -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
@@ -79,7 +79,7 @@ is modified outside the Customize interface."
,(format "Execute a block of %s commands with Babel." name)
(let ((shell-file-name ,name)
(org-babel-prompt-command
(or (alist-get ,name org-babel-shell-set-prompt-commands)
(or (cdr (assoc ,name org-babel-shell-set-prompt-commands))
(alist-get t org-babel-shell-set-prompt-commands))))
(org-babel-execute:shell body params))))
(eval `(defalias ',(intern (concat "org-babel-variable-assignments:" name))
@@ -166,6 +166,11 @@ This function is called by `org-babel-execute-src-block'."
"Return a list of statements declaring the values as a generic variable."
(format "%s=%s" varname (org-babel-sh-var-to-sh values sep hline)))
(defun org-babel--variable-assignments:fish
(varname values &optional sep hline)
"Return a list of statements declaring the values as a fish variable."
(format "set %s %s" varname (org-babel-sh-var-to-sh values sep hline)))
(defun org-babel--variable-assignments:bash_array
(varname values &optional sep hline)
"Return a list of statements declaring the values as a bash array."
@@ -211,8 +216,11 @@ This function is called by `org-babel-execute-src-block'."
(if (string-suffix-p "bash" shell-file-name)
(org-babel--variable-assignments:bash
(car pair) (cdr pair) sep hline)
(org-babel--variable-assignments:sh-generic
(car pair) (cdr pair) sep hline)))
(if (string-suffix-p "fish" shell-file-name)
(org-babel--variable-assignments:fish
(car pair) (cdr pair) sep hline)
(org-babel--variable-assignments:sh-generic
(car pair) (cdr pair) sep hline))))
(org-babel--get-vars params))))
(defun org-babel-sh-var-to-sh (var &optional sep hline)
+2 -2
View File
@@ -1,6 +1,6 @@
;;; ob-sql.el --- Babel Functions for SQL -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Daniel Kraus <daniel@kraus.my>
@@ -234,7 +234,7 @@ database connections."
(:database . sql-database)))
(mapped-name (cdr (assq name name-mapping))))
(cadr (assq mapped-name
(cdr (assoc dbconnection sql-connection-alist))))))))
(cdr (assoc-string dbconnection sql-connection-alist t))))))))
(defun org-babel-execute:sql (body params)
"Execute a block of Sql code with Babel.
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-sqlite.el --- Babel Functions for SQLite Databases -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Nick Savage <nick@nicksavage.ca>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob-table.el --- Support for Calling Babel Functions from Tables -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
+14 -12
View File
@@ -1,6 +1,6 @@
;;; ob-tangle.el --- Extract Source Code From Org Files -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
@@ -158,9 +158,9 @@ result. The default value is `org-remove-indentation'."
:version "24.1"
:type 'function)
(defcustom org-babel-tangle-default-file-mode #o544
(defcustom org-babel-tangle-default-file-mode #o644
"The default mode used for tangled files, as an integer.
The default value 356 correspands to the octal #o544, which is
The default value 420 correspands to the octal #o644, which is
read-write permissions for the user, read-only for everyone else."
:group 'org-babel-tangle
:package-version '(Org . "9.6")
@@ -339,7 +339,7 @@ matching a regular expression."
(defun org-babel-interpret-file-mode (mode)
"Determine the integer representation of a file MODE specification.
The following forms are currently recognised:
The following forms are currently recognized:
- an integer (returned without modification)
- \"o755\" (chmod style octal)
- \"rwxrw-r--\" (ls style specification)
@@ -354,18 +354,18 @@ The following forms are currently recognised:
(user-error "%1$o is not a valid file mode octal. \
Did you give the decimal value %1$d by mistake?" mode)))
((not (stringp mode))
(error "File mode %S not recognised as a valid format." mode))
(error "File mode %S not recognized as a valid format." mode))
((string-match-p "^o0?[0-7][0-7][0-7]$" mode)
(string-to-number (replace-regexp-in-string "^o" "" mode) 8))
((string-match-p "^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" mode)
;; Match regexp taken from `file-modes-symbolic-to-number'.
(file-modes-symbolic-to-number mode org-babel-tangle-default-file-mode))
((string-match-p "^[r-][w-][xs-][r-][w-][xs-][r-][w-][x-]$" mode)
(file-modes-symbolic-to-number (concat "u=" (substring mode 0 3)
",g=" (substring mode 3 6)
",o=" (substring mode 6 9))
(file-modes-symbolic-to-number (concat "u=" (delete ?- (substring mode 0 3))
",g=" (delete ?- (substring mode 3 6))
",o=" (delete ?- (substring mode 6 9)))
0))
(t (error "File mode %S not recognised as a valid format. See `org-babel-interpret-file-mode'." mode))))
(t (error "File mode %S not recognized as a valid format. See `org-babel-interpret-file-mode'." mode))))
(defun org-babel-tangle-clean ()
"Remove comments inserted by `org-babel-tangle'.
@@ -500,7 +500,8 @@ The PARAMS are the 3rd element of the info for the same src block."
(cl-letf (((symbol-function 'org-store-link-functions)
(lambda () nil)))
(org-store-link nil))))
(bare (and (string-match org-link-bracket-re l)
(bare (and l
(string-match org-link-bracket-re l)
(match-string 1 l))))
(when bare
(if (and org-babel-tangle-use-relative-file-links
@@ -512,6 +513,7 @@ The PARAMS are the 3rd element of the info for the same src block."
(cdr (assq :tangle params)))))
bare))))))
(defvar org-outline-regexp) ; defined in lisp/org.el
(defun org-babel-tangle-single-block (block-counter &optional only-this-block)
"Collect the tangled source for current block.
Return the list of block attributes needed by
@@ -569,8 +571,8 @@ non-nil, return the full association list to be used by
(buffer-substring
(max (condition-case nil
(save-excursion
(org-back-to-heading t) ; Sets match data
(match-end 0))
(org-back-to-heading t)
(re-search-forward org-outline-regexp))
(error (point-min)))
(save-excursion
(if (re-search-backward
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ob.el --- Working with Code Blocks in Org -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Keywords: literate programming, reproducible research
+10 -10
View File
@@ -1,6 +1,6 @@
;;; oc-basic.el --- basic back-end for citations -*- lexical-binding: t; -*-
;; Copyright (C) 2021-2022 Free Software Foundation, Inc.
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
@@ -162,17 +162,17 @@ Return a hash table with citation references as keys and fields alist as values.
(puthash (cdr (assq 'id item))
(mapcar (pcase-lambda (`(,field . ,value))
(pcase field
('author
;; Author is an array of objects, each
;; of them designing a person. These
;; objects may contain multiple
;; properties, but for this basic
;; processor, we'll focus on `given' and
;; `family'.
((or 'author 'editor)
;; Author and editors are arrays of
;; objects, each of them designing a
;; person. These objects may contain
;; multiple properties, but for this
;; basic processor, we'll focus on
;; `given' and `family'.
;;
;; For compatibility with BibTeX, add
;; "and" between authors.
(cons 'author
;; "and" between authors and editors.
(cons field
(mapconcat
(lambda (alist)
(concat (alist-get 'family alist)
+1 -1
View File
@@ -1,6 +1,6 @@
;;; oc-biblatex.el --- biblatex citation processor for Org -*- lexical-binding: t; -*-
;; Copyright (C) 2021-2022 Free Software Foundation, Inc.
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
+4 -4
View File
@@ -1,23 +1,23 @@
;;; oc-bibtex.el --- Vanilla citation processor for LaTeX -*- lexical-binding: t; -*-
;; Copyright (C) 2021-2022 Free Software Foundation, Inc.
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; This file is part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
+1 -1
View File
@@ -1,6 +1,6 @@
;;; oc-csl.el --- csl citation processor for Org -*- lexical-binding: t; -*-
;; Copyright (C) 2021-2022 Free Software Foundation, Inc.
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; Maintainer: András Simonyi <andras.simonyi@gmail.com>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; oc-natbib.el --- Citation processor using natbib LaTeX package -*- lexical-binding: t; -*-
;; Copyright (C) 2021-2022 Free Software Foundation, Inc.
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
+4 -2
View File
@@ -1,6 +1,6 @@
;;; oc.el --- Org Cite library -*- lexical-binding: t; -*-
;; Copyright (C) 2021-2022 Free Software Foundation, Inc.
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
@@ -1232,7 +1232,9 @@ from the processor set in `org-cite-activate-processor'."
(let ((cite (org-with-point-at (match-beginning 0)
(org-element-citation-parser))))
(when cite
(funcall activate cite)
;; Do not alter match data as font-lock expects us to set it
;; appropriately.
(save-match-data (funcall activate cite))
;; Move after cite object and make sure to return
;; a non-nil value.
(goto-char (org-element-property :end cite)))))))
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-bbdb.el --- Links to BBDB entries -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Authors: Carsten Dominik <carsten.dominik@gmail.com>
;; Thomas Baumann <thomas dot baumann at ch dot tum dot de>
+16 -13
View File
@@ -1,6 +1,6 @@
;;; ol-bibtex.el --- Links to BibTeX entries -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2007-2022 Free Software Foundation, Inc.
;; Copyright (C) 2007-2023 Free Software Foundation, Inc.
;;
;; Authors: Bastien Guerry <bzg@gnu.org>
;; Carsten Dominik <carsten dot dominik at gmail dot com>
@@ -86,8 +86,8 @@
;; the active region, then call `org-bibtex-write' in a .org file to
;; insert a heading for the read bibtex entry
;;
;; - All Bibtex information is taken from the document compiled by
;; Andrew Roberts from the Bibtex manual, available at
;; - All BibTeX information is taken from the document compiled by
;; Andrew Roberts from the BibTeX manual, available at
;; https://www.andy-roberts.net/res/writing/latex/bibentries.pdf
;;
;;; History:
@@ -99,7 +99,7 @@
;; and then implemented by Bastien Guerry.
;;
;; Eric Schulte eventually added the functions for translating between
;; Org headlines and Bibtex entries, and for fleshing out the Bibtex
;; Org headlines and BibTeX entries, and for fleshing out the BibTeX
;; fields of existing Org headlines.
;;
;; Org mode loads this module by default - if this is not what you want,
@@ -144,7 +144,7 @@
(declare-function org-search-view "org-agenda" (&optional todo-only string edit-at))
;;; Bibtex data
;;; BibTeX data
(defvar org-bibtex-types
'((:article
(:description . "An article from a journal or magazine")
@@ -202,7 +202,7 @@
(:description . "A document having an author and title, but not formally published.")
(:required :author :title :note)
(:optional :month :year :doi :url)))
"Bibtex entry types with required and optional parameters.")
"BibTeX entry types with required and optional parameters.")
(defvar org-bibtex-fields
'((:address . "Usually the address of the publisher or other type of institution. For major publishing houses, van Leunen recommends omitting the information entirely. For small publishers, on the other hand, you can help the reader by giving the complete address.")
@@ -231,7 +231,7 @@
(:url . "Uniform resource locator.")
(:volume . "The volume of a journal or multi-volume book.")
(:year . "The year of publication or, for an unpublished work, the year it was written. Generally it should consist of four numerals, such as 1984, although the standard styles can handle any year whose last four nonpunctuation characters are numerals, such as '(about 1984)'"))
"Bibtex fields with descriptions.")
"BibTeX fields with descriptions.")
(defvar org-bibtex-entries nil
"List to hold parsed bibtex entries.")
@@ -439,7 +439,7 @@ at point."
(error "Field:%s is not known" field))
(save-window-excursion
(let* ((name (substring (symbol-name field) 1))
(buf-name (format "*Bibtex Help %s*" name)))
(buf-name (format "*BibTeX Help %s*" name)))
(with-output-to-temp-buffer buf-name
(princ (cdr (assoc field org-bibtex-fields))))
(with-current-buffer buf-name (visual-line-mode 1))
@@ -496,7 +496,7 @@ With optional argument OPTIONAL, also prompt for optional fields."
(org-bibtex-autokey)))
;;; Bibtex link functions
;;; BibTeX link functions
(org-link-set-parameters "bibtex"
:follow #'org-bibtex-open
:store #'org-bibtex-store-link)
@@ -593,13 +593,13 @@ ARG, when non-nil, is a universal prefix argument. See
(add-hook 'org-execute-file-search-functions 'org-execute-file-search-in-bibtex)
;;; Bibtex <-> Org headline translation functions
;;; BibTeX <-> Org headline translation functions
(defun org-bibtex (filename)
"Export each headline in the current file to a bibtex entry.
Headlines are exported using `org-bibtex-headline'."
(interactive
(list (read-file-name
"Bibtex file: " nil nil nil
"BibTeX file: " nil nil nil
(let ((file (buffer-file-name (buffer-base-buffer))))
(and file
(file-name-nondirectory
@@ -619,7 +619,7 @@ Headlines are exported using `org-bibtex-headline'."
nil))))
(when error-point
(goto-char error-point)
(message "Bibtex error at %S" (nth 4 (org-heading-components))))))
(message "BibTeX error at %S" (nth 4 (org-heading-components))))))
(defun org-bibtex-check (&optional optional)
"Check the current headline for required fields.
@@ -761,7 +761,10 @@ drawer."
"If kill ring holds a bibtex entry yank it as an Org headline."
(interactive)
(let (entry)
(with-temp-buffer (yank 1) (setf entry (org-bibtex-read)))
(with-temp-buffer
(yank 1)
(bibtex-mode)
(setf entry (org-bibtex-read)))
(if entry
(org-bibtex-write)
(error "Yanked text does not appear to contain a BibTeX entry"))))
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-docview.el --- Links to Docview mode buffers -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Jan Böcker <jan.boecker at jboecker dot de>
;; Keywords: outlines, hypermedia, calendar, wp
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-doi.el --- DOI links support in Org -*- lexical-binding: t; -*-
;; Copyright (C) 2021-2022 Free Software Foundation, Inc.
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-eshell.el --- Links to Working Directories in Eshell -*- lexical-binding: t; -*-
;; Copyright (C) 2011-2022 Free Software Foundation, Inc.
;; Copyright (C) 2011-2023 Free Software Foundation, Inc.
;; Author: Konrad Hinsen <konrad.hinsen AT fastmail.net>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-eww.el --- Store URL and kill from Eww mode -*- lexical-binding: t -*-
;; Copyright (C) 2014-2022 Free Software Foundation, Inc.
;; Copyright (C) 2014-2023 Free Software Foundation, Inc.
;; Author: Marco Wahl <marcowahlsoft>a<gmailcom>
;; Keywords: link, eww
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-gnus.el --- Links to Gnus Groups and Messages -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Tassilo Horn <tassilo at member dot fsf dot org>
+8 -8
View File
@@ -1,6 +1,6 @@
;;; ol-info.el --- Links to Info Nodes -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -129,13 +129,13 @@ If LINK is not an info link then DESC is returned."
(defconst org-info-emacs-documents
'("ada-mode" "auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x"
"ebrowse" "ede" "ediff" "edt" "efaq-w32" "efaq" "eieio" "eintr" "elisp"
"emacs-gnutls" "emacs-mime" "emacs" "epa" "erc" "ert" "eshell" "eudc" "eww"
"flymake" "forms" "gnus" "htmlfontify" "idlwave" "ido" "info" "mairix-el"
"message" "mh-e" "newsticker" "nxml-mode" "octave-mode" "org" "pcl-cvs"
"pgg" "rcirc" "reftex" "remember" "sasl" "sc" "semantic" "ses" "sieve"
"smtpmail" "speedbar" "srecode" "todo-mode" "tramp" "url" "vip" "viper"
"widget" "wisent" "woman")
"ebrowse" "ede" "ediff" "edt" "efaq-w32" "efaq" "eglot" "eieio" "eintr"
"elisp" "emacs-gnutls" "emacs-mime" "emacs" "epa" "erc" "ert" "eshell"
"eudc" "eww" "flymake" "forms" "gnus" "htmlfontify" "idlwave" "ido" "info"
"mairix-el" "message" "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode"
"org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" "semantic"
"ses" "sieve" "smtpmail" "speedbar" "srecode" "todo-mode" "tramp" "transient"
"url" "use-package" "vhdl-mode" "vip" "viper" "vtable" "widget" "wisent" "woman")
"List of Emacs documents available.
Taken from <https://www.gnu.org/software/emacs/manual/html_mono/.>")
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-irc.el --- Links to IRC Sessions -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2008-2022 Free Software Foundation, Inc.
;; Copyright (C) 2008-2023 Free Software Foundation, Inc.
;;
;; Author: Philip Jackson <emacs@shellarchive.co.uk>
;; Keywords: erc, irc, link, org
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-man.el --- Links to man pages -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2020-2022 Free Software Foundation, Inc.
;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Maintainer: Bastien Guerry <bzg@gnu.org>
;; Keywords: outlines, hypermedia, calendar, wp
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-mhe.el --- Links to MH-E Messages -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de>
;; Keywords: outlines, hypermedia, calendar, wp
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-rmail.el --- Links to Rmail Messages -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
+1 -1
View File
@@ -1,6 +1,6 @@
;;; ol-w3m.el --- Copy and Paste From W3M -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2022 Free Software Foundation, Inc.
;; Copyright (C) 2008-2023 Free Software Foundation, Inc.
;; Author: Andy Stewart <lazycat dot manatee at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, wp
+5 -5
View File
@@ -1,6 +1,6 @@
;;; ol.el --- Org links library -*- lexical-binding: t; -*-
;; Copyright (C) 2018-2022 Free Software Foundation, Inc.
;; Copyright (C) 2018-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -150,7 +150,7 @@ link.
called with two arguments: the link location (a string such as
\"~/foobar\", \"id:some-org-id\" or \"https://www.foo.com\")
and the description generated by `org-insert-link'. It should
return the description to use (this reflects the behaviour of
return the description to use (this reflects the behavior of
`org-link-make-description-function'). If it returns nil, no
default description is used, but no error is thrown (from the
user's perspective, this is equivalent to a default description
@@ -1488,9 +1488,9 @@ If the link is in hidden text, expose it."
(defun org-link-descriptive-ensure ()
"Toggle the literal or descriptive display of links in current buffer if needed."
(if org-link-descriptive
(org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible nil)
(org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible t)))
(org-fold-core-set-folding-spec-property
(car org-link--link-folding-spec)
:visible (not org-link-descriptive)))
;;;###autoload
(defun org-toggle-link-display ()
+37 -23
View File
@@ -1,6 +1,6 @@
;;; org-agenda.el --- Dynamic task and appointment lists for Org -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -54,6 +54,7 @@
(require 'org)
(require 'org-macs)
(require 'org-refile)
(require 'org-element)
(declare-function diary-add-to-list "diary-lib"
(date string specifier &optional marker globcolor literal))
@@ -80,11 +81,6 @@
(declare-function org-columns-quit "org-colview" ())
(declare-function diary-date-display-form "diary-lib" (&optional type))
(declare-function org-mobile-write-agenda-for-mobile "org-mobile" (file))
(declare-function org-element-property "org-element" (property element))
(declare-function org-element--cache-active-p "org-element"
(&optional called-from-cache-change-func-p))
(declare-function org-element-lineage "org-element"
(datum &optional types with-self))
(declare-function org-habit-insert-consistency-graphs
"org-habit" (&optional line))
(declare-function org-is-habit-p "org-habit" (&optional pom))
@@ -95,8 +91,6 @@
(declare-function org-capture "org-capture" (&optional goto keys))
(declare-function org-clock-modify-effort-estimate "org-clock" (&optional value))
(declare-function org-element-type "org-element" (&optional element))
(defvar calendar-mode-map)
(defvar org-clock-current-task)
(defvar org-current-tag-alist)
@@ -1184,7 +1178,9 @@ Custom commands can set this variable in the options section."
"Non-nil means start the overview always on the specified weekday.
0 denotes Sunday, 1 denotes Monday, etc.
When nil, always start on the current day.
Custom commands can set this variable in the options section."
Custom commands can set this variable in the options section.
This variable only applies when agenda spans either 7 or 14 days."
:group 'org-agenda-daily/weekly
:type '(choice (const :tag "Today" nil)
(integer :tag "Weekday No.")))
@@ -3352,7 +3348,7 @@ s Search for keywords M Like m, but only TODO entries
(`agenda
(call-interactively 'org-agenda-list))
(`agenda*
(funcall 'org-agenda-list nil nil t))
(funcall 'org-agenda-list nil nil nil t))
(`alltodo
(call-interactively 'org-todo-list))
(`search
@@ -3477,14 +3473,18 @@ This ensures the export commands can easily use it."
(setq props (plist-put props 'tags (mapconcat #'identity tmp ":"))))
(when (setq tmp (plist-get props 'date))
(when (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp)))
(let ((calendar-date-display-form '(year "-" month "-" day)))
'((format "%4d, %9s %2s, %4s" dayname monthname day year))
(let ((calendar-date-display-form
'((format "%s-%.2d-%.2d" year
(string-to-number month)
(string-to-number day)))))
(setq tmp (calendar-date-string tmp)))
(setq props (plist-put props 'date tmp)))
(when (setq tmp (plist-get props 'day))
(when (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp)))
(let ((calendar-date-display-form '(year "-" month "-" day)))
(let ((calendar-date-display-form
'((format "%s-%.2d-%.2d" year
(string-to-number month)
(string-to-number day)))))
(setq tmp (calendar-date-string tmp)))
(setq props (plist-put props 'day tmp))
(setq props (plist-put props 'agenda-day tmp)))
@@ -4357,7 +4357,10 @@ This check for agenda markers in all agenda buffers currently active."
Custom commands can set this variable in the options section.
This is usually a string like \"2007-11-01\", \"+2d\" or any other
input allowed when reading a date through the Org calendar.
See the docstring of `org-read-date' for details.")
See the docstring of `org-read-date' for details.
This variable has no effect when `org-agenda-start-on-weekday' is set
and agenda spans 7 or 14 days.")
(defvar org-starting-day nil) ; local variable in the agenda buffer
(defvar org-arg-loc nil) ; local variable
@@ -4678,7 +4681,7 @@ is active."
(org-agenda-text-search-extra-files org-agenda-text-search-extra-files)
regexp rtn rtnall files file pos inherited-tags
marker category level tags c neg re boolean
ee txt beg end words regexps+ regexps- hdl-only buffer beg1 str)
ee txt beg end last-search-end words regexps+ regexps- hdl-only buffer beg1 str)
(unless (and (not edit-at)
(stringp string)
(string-match "\\S-" string))
@@ -4817,6 +4820,7 @@ is active."
(throw 'nextfile t))
(goto-char (max (point-min) (1- (point))))
(while (re-search-forward regexp nil t)
(setq last-search-end (point))
(org-back-to-heading t)
(while (and (not (zerop org-agenda-search-view-max-outline-level))
(> (org-reduced-level (org-outline-level))
@@ -4878,7 +4882,7 @@ is active."
'priority 1000
'type "search")
(push txt ee)
(goto-char (1- end))))))))))
(goto-char (max (1- end) last-search-end))))))))))
(setq rtn (nreverse ee))
(setq rtnall (append rtnall rtn)))
(org-agenda--insert-overriding-header
@@ -5943,7 +5947,7 @@ displayed in agenda view."
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
;; We do not run `org-agenda-skip' righ away because every single sexp
;; We do not run `org-agenda-skip' right away because every single sexp
;; in the buffer is matched here, unlike day-specific search
;; in ordinary timestamps. Most of the sexps will not match
;; the agenda day and it is quicker to run `org-agenda-skip' only for
@@ -6317,6 +6321,11 @@ specification like [h]h:mm."
(org-element-cache-map
(lambda (el)
(when (and (org-element-property :deadline el)
;; Only consider active timestamp values.
(memq (org-element-property
:type
(org-element-property :deadline el))
'(diary active active-range))
(or (not with-hour)
(org-element-property
:hour-start
@@ -6658,6 +6667,11 @@ scheduled items with an hour specification like [h]h:mm."
(org-element-cache-map
(lambda (el)
(when (and (org-element-property :scheduled el)
;; Only consider active timestamp values.
(memq (org-element-property
:type
(org-element-property :scheduled el))
'(diary active active-range))
(or (not with-hour)
(org-element-property
:hour-start
@@ -6780,7 +6794,8 @@ scheduled items with an hour specification like [h]h:mm."
(let ((deadline (time-to-days
(when (org-element-property :deadline el)
(org-time-string-to-time
(org-element-property :deadline el))))))
(org-element-interpret-data
(org-element-property :deadline el)))))))
(and (<= schedule deadline) (> current deadline))))
(`not-today pastschedp)
(`t t)
@@ -7326,7 +7341,7 @@ Any match of REMOVE-RE will be removed from TXT."
(let ((s (org-format-outline-path (org-get-outline-path)
(1- (frame-width))
nil org-agenda-breadcrumbs-separator)))
(if (eq "" s) "" (concat s org-agenda-breadcrumbs-separator))))))
(if (equal "" s) "" (concat s org-agenda-breadcrumbs-separator))))))
(setq time (cond (s2 (concat
(org-agenda-time-of-day-to-ampm-maybe s1)
"-" (org-agenda-time-of-day-to-ampm-maybe s2)
@@ -7720,8 +7735,7 @@ The optional argument TYPE tells the agenda type."
(unless (string= org-agenda-todo-keyword-format "")
;; Remove `display' property as the icon could leak
;; on the white space.
(org-add-props " " (org-plist-delete (text-properties-at 0 x)
'display)))
(apply #'propertize " " (org-plist-delete (text-properties-at 0 x) 'display)))
(substring x (match-end 3)))))))
x)))
@@ -8207,7 +8221,7 @@ filter."
(if (and org-agenda-filtered-by-category
org-agenda-category-filter)
(org-agenda-filter-show-all-cat)
(let ((cat (org-no-properties (org-get-at-eol 'org-category 1))))
(let ((cat (org-no-properties (org-agenda-get-category))))
(cond
((and cat strip)
(org-agenda-filter-apply
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-archive.el --- Archiving for Org -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-attach-git.el --- Automatic git commit extension to org-attach -*- lexical-binding: t; -*-
;; Copyright (C) 2019-2022 Free Software Foundation, Inc.
;; Copyright (C) 2019-2023 Free Software Foundation, Inc.
;; Original Author: John Wiegley <johnw@newartisans.com>
;; Restructurer: Gustav Wikström <gustav@whil.se>
+2 -2
View File
@@ -1,6 +1,6 @@
;;; org-attach.el --- Manage file attachments to Org outlines -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2022 Free Software Foundation, Inc.
;; Copyright (C) 2008-2023 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Keywords: org data attachment
@@ -524,7 +524,7 @@ DIR-property exists (that is different from the unset one)."
"Attach URL."
(interactive "MURL of the file to attach: \n")
(let ((org-attach-method 'url)
(org-safe-remote-resources ; Assume saftey if in an interactive session.
(org-safe-remote-resources ; Assume safety if in an interactive session.
(if noninteractive org-safe-remote-resources '(""))))
(org-attach-attach url)))
+3 -3
View File
@@ -1,6 +1,6 @@
;;; org-capture.el --- Fast note taking in Org -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -757,7 +757,7 @@ of the day at point (if any) or the current HH:MM time."
(_ "* Invalid capture template"))))
(defun org-capture--run-template-functions (keyword &optional local)
"Run funcitons associated with KEYWORD on template's plist.
"Run functions associated with KEYWORD on template's plist.
For valid values of KEYWORD see `org-capture-templates'.
If LOCAL is non-nil use the buffer-local value of `org-capture-plist'."
;; Used in place of `run-hooks' because these functions have no associated symbol.
@@ -1700,7 +1700,7 @@ Expansion occurs in a temporary Org mode buffer."
(condition-case error
(insert-file-contents filename)
(error
(insert (format "%%![couldn not insert %s: %s]"
(insert (format "%%![could not insert %s: %s]"
filename
error))))))))
;; Mark %() embedded elisp for later evaluation.
+86 -64
View File
@@ -1,6 +1,6 @@
;;; org-clock.el --- The time clocking code for Org mode -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -726,9 +726,9 @@ If not, show simply the clocked time like 01:50."
'org-mode-line-clock-overrun
'org-mode-line-clock)))
(effort-str (org-duration-from-minutes effort-in-minutes)))
(format (propertize " [%s/%s] (%s)" 'face 'org-mode-line-clock)
(format (propertize "[%s/%s] (%s) " 'face 'org-mode-line-clock)
work-done-str effort-str org-clock-heading))
(format (propertize " [%s] (%s)" 'face 'org-mode-line-clock)
(format (propertize "[%s] (%s) " 'face 'org-mode-line-clock)
(org-duration-from-minutes clocked-time)
org-clock-heading))))
@@ -1198,8 +1198,11 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
(string-to-number (shell-command-to-string "ioreg -c IOHIDSystem | perl -ane 'if (/Idle/) {$idle=(pop @F)/1000000000; print $idle; last}'")))
(defvar org-x11idle-exists-p
;; Check that x11idle exists
(and (eq 0 (call-process-shell-command
;; Check that x11idle exists. But don't do that on DOS/Windows,
;; since the command definitely does NOT exist there, and invoking
;; COMMAND.COM on MS-Windows is a bad idea -- it hangs.
(and (null (memq system-type '(windows-nt ms-dos)))
(eq 0 (call-process-shell-command
(format "command -v %s" org-clock-x11idle-program-name)))
;; Check that x11idle can retrieve the idle time
;; FIXME: Why "..-shell-command" rather than just `call-process'?
@@ -1795,19 +1798,31 @@ Optional argument N tells to change by that many units."
(begts (if updatets1 begts1 begts2)))
(setq tdiff
(time-subtract
(org-time-string-to-time org-last-changed-timestamp)
(org-time-string-to-time
(save-excursion
(goto-char (if updatets1 begts2 begts1))
(looking-at org-ts-regexp3)
(match-string 0)))
(org-time-string-to-time ts)))
(save-excursion
(goto-char begts)
(org-timestamp-change
(round (/ (float-time tdiff)
(pcase timestamp?
(`minute 60)
(`hour 3600)
(`day (* 24 3600))
(`month (* 24 3600 31))
(`year (* 24 3600 365.2)))))
timestamp? 'updown)))))))
;; `save-excursion' won't work because
;; `org-timestamp-change' deletes and re-inserts the
;; timestamp.
(let ((origin (point)))
(save-excursion
(goto-char begts)
(org-timestamp-change
(round (/ (float-time tdiff)
(pcase timestamp?
(`minute 60)
(`hour 3600)
(`day (* 24 3600))
(`month (* 24 3600 31))
(`year (* 24 3600 365.2)))))
timestamp? 'updown))
;; Move back to initial position, but never beyond updated
;; clock.
(unless (< (point) origin)
(goto-char origin))))))))
;;;###autoload
(defun org-clock-cancel ()
@@ -2054,6 +2069,7 @@ Use `\\[org-clock-remove-overlays]' to remove the subtree times."
h m))))
(defvar-local org-clock-overlays nil)
(put 'org-clock-overlays 'permanent-local t)
(defun org-clock-put-overlay (time)
"Put an overlay on the headline at point, displaying TIME.
@@ -3046,53 +3062,59 @@ PROPERTIES: The list properties specified in the `:properties' parameter
"If this is a CLOCK line, update it and return t.
Otherwise, return nil."
(interactive)
(save-excursion
(beginning-of-line 1)
(skip-chars-forward " \t")
(when (looking-at org-clock-string)
(let ((re (concat "[ \t]*" org-clock-string
" *[[<]\\([^]>]+\\)[]>]\\(-+[[<]\\([^]>]+\\)[]>]"
"\\([ \t]*=>.*\\)?\\)?"))
ts te h m s neg)
(cond
((not (looking-at re))
nil)
((not (match-end 2))
(when (and (equal (marker-buffer org-clock-marker) (current-buffer))
(> org-clock-marker (point))
(<= org-clock-marker (line-end-position)))
;; The clock is running here
(setq org-clock-start-time
(org-time-string-to-time (match-string 1)))
(org-clock-update-mode-line)))
(t
;; Prevent recursive call from `org-timestamp-change'.
(cl-letf (((symbol-function 'org-clock-update-time-maybe) #'ignore))
;; Update timestamps.
(save-excursion
(goto-char (match-beginning 1)) ; opening timestamp
(save-match-data (org-timestamp-change 0 'day)))
;; Refresh match data.
(looking-at re)
(save-excursion
(goto-char (match-beginning 3)) ; closing timestamp
(save-match-data (org-timestamp-change 0 'day))))
;; Refresh match data.
(looking-at re)
(and (match-end 4) (delete-region (match-beginning 4) (match-end 4)))
(end-of-line 1)
(setq ts (match-string 1)
te (match-string 3))
(setq s (- (org-time-string-to-seconds te)
(org-time-string-to-seconds ts))
neg (< s 0)
s (abs s)
h (floor (/ s 3600))
s (- s (* 3600 h))
m (floor (/ s 60))
s (- s (* 60 s)))
(insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m))
t))))))
(let ((origin (point))) ;; `save-excursion' may not work when deleting.
(prog1
(save-excursion
(beginning-of-line 1)
(skip-chars-forward " \t")
(when (looking-at org-clock-string)
(let ((re (concat "[ \t]*" org-clock-string
" *[[<]\\([^]>]+\\)[]>]\\(-+[[<]\\([^]>]+\\)[]>]"
"\\([ \t]*=>.*\\)?\\)?"))
ts te h m s neg)
(cond
((not (looking-at re))
nil)
((not (match-end 2))
(when (and (equal (marker-buffer org-clock-marker) (current-buffer))
(> org-clock-marker (point))
(<= org-clock-marker (line-end-position)))
;; The clock is running here
(setq org-clock-start-time
(org-time-string-to-time (match-string 1)))
(org-clock-update-mode-line)))
(t
;; Prevent recursive call from `org-timestamp-change'.
(cl-letf (((symbol-function 'org-clock-update-time-maybe) #'ignore))
;; Update timestamps.
(save-excursion
(goto-char (match-beginning 1)) ; opening timestamp
(save-match-data (org-timestamp-change 0 'day)))
;; Refresh match data.
(looking-at re)
(save-excursion
(goto-char (match-beginning 3)) ; closing timestamp
(save-match-data (org-timestamp-change 0 'day))))
;; Refresh match data.
(looking-at re)
(and (match-end 4) (delete-region (match-beginning 4) (match-end 4)))
(end-of-line 1)
(setq ts (match-string 1)
te (match-string 3))
(setq s (- (org-time-string-to-seconds te)
(org-time-string-to-seconds ts))
neg (< s 0)
s (abs s)
h (floor (/ s 3600))
s (- s (* 3600 h))
m (floor (/ s 60))
s (- s (* 60 s)))
(insert " => " (format (if neg "-%d:%02d" "%2d:%02d") h m))
t)))))
;; Move back to initial position, but never beyond updated
;; clock.
(unless (< (point) origin)
(goto-char origin)))))
(defun org-clock-save ()
"Persist various clock-related data to disk.
+4 -2
View File
@@ -1,6 +1,6 @@
;;; org-colview.el --- Column View in Org -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -116,6 +116,7 @@ in `org-columns-summary-types-default', which see."
(defvar-local org-columns-overlays nil
"Holds the list of current column overlays.")
(put 'org-columns-overlays 'permanent-local t)
(defvar-local org-columns-current-fmt nil
"Local variable, holds the currently active column format.")
@@ -524,7 +525,8 @@ for the duration of the command.")
(setq header-line-format org-previous-header-line-format)
(kill-local-variable 'org-previous-header-line-format)
(remove-hook 'post-command-hook #'org-columns-hscroll-title 'local))
(set-marker org-columns-begin-marker nil)
(when (markerp org-columns-begin-marker)
(set-marker org-columns-begin-marker nil))
(when (markerp org-columns-top-level-marker)
(set-marker org-columns-top-level-marker nil))
(with-silent-modifications
+14 -12
View File
@@ -1,6 +1,6 @@
;;; org-compat.el --- Compatibility Code for Older Emacsen -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -196,11 +196,13 @@ removed."
;;; Emacs < 27.1 compatibility
(unless (fboundp 'combine-change-calls)
;; A stub when `combine-change-calls' was not yet there.
(defmacro combine-change-calls (_beg _end &rest body)
(declare (debug (form form def-body)) (indent 2))
`(progn ,@body)))
(if (version< emacs-version "29")
;; A stub when `combine-change-calls' was not yet there or had
;; critical bugs (see Emacs bug#60467).
(defmacro org-combine-change-calls (_beg _end &rest body)
(declare (debug (form form def-body)) (indent 2))
`(progn ,@body))
(defalias 'org-combine-change-calls 'combine-change-calls))
(if (version< emacs-version "27.1")
(defsubst org-replace-buffer-contents (source &optional _max-secs _max-costs)
@@ -1543,7 +1545,7 @@ key."
"Run `org-fold-region' when in org-mode."
(if (derived-mode-p 'org-mode)
(org-fold-region (max from (point-min)) (min to (point-max)) flag 'headline)
;; Apply EXTRA to avoid breakages if adviced function definition
;; Apply EXTRA to avoid breakages if advised function definition
;; changes.
(apply oldfun from to flag extra)))
@@ -1551,7 +1553,7 @@ key."
"Run `org-next-visible-heading' when in org-mode."
(if (derived-mode-p 'org-mode)
(org-next-visible-heading arg)
;; Apply EXTRA to avoid breakages if adviced function definition
;; Apply EXTRA to avoid breakages if advised function definition
;; changes.
(apply oldfun arg extra)))
@@ -1571,7 +1573,7 @@ key."
(point)))))
(goto-char found)
found)))
;; Apply EXTRA to avoid breakages if adviced function definition
;; Apply EXTRA to avoid breakages if advised function definition
;; changes.
(apply oldfun invisible-ok extra)))
@@ -1579,7 +1581,7 @@ key."
"Run `org-at-heading-p' when in org-mode."
(if (derived-mode-p 'org-mode)
(org-at-heading-p (not invisible-ok))
;; Apply EXTRA to avoid breakages if adviced function definition
;; Apply EXTRA to avoid breakages if advised function definition
;; changes.
(apply oldfun invisible-ok extra)))
@@ -1587,7 +1589,7 @@ key."
"Run `org-fold-hide-sublevels' when in org-mode."
(if (derived-mode-p 'org-mode)
(org-fold-hide-sublevels levels)
;; Apply EXTRA to avoid breakages if adviced function definition
;; Apply EXTRA to avoid breakages if advised function definition
;; changes.
(apply oldfun levels extra)))
@@ -1600,7 +1602,7 @@ key."
(org-fold-hide-subtree)
(org-fold-show-children)
(org-fold-show-entry 'hide-drawers)))
;; Apply EXTRA to avoid breakages if adviced function definition
;; Apply EXTRA to avoid breakages if advised function definition
;; changes.
(apply oldfun extra)))
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-crypt.el --- Public Key Encryption for Org Entries -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2007-2022 Free Software Foundation, Inc.
;; Copyright (C) 2007-2023 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-ctags.el --- Integrate Emacs "tags" Facility with Org -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2022 Free Software Foundation, Inc.
;; Copyright (C) 2007-2023 Free Software Foundation, Inc.
;; Author: Paul Sexton <eeeickythump@gmail.com>
;; Keywords: org, wp
+5 -2
View File
@@ -1,6 +1,6 @@
;;; org-cycle.el --- Visibility cycling of Org entries -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2020-2020 Free Software Foundation, Inc.
;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
;;
;; Maintainer: Ihor Radchenko <yantar92 at gmail dot com>
;; Keywords: folding, visibility cycling, invisible text
@@ -87,7 +87,7 @@
(defvar-local org-cycle-subtree-status nil)
(put 'org-cycle-subtree-status 'org-state t)
;;;; Customisation:
;;;; Customization:
(defgroup org-cycle nil
@@ -648,6 +648,9 @@ With a numeric prefix, show all headlines up to that level."
(org-fold-show-hidden-entry)
(org-fold-show-children))
("content"
;; Newline before heading will be outside the
;; narrowing. Make sure that it is revealed.
(org-fold-heading nil)
(save-excursion
(save-restriction
(org-narrow-to-subtree)
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-datetree.el --- Create date entries in a tree -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-duration.el --- Library handling durations -*- lexical-binding: t; -*-
;; Copyright (C) 2017-2022 Free Software Foundation, Inc.
;; Copyright (C) 2017-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; Keywords: outlines, hypermedia, calendar, wp
+87 -61
View File
@@ -1,6 +1,6 @@
;;; org-element.el --- Parser for Org Syntax -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; Copyright (C) 2012-2023 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -713,11 +713,11 @@ is cleared and contents are removed in the process."
;; DATUM is i.e. a headline, it's property list (`:title'
;; in case of headline) can contain parsed objects. The
;; objects will contain `:parent' property set to the DATUM
;; itself. When copied, these inner `:parent' propery
;; itself. When copied, these inner `:parent' property
;; values will contain incorrect object decoupled from
;; DATUM. Changes to the DATUM copy will not longer be
;; reflected in the `:parent' properties. So, we need to
;; reassign inner `:parent' propreties to the DATUM copy
;; reassign inner `:parent' properties to the DATUM copy
;; explicitly.
(org-element-map element-copy (cons 'plain-text org-element-all-objects)
(lambda (obj) (when (equal datum (org-element-property :parent obj))
@@ -1040,7 +1040,7 @@ parse properties for property drawer at point."
(property-value (match-string-no-properties 3)))
(cond
((and (plist-member properties property-name-symbol)
(string-match-p "+$" property-name))
(string-match-p "\\+$" property-name))
(let ((val (plist-get properties property-name-symbol)))
(if (listp val)
(setq properties
@@ -1365,7 +1365,16 @@ Assume point is at beginning of the inline task."
(priority (and (looking-at "\\[#.\\][ \t]*")
(progn (goto-char (match-end 0))
(aref (match-string 0) 2))))
(title-start (point))
(commentedp
(and (let ((case-fold-search nil))
(looking-at org-element-comment-string))
(goto-char (match-end 0))
(when (looking-at-p "\\(?:[ \t]\\|$\\)")
(point))))
(title-start (prog1 (point)
(unless (or todo priority commentedp)
;; Headline like "* :tag:"
(skip-chars-backward " \t"))))
(tags (when (re-search-forward
"[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
(line-end-position)
@@ -1375,6 +1384,7 @@ Assume point is at beginning of the inline task."
(title-end (point))
(raw-value (org-trim
(buffer-substring-no-properties title-start title-end)))
(archivedp (member org-element-archive-tag tags))
(task-end (save-excursion
(end-of-line)
(and (re-search-forward org-element-headline-re limit t)
@@ -1410,7 +1420,9 @@ Assume point is at beginning of the inline task."
:todo-keyword todo
:todo-type todo-type
:post-blank (1- (count-lines (or task-end begin) end))
:post-affiliated begin)
:post-affiliated begin
:archivedp archivedp
:commentedp commentedp)
time-props
standard-props))))
(org-element-put-property
@@ -2370,7 +2382,9 @@ Assume point is at the beginning of the fixed-width area."
(defun org-element-fixed-width-interpreter (fixed-width _)
"Interpret FIXED-WIDTH element as Org syntax."
(let ((value (org-element-property :value fixed-width)))
(and value (replace-regexp-in-string "^" ": " value))))
(and value
(if (string-empty-p value) ":\n"
(replace-regexp-in-string "^" ": " value)))))
;;;; Horizontal Rule
@@ -2448,7 +2462,7 @@ CDR is a plist containing `:key', `:value', `:begin', `:end',
(org-element-property :value keyword)))
;;;; Latex Environment
;;;; LaTeX Environment
(defconst org-element--latex-begin-environment
"^[ \t]*\\\\begin{\\([A-Za-z0-9*]+\\)}"
@@ -3398,7 +3412,7 @@ CONTENTS is the contents of the object."
(format "/%s/" contents))
;;;; Latex Fragment
;;;; LaTeX Fragment
(defun org-element-latex-fragment-parser ()
"Parse LaTeX fragment at point, if any.
@@ -4780,7 +4794,7 @@ Elements are accumulated into ACC."
;; elements. Below code reassigns
;; `:parent' property of the element and
;; may interfere with cache
;; synchronisation if parent element is not
;; synchronization if parent element is not
;; yet in cache. Moreover, the returned
;; structure may be altered by caller code
;; arbitrarily. Hence, we return a copy of
@@ -5287,7 +5301,7 @@ indentation removed from its contents."
;; mechanism is robust enough to preserve total order among elements
;; even when the tree is only partially synchronized.
;;
;; The cache code debuggin is fairly complex because cache request
;; The cache code debugging is fairly complex because cache request
;; state is often hard to reproduce. An extensive diagnostics
;; functionality is built into the cache code to assist hunting bugs.
;; See `org-element--cache-self-verify', `org-element--cache-self-verify-frequency',
@@ -5295,6 +5309,7 @@ indentation removed from its contents."
;; `org-element--cache-diagnostics-ring-size', `org-element--cache-map-statistics',
;; `org-element--cache-map-statistics-threshold'.
;;;###autoload
(defvar org-element-use-cache t
"Non-nil when Org parser should cache its results.")
@@ -5314,7 +5329,7 @@ seconds.")
"Duration, as a time value, of the pause between synchronizations.
See `org-element-cache-sync-duration' for more information.")
(defvar org-element--cache-self-verify t
(defvar org-element--cache-self-verify nil
"Activate extra consistency checks for the cache.
This may cause serious performance degradation depending on the value
@@ -5434,14 +5449,14 @@ OFFSET and, if they belong to element PARENT, are adopted by it.
PHASE specifies the phase number, as an integer.
For any synchronisation request, all the later requests in the cache
For any synchronization request, all the later requests in the cache
must not start at or before END. See `org-element--cache-submit-request'.")
(defvar-local org-element--cache-sync-timer nil
"Timer used for cache synchronization.")
(defvar-local org-element--cache-sync-keys-value nil
"Id value used to identify keys during synchronisation.
"Id value used to identify keys during synchronization.
See `org-element--cache-key' for more information.")
(defvar-local org-element--cache-change-tic nil
@@ -5468,9 +5483,9 @@ See `org-element--cache-key' for more information.")
This variable is used to determine when re-parsing buffer is not going
to slow down the command.
If the commends end up modifying the cache, the worst case scenario is
If the commands end up modifying the cache, the worst case scenario is
performance drop. So, advicing these commands is safe. Yet, it is
better to remove the commands adviced in such way from this list.")
better to remove the commands advised in such a way from this list.")
(defmacro org-element--request-key (request)
"Get NEXT part of a `org-element--cache-sync-requests' REQUEST."
@@ -5717,7 +5732,11 @@ This function assumes `org-element--headline-cache' is a valid AVL tree."
;; `combine-change-calls' because the buffer is potentially
;; changed without notice (the change will be registered
;; after exiting the `combine-change-calls' body though).
(memq #'org-element--cache-after-change after-change-functions))))))
(catch :inhibited
(org-fold-core-cycle-over-indirect-buffers
(unless (memq #'org-element--cache-after-change after-change-functions)
(throw :inhibited nil)))
t))))))
;; FIXME: Remove after we establish that hashing is effective.
(defun org-element-cache-hash-show-statistics ()
@@ -6291,7 +6310,7 @@ completing the request."
(key (org-element--cache-key data)))
;; Traverse the cache tree. Ignore all the elements before
;; START. Note that `avl-tree-stack' would not bypass the
;; elements before START and thus would have beeen less
;; elements before START and thus would have been less
;; efficient.
(if (and leftp (avl-tree--node-left node)
(not (org-element--cache-key-less-p key start)))
@@ -6548,7 +6567,9 @@ If you observe Emacs hangs frequently, please report this to Org mode mailing li
;; Make sure that we return referenced element in cache
;; that can be altered directly.
(if element
(setq element (or (org-element--cache-put element) element))
(progn
(org-element-put-property element :granularity 'element)
(setq element (or (org-element--cache-put element) element)))
;; Nothing to parse (i.e. empty file).
(throw 'exit parent))
(unless (or (not (org-element--cache-active-p)) parent)
@@ -6684,20 +6705,8 @@ The function returns the new value of `org-element--cache-change-warning'."
(setq org-element--cache-change-tic (buffer-chars-modified-tick))
(setq org-element--cache-last-buffer-size (buffer-size))
(goto-char beg)
(beginning-of-line)
(let ((bottom (save-excursion
(goto-char end)
(if (and (bolp)
;; When beg == end, still extent to eol.
(> (point) beg))
;; FIXME: Potential pitfall.
;; We are appending to an element end.
;; Unless the last inserted char is not
;; newline, the next element is not broken
;; and does not need to be purged from the
;; cache.
end
(line-end-position)))))
(forward-line 0)
(let ((bottom (save-excursion (goto-char end) (line-end-position))))
(prog1
;; Use the worst change warning to not miss important edits.
;; This function is called before edit and after edit by
@@ -6793,7 +6802,7 @@ By default (when this variable is nil), cache re-parses modified
headlines immediately after modification preserving all the unaffected
elements inside the headline.
The default behaviour works best when users types inside Org buffer of
The default behavior works best when users types inside Org buffer of
when buffer modifications are mixed with cache requests. However,
large automated edits inserting/deleting many headlines are somewhat
slower by default (as in `org-archive-subtree'). Let-binding this
@@ -6923,12 +6932,13 @@ known element in cache (it may start after END)."
(let ((current (org-with-point-at (org-element-property :begin up)
(org-element-with-disabled-cache
(and (looking-at-p org-element-headline-re)
(org-element-headline-parser))))))
(org-element-headline-parser nil 'fast))))))
(when (eq 'headline (org-element-type current))
(org-element--cache-log-message
"Found non-robust headline that can be updated individually: %S"
(org-element--format-element current))
(org-element-set-element up current)
(org-element-put-property up :granularity 'element)
t)))
;; If UP is org-data, the situation is similar to
;; headline case. We just need to re-parse the
@@ -7255,18 +7265,18 @@ Each element indicates the latest `org-element--cache-change-tic' when
change did not contain gaps.")
;;;###autoload
(defun org-element-cache-reset (&optional all no-persistance)
(defun org-element-cache-reset (&optional all no-persistence)
"Reset cache in current buffer.
When optional argument ALL is non-nil, reset cache in all Org
buffers.
When optional argument NO-PERSISTANCE is non-nil, do not try to update
When optional argument NO-PERSISTENCE is non-nil, do not try to update
the cache persistence in the buffer."
(interactive "P")
(dolist (buffer (if all (buffer-list) (list (current-buffer))))
(org-with-base-buffer buffer
(when (and org-element-use-cache (derived-mode-p 'org-mode))
;; Only persist cache in file buffers.
(when (and (buffer-file-name) (not no-persistance))
(when (and (buffer-file-name) (not no-persistence))
(when (not org-element-cache-persistent)
(org-persist-unregister 'org-element--headline-cache (current-buffer))
(org-persist-unregister 'org-element--cache (current-buffer)))
@@ -7383,18 +7393,20 @@ the cache."
(save-excursion
(save-restriction
(unless narrow (widen))
;; Synchronise cache up to the end of mapped region.
;; Synchronize cache up to the end of mapped region.
(org-element-at-point to-pos)
(cl-macrolet ((cache-root
;; Use the most optimal version of cache available.
() `(if (memq granularity '(headline headline+inlinetask))
(org-element--headline-cache-root)
(org-element--cache-root)))
() `(org-with-base-buffer nil
(if (memq granularity '(headline headline+inlinetask))
(org-element--headline-cache-root)
(org-element--cache-root))))
(cache-size
;; Use the most optimal version of cache available.
() `(if (memq granularity '(headline headline+inlinetask))
org-element--headline-cache-size
org-element--cache-size))
() `(org-with-base-buffer nil
(if (memq granularity '(headline headline+inlinetask))
org-element--headline-cache-size
org-element--cache-size)))
(cache-walk-restart
;; Restart tree traversal after AVL tree re-balance.
() `(when node
@@ -7418,14 +7430,15 @@ the cache."
;; point.
() `(progn
;; Parsing is one of the performance
;; bottlenecks. Make sure to optimise it as
;; bottlenecks. Make sure to optimize it as
;; much as possible.
;;
;; Avoid extra staff like timer cancels et al
;; and only call `org-element--cache-sync-requests' when
;; there are pending requests.
(when org-element--cache-sync-requests
(org-element--cache-sync (current-buffer)))
(org-with-base-buffer nil
(when org-element--cache-sync-requests
(org-element--cache-sync (current-buffer))))
;; Call `org-element--parse-to' directly avoiding any
;; kind of `org-element-at-point' overheads.
(if restrict-elements
@@ -7496,8 +7509,9 @@ the cache."
tmpnext-start))
;; Check if cache does not have gaps.
(cache-gapless-p
() `(eq org-element--cache-change-tic
(alist-get granularity org-element--cache-gapless))))
() `(org-with-base-buffer nil
(eq org-element--cache-change-tic
(alist-get granularity org-element--cache-gapless)))))
;; The core algorithm is simple walk along binary tree. However,
;; instead of checking all the tree elements from first to last
;; (like in `avl-tree-mapcar'), we begin from FROM-POS skipping
@@ -7539,15 +7553,15 @@ the cache."
;; beginning.
(next-element-re (pcase granularity
((or `headline
(guard (eq '(headline)
restrict-elements)))
(guard (equal '(headline)
restrict-elements)))
(cons
(org-with-limited-levels
org-element-headline-re)
'match-beg))
(`headline+inlinetask
(cons
(if (eq '(inlinetask) restrict-elements)
(if (equal '(inlinetask) restrict-elements)
(org-inlinetask-outline-regexp)
org-element-headline-re)
'match-beg))
@@ -7625,7 +7639,9 @@ the cache."
;; In the process, we may alter the buffer,
;; so also keep track of the cache state.
(progn
(setq modified-tic org-element--cache-change-tic)
(setq modified-tic
(org-with-base-buffer nil
org-element--cache-change-tic))
(setq cache-size (cache-size))
;; When NEXT-RE/FAIL-RE is provided, skip to
;; next regexp match after :begin of the current
@@ -7659,7 +7675,7 @@ the cache."
;;
;; Call FUNC. FUNC may move point.
(setq org-element-cache-map-continue-from nil)
(if org-element--cache-map-statistics
(if (org-with-base-buffer nil org-element--cache-map-statistics)
(progn
(setq before-time (float-time))
(push (funcall func data) result)
@@ -7678,7 +7694,15 @@ the cache."
(when org-element-cache-map-continue-from
(goto-char org-element-cache-map-continue-from))
(when (> (point) start)
(move-start-to-next-match nil))
(move-start-to-next-match nil)
;; (point) inside matching element.
;; Go further.
(when (> (point) start)
(setq data (element-match-at-point))
(if (not data)
(cache-walk-abort)
(goto-char (next-element-start))
(move-start-to-next-match next-element-re))))
;; Drop nil.
(unless (car result) (pop result)))
;; If FUNC did not move the point and we
@@ -7691,8 +7715,9 @@ the cache."
start))
(setq start nil))
;; Check if the buffer has been modified.
(unless (and (eq modified-tic org-element--cache-change-tic)
(eq cache-size (cache-size)))
(unless (org-with-base-buffer nil
(and (eq modified-tic org-element--cache-change-tic)
(eq cache-size (cache-size))))
;; START may no longer be valid, update
;; it to beginning of real element.
;; Upon modification, START may lay
@@ -7700,7 +7725,8 @@ the cache."
;; it to real beginning then despite
;; START being larger.
(setq start nil)
(move-start-to-next-match nil)
(let ((data nil)) ; data may not be valid. ignore it.
(move-start-to-next-match nil))
;; The new element may now start before
;; or at already processed position.
;; Make sure that we continue from an
@@ -7737,7 +7763,7 @@ the cache."
;; longer trust STACK.
(cache-walk-restart)))
;; Second, move to the right branch of the tree or skip
;; it alltogether.
;; it altogether.
(if continue-flag
(setq continue-flag nil)
(setq node (if (and (car stack)
@@ -7821,7 +7847,7 @@ element ending there."
(setq cached-only nil))
(let (element)
(when (org-element--cache-active-p)
(if (not org-element--cache) (org-element-cache-reset)
(if (not (org-with-base-buffer nil org-element--cache)) (org-element-cache-reset)
(unless cached-only (org-element--cache-sync (current-buffer) pom))))
(setq element (if cached-only
(when (and (org-element--cache-active-p)
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-entities.el --- Support for Special Entities -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2022 Free Software Foundation, Inc.
;; Copyright (C) 2010-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>,
;; Ulf Stegemann <ulf at zeitform dot de>
+3 -3
View File
@@ -1,6 +1,6 @@
;;; org-faces.el --- Face definitions -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
;; Copyright (C) 2004-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -108,7 +108,7 @@ color of the frame."
"Face used for drawers."
:group 'org-faces)
(defface org-property-value nil
(defface org-property-value '((t :inherit default))
"Face used for the value of a property."
:group 'org-faces)
@@ -517,7 +517,7 @@ content of these blocks will still be treated as Org syntax."
(defface org-agenda-structure-filter '((t (:inherit (org-warning org-agenda-structure))))
"Face used for the current type of task filter in the agenda.
It inherits from `org-agenda-structure' so it can adapt to
it (e.g. if that is assigned a diffent font height or family)."
it (e.g. if that is assigned a different font height or family)."
:group 'org-faces)
(defface org-agenda-date '((t (:inherit org-agenda-structure)))
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-feed.el --- Add RSS feed items to Org files -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
+75 -63
View File
@@ -1,6 +1,6 @@
;;; org-fold-core.el --- Folding buffer text -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2020-2020 Free Software Foundation, Inc.
;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
;;
;; Author: Ihor Radchenko <yantar92 at gmail dot com>
;; Keywords: folding, invisible text
@@ -78,7 +78,7 @@
;; Similar to 'org-fold-visible, display of any arbitrary folding spec
;; can be configured using folding spec properties. In particular,
;; `:visible' folding spec proprety controls whether the folded text
;; `:visible' folding spec property controls whether the folded text
;; is visible or not. If the `:visible' folding spec property is nil,
;; folded text is hidden or displayed as a constant string (ellipsis)
;; according to the value of `:ellipsis' folding spec property. See
@@ -91,7 +91,7 @@
;; If necessary, one can add or remove folding specs using
;; `org-fold-core-add-folding-spec' and `org-fold-core-remove-folding-spec'.
;; If a buffer initialised with `org-fold-core-initialize' is cloned into indirect
;; If a buffer initialized with `org-fold-core-initialize' is cloned into indirect
;; buffers, it's folding state is copied to that indirect buffer.
;; The folding states are independent.
@@ -145,10 +145,10 @@
;; All the folding specs can be specified by symbol representing their
;; name. However, this is not always convenient, especially if the
;; same spec can be used for fold different syntaxical structures.
;; same spec can be used for fold different syntactical structures.
;; Any folding spec can be additionally referenced by a symbol listed
;; in the spec's `:alias' folding spec property. For example, Org
;; mode's `org-fold-outline' folding spec can be referened as any
;; mode's `org-fold-outline' folding spec can be referenced as any
;; symbol from the following list: '(headline heading outline
;; inlinetask plain-list) The list is the value of the spec's `:alias'
;; property.
@@ -170,7 +170,7 @@
;; possible to control to unfold it temporarily during interactive
;; isearch session.
;; The isearch behaviour is controlled on per-folding-spec basis by
;; The isearch behavior is controlled on per-folding-spec basis by
;; setting `isearch-open' and `isearch-ignore' folding spec
;; properties. The the docstring of `org-fold-core--specs' for more details.
@@ -179,19 +179,19 @@
;; The visibility of the text inserted in front, rear, or in the
;; middle of a folded region is managed according to `:front-sticky'
;; and `:rear-sticky' folding properties of the corresponding folding
;; spec. The rules are the same with stickyness of text properties in
;; spec. The rules are the same with stickiness of text properties in
;; Elisp.
;; If a text being inserted into the buffer is already folded and
;; invisible (before applying the stickyness rules), then it is
;; revealed. This behaviour can be changed by wrapping the insertion
;; invisible (before applying the stickiness rules), then it is
;; revealed. This behavior can be changed by wrapping the insertion
;; code into `org-fold-core-ignore-modifications' macro. The macro will disable
;; all the processing related to buffer modifications.
;; The library also provides a way to unfold the text after some
;; destructive changes breaking syntaxical structure of the buffer.
;; destructive changes breaking syntactical structure of the buffer.
;; For example, Org mode automatically reveals folded drawers when the
;; drawer becomes syntaxically incorrect:
;; drawer becomes syntactically incorrect:
;; ------- before modification -------
;; :DRAWER:<begin fold>
;; Some folded text inside drawer
@@ -233,13 +233,13 @@
;; visible part of a buffer may cause noticeable lags (which is still
;; orders of magnitude better in comparison with overlays). If the
;; performance issues become critical while using this library, it is
;; recommended to minimise the number of folding specs used in the
;; recommended to minimize the number of folding specs used in the
;; same buffer at a time.
;; Alternatively, the library provides `org-fold-core--optimise-for-huge-buffers'
;; for additional speedup. This can be used as a file-local variable
;; in huge buffers. The variable can be set to enable various levels
;; of extra optimisation. See the docstring for detailed information.
;; of extra optimization. See the docstring for detailed information.
;; It is worth noting that when using `org-fold-core--optimise-for-huge-buffers'
;; with `grab-invisible' option, folded regions copied to other
@@ -250,7 +250,7 @@
;; Another possible bottleneck is the fragility check after the change
;; related to the folded text. The functions used in `:fragile'
;; folding properties must be optimised. Also,
;; folding properties must be optimized. Also,
;; `org-fold-core-ignore-fragility-checks' or even `org-fold-core-ignore-modifications' may be
;; used when appropriate in the performance-critical code. When
;; inserting text from within `org-fold-core-ignore-modifications' macro, it is
@@ -302,7 +302,7 @@ be revealed.")
(defvar-local org-fold-core--optimise-for-huge-buffers nil
"Non-nil turns on extra speedup on huge buffers (Mbs of folded text).
This setting is risky and may cause various artefacts and degraded
This setting is risky and may cause various artifacts and degraded
functionality, especially when using external packages. It is
recommended to enable it on per-buffer basis as file-local variable.
@@ -321,7 +321,7 @@ following symbols:
functions relying on this package might not be able to unfold the
edited text. For example, removed leading stars from a folded
headline in Org mode will break visibility cycling since Org mode
will not be avare that the following folded text belonged to
will not be aware that the following folded text belonged to
headline.
- `ignore-modification-checks': Do not try to detect insertions in the
@@ -337,7 +337,7 @@ following symbols:
used.
- `merge-folds': Do not distinguish between different types of folding
specs. This is the most aggressive optimisation with unforeseen and
specs. This is the most aggressive optimization with unforeseen and
potentially drastic effects.")
(put 'org-fold-core--optimise-for-huge-buffers 'safe-local-variable 'listp)
@@ -355,7 +355,7 @@ following symbols:
"Folding specs defined in current buffer.
Each spec is a list (SPEC-SYMBOL SPEC-PROPERTIES).
SPEC-SYMBOL is the symbol respresenting the folding spec.
SPEC-SYMBOL is the symbol representing the folding spec.
SPEC-PROPERTIES is an alist defining folding spec properties.
If a text region is folded using multiple specs, only the folding spec
@@ -497,31 +497,39 @@ hanging around."
(declare (debug (form body)) (indent 0))
`(let (buffers dead-properties)
(if (and (not (buffer-base-buffer))
(not (eq (current-buffer) (car org-fold-core--indirect-buffers))))
(not (memq (current-buffer) org-fold-core--indirect-buffers)))
;; We are in base buffer with `org-fold-core--indirect-buffers' value from
;; different buffer. This can happen, for example, when
;; org-capture copies local variables into *Capture* buffer.
(setq buffers (list (current-buffer)))
(dolist (buf (cons (or (buffer-base-buffer) (current-buffer))
(buffer-local-value 'org-fold-core--indirect-buffers (or (buffer-base-buffer) (current-buffer)))))
(if (buffer-live-p buf)
(push buf buffers)
(dolist (spec (org-fold-core-folding-spec-list))
(when (and (not (org-fold-core-get-folding-spec-property spec :global))
(gethash (cons buf spec) org-fold-core--property-symbol-cache))
;; Make sure that dead-properties variable can be passed
;; as argument to `remove-text-properties'.
(push t dead-properties)
(push (gethash (cons buf spec) org-fold-core--property-symbol-cache)
dead-properties))))))
(let ((all-buffers (buffer-local-value
'org-fold-core--indirect-buffers
(or (buffer-base-buffer) (current-buffer)))))
(dolist (buf (cons (or (buffer-base-buffer) (current-buffer))
(buffer-local-value 'org-fold-core--indirect-buffers (or (buffer-base-buffer) (current-buffer)))))
(if (buffer-live-p buf)
(push buf buffers)
(dolist (spec (org-fold-core-folding-spec-list))
(when (and (not (org-fold-core-get-folding-spec-property spec :global))
(gethash (cons buf spec) org-fold-core--property-symbol-cache))
;; Make sure that dead-properties variable can be passed
;; as argument to `remove-text-properties'.
(push t dead-properties)
(push (gethash (cons buf spec) org-fold-core--property-symbol-cache)
dead-properties)))))
(when dead-properties
(with-current-buffer (or (buffer-base-buffer) (current-buffer))
(setq-local org-fold-core--indirect-buffers
(seq-filter #'buffer-live-p all-buffers))))))
(dolist (buf buffers)
(with-current-buffer buf
(with-silent-modifications
(save-restriction
(widen)
(remove-text-properties
(point-min) (point-max)
dead-properties)))
(when dead-properties
(with-silent-modifications
(save-restriction
(widen)
(remove-text-properties
(point-min) (point-max)
dead-properties))))
,@body))))
;; This is the core function used to fold text in buffers. We use
@@ -600,7 +608,7 @@ unless RETURN-ONLY is non-nil."
(org-fold-core-folding-spec-list)))
(remove (assq 'invisible char-property-alias-alist)
char-property-alias-alist)))
;; Set folding property stickyness according to
;; Set folding property stickiness according to
;; their `:font-sticky' and `:rear-sticky'
;; parameters.
(let (full-prop-list)
@@ -930,6 +938,8 @@ are provided.
If FROM is non-nil and TO is nil, search the folded regions at FROM.
When both FROM and TO are nil, search folded regions in the whole buffer.
When SPECS is non-nil it should be a list of folding specs or a symbol.
Only return the matching fold types.
@@ -946,6 +956,9 @@ WITH-MARKERS must be nil when RELATIVE is non-nil."
(unless (listp specs) (setq specs (list specs)))
(let (regions region mk-region)
(org-with-wide-buffer
(when (and (not from) (not to))
(setq from (point-min)
to (point-max)))
(when (and from (not to)) (setq to (point-max)))
(when (and from (< from (point-min))) (setq from (point-min)))
(when (and to (> to (point-max))) (setq to (point-max)))
@@ -998,7 +1011,13 @@ If SPEC-OR-ALIAS is omitted and FLAG is nil, unfold everything in the region."
(overlay-put o (org-fold-core--property-symbol-get-create spec) spec)
(overlay-put o 'invisible spec)
(overlay-put o 'isearch-open-invisible #'org-fold-core--isearch-show)
(overlay-put o 'isearch-open-invisible-temporary #'org-fold-core--isearch-show-temporary))
;; FIXME: Disabling to work around Emacs bug#60399
;; and https://orgmode.org/list/87zgb6tk6h.fsf@localhost.
;; The proper fix will require making sure that
;; `org-fold-core-isearch-open-function' does not
;; delete the overlays used by isearch.
;; (overlay-put o 'isearch-open-invisible-temporary #'org-fold-core--isearch-show-temporary)
)
(put-text-property from to (org-fold-core--property-symbol-get-create spec) spec)
(put-text-property from to 'isearch-open-invisible #'org-fold-core--isearch-show)
(put-text-property from to 'isearch-open-invisible-temporary #'org-fold-core--isearch-show-temporary)
@@ -1058,7 +1077,7 @@ means that the buffer should stay alive during the operation,
because otherwise all these markers will point to nowhere."
(declare (debug (form body)) (indent 1))
(org-with-gensyms (regions)
`(let* ((,regions ,(org-fold-core-get-regions :with-markers use-markers)))
`(let* ((,regions (org-fold-core-get-regions :with-markers ,use-markers)))
(unwind-protect (progn ,@body)
(org-fold-core-regions ,regions :override t :clean-markers t)))))
@@ -1126,16 +1145,9 @@ This function is intended to be used as `isearch-filter-predicate'."
"Clear `org-fold-core--isearch-local-regions'."
(clrhash org-fold-core--isearch-local-regions))
(defun org-fold-core--isearch-show (region)
"Reveal text in REGION found by isearch.
REGION can also be an overlay in current buffer."
(when (overlayp region)
(setq region (cons (overlay-start region)
(overlay-end region))))
(org-with-point-at (car region)
(while (< (point) (cdr region))
(funcall org-fold-core-isearch-open-function (car region))
(goto-char (org-fold-core-next-visibility-change (point) (cdr region) 'ignore-hidden)))))
(defun org-fold-core--isearch-show (_)
"Reveal text at point found by isearch."
(funcall org-fold-core-isearch-open-function (point)))
(defun org-fold-core--isearch-show-temporary (region hide-p)
"Temporarily reveal text in REGION.
@@ -1185,7 +1197,7 @@ instead of text properties. The created overlays will be stored in
;; We do not want it here.
(with-silent-modifications
(org-fold-core-region (car region) (cdr region) nil spec)
;; The overlay is modelled after `outline-flag-region'
;; The overlay is modeled after `outline-flag-region'
;; [2020-05-09 Sat] overlay for 'outline blocks.
(let ((o (make-overlay (car region) (cdr region) nil 'front-advance)))
(overlay-put o 'evaporate t)
@@ -1273,19 +1285,19 @@ to :front-sticky/:rear-sticky folding spec property.
If the folded region is folded with a spec with non-nil :fragile
property, unfold the region if the :fragile function returns non-nil."
;; If no insertions or deletions in buffer, skip all the checks.
(unless (or (eq org-fold-core--last-buffer-chars-modified-tick (buffer-chars-modified-tick))
org-fold-core--ignore-modifications
(unless (or org-fold-core--ignore-modifications
(eq org-fold-core--last-buffer-chars-modified-tick (buffer-chars-modified-tick))
(memql 'ignore-modification-checks org-fold-core--optimise-for-huge-buffers))
;; Store the new buffer modification state.
(setq org-fold-core--last-buffer-chars-modified-tick (buffer-chars-modified-tick))
(save-match-data
;; Handle changes in all the indirect buffers and in the base
;; buffer. Work around Emacs bug#46982.
(when (eq org-fold-core-style 'text-properties)
(org-fold-core-cycle-over-indirect-buffers
;; Re-hide text inserted in the middle/front/back of a folded
;; region.
(unless (equal from to) ; Ignore deletions.
;; Re-hide text inserted in the middle/front/back of a folded
;; region.
(unless (equal from to) ; Ignore deletions.
(when (eq org-fold-core-style 'text-properties)
(org-fold-core-cycle-over-indirect-buffers
(dolist (spec (org-fold-core-folding-spec-list))
;; Reveal fully invisible text inserted in the middle
;; of visible portion of the buffer. This is needed,
@@ -1303,7 +1315,7 @@ property, unfold the region if the :fragile function returns non-nil."
(unless (org-fold-core-region-folded-p from to spec)
(let ((spec-to (org-fold-core-get-folding-spec spec (min to (1- (point-max)))))
(spec-from (org-fold-core-get-folding-spec spec (max (point-min) (1- from)))))
;; Reveal folds around undoed deletion.
;; Reveal folds around undone deletion.
(when undo-in-progress
(let ((lregion (org-fold-core-get-region-at-point spec (max (point-min) (1- from))))
(rregion (org-fold-core-get-region-at-point spec (min to (1- (point-max))))))
@@ -1412,7 +1424,7 @@ property, unfold the region if the :fragile function returns non-nil."
;; To avoid the above situation, we simply clear all the properties,
;; unrealated to current buffer when a text is copied.
;; FIXME: Ideally, we may want to carry the folding state of copied
;; text between buffer (probably via user customisation).
;; text between buffer (probably via user customization).
(defun org-fold-core--buffer-substring-filter (beg end &optional delete)
"Clear folding state in killed text.
This function is intended to be used as `filter-buffer-substring-function'.
@@ -1421,7 +1433,7 @@ The arguments and return value are as specified for `filter-buffer-substring'."
;; The list will be used as an argument to `remove-text-properties'.
props-list)
;; There is no easy way to examine all the text properties of a
;; string, so we utilise the fact that printed string
;; string, so we utilize the fact that printed string
;; representation lists all its properties.
;; Loop over the elements of string representation.
(unless (or (string= "" return-string)
@@ -1481,7 +1493,7 @@ The arguments and return value are as specified for `filter-buffer-substring'."
return-string))
(defun org-fold-core-update-optimisation (beg end)
"Update huge buffer optimisation between BEG and END.
"Update huge buffer optimization between BEG and END.
See `org-fold-core--optimise-for-huge-buffers'."
(when (and (memql 'grab-invisible org-fold-core--optimise-for-huge-buffers)
(eq org-fold-core-style 'text-properties))
@@ -1494,7 +1506,7 @@ See `org-fold-core--optimise-for-huge-buffers'."
(setq pos (org-fold-core-next-folding-state-change (caar org-fold-core--specs) pos end))))))
(defun org-fold-core-remove-optimisation (beg end)
"Remove huge buffer optimisation between BEG and END.
"Remove huge buffer optimization between BEG and END.
See `org-fold-core--optimise-for-huge-buffers'."
(when (and (memql 'grab-invisible org-fold-core--optimise-for-huge-buffers)
(eq org-fold-core-style 'text-properties))
+1 -1
View File
@@ -1,6 +1,6 @@
;;; org-fold.el --- Folding of Org entries -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2020-2020 Free Software Foundation, Inc.
;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
;;
;; Author: Ihor Radchenko <yantar92 at gmail dot com>
;; Keywords: folding, invisible text
+7 -4
View File
@@ -1,6 +1,6 @@
;;; org-footnote.el --- Footnote support in Org -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -851,9 +851,12 @@ to `org-footnote-section'. Inline definitions are ignored."
(format "[fn:%s] DEFINITION NOT FOUND." label))
"\n"))))
;; Insert un-referenced footnote definitions at the end.
(pcase-dolist (`(,label . ,definition) definitions)
(unless (member label inserted)
(insert "\n" definition "\n")))))))))
;; Combine all insertions into one to create a single cache
;; update call.
(org-combine-change-calls (point) (point)
(pcase-dolist (`(,label . ,definition) definitions)
(unless (member label inserted)
(insert "\n" definition "\n"))))))))))
(defun org-footnote-normalize ()
"Turn every footnote in buffer into a numbered one."

Some files were not shown because too many files have changed in this diff Show More