[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c9d77405747: Merge from origin/emacs-29
From: |
Eli Zaretskii |
Subject: |
master c9d77405747: Merge from origin/emacs-29 |
Date: |
Sat, 11 Nov 2023 05:37:51 -0500 (EST) |
branch: master
commit c9d7740574758d47c8864cbada5fd2a2b2ee8911
Merge: 45942508141 ce0ebb91f25
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Merge from origin/emacs-29
ce0ebb91f25 Improve documentation of read syntax and printed represen...
81f84b00a5d ; * doc/lispref/modes.texi (Other Font Lock Variables): A...
434592b0746 ; * lisp/dired.el (dired-use-ls-dired): Doc fix (bug#67053).
fe000236cf2 Improve documentation of signaling errors in batch mode
103ca678ac1 Fix treesit-simple-indent-presets docstring (bug#67007)
b7871cefe7b Prevent an infinite loop in todo-mode (bug#66994)
fa8cc4c9ee2 Fix cmake-ts-mode indentation (Bug#66845)
5bdc61bc0ef Update to Org 9.6.11
18e2de1bec9 ; * lisp/bindings.el (right-word, left-word): Doc fix.
4f0fc3bfda3 ; Document core input events problems with XInput2
---
doc/lispref/control.texi | 19 +++++++++++++-----
doc/lispref/debugging.texi | 24 ++++++++++++++++++-----
doc/lispref/modes.texi | 6 ++++--
doc/lispref/objects.texi | 29 +++++++++++++++++++++++++--
doc/lispref/os.texi | 43 ++++++++++++++++++++++++++++-------------
doc/misc/org.org | 10 +++++-----
etc/PROBLEMS | 10 ++++++++++
etc/refcards/orgcard.tex | 2 +-
lisp/bindings.el | 16 +++++++++++++++
lisp/calendar/todo-mode.el | 7 ++++++-
lisp/dired.el | 4 +++-
lisp/emacs-lisp/debug.el | 7 +++++++
lisp/org/ob-core.el | 10 +++++-----
lisp/org/ob-shell.el | 12 ++++++++++--
lisp/org/ol-info.el | 14 +++++++-------
lisp/org/org-agenda.el | 10 ++++++++++
lisp/org/org-version.el | 4 ++--
lisp/org/org.el | 2 +-
lisp/org/ox.el | 28 ++++++++++++++++++++-------
lisp/progmodes/cmake-ts-mode.el | 14 +++++++++++---
lisp/subr.el | 4 ++++
lisp/treesit.el | 2 +-
src/eval.c | 4 ++++
23 files changed, 218 insertions(+), 63 deletions(-)
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index dc5b9507efc..2d2b8da7325 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -1883,6 +1883,9 @@ verbatim, don't just write @code{(error @var{string})}.
If @var{string}
@var{string} contains @samp{%}, @samp{`}, or @samp{'} it may be
reformatted, with undesirable results. Instead, use @code{(error "%s"
@var{string})}.
+
+When @code{noninteractive} is non-@code{nil} (@pxref{Batch Mode}),
+this function kills Emacs if the signaled error has no handler.
@end defun
@defun signal error-symbol data
@@ -1916,6 +1919,9 @@ variable to a list of the form @code{(@var{error-symbol}
.@:
The function @code{signal} never returns.
@c (though in older Emacs versions it sometimes could).
+If the error @var{error-symbol} has no handler, and
+@code{noninteractive} is non-@code{nil} (@pxref{Batch Mode}),
+this function eventually kills Emacs.
@example
@group
@@ -1980,11 +1986,14 @@ function which called the primitive that signaled the
error.
@end defvar
@cindex @code{debug-on-error} use
-An error that has no explicit handler may call the Lisp debugger. The
-debugger is enabled if the variable @code{debug-on-error} (@pxref{Error
-Debugging}) is non-@code{nil}. Unlike error handlers, the debugger runs
-in the environment of the error, so that you can examine values of
-variables precisely as they were at the time of the error.
+An error that has no explicit handler may call the Lisp debugger
+(@pxref{Invoking the Debugger}). The debugger is enabled if the
+variable @code{debug-on-error} (@pxref{Error Debugging}) is
+non-@code{nil}. Unlike error handlers, the debugger runs in the
+environment of the error, so that you can examine values of variables
+precisely as they were at the time of the error. In batch mode
+(@pxref{Batch Mode}), the Emacs process then normally exits with a
+non-zero exit status.
@node Handling Errors
@subsubsection Writing Code to Handle Errors
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index 169e3ac37d3..1246b3ff57a 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -629,11 +629,18 @@ This is a list of functions that are set to break on
entry by means of
to invoke the debugger.
@deffn Command debug &rest debugger-args
-This function enters the debugger. It switches buffers to a buffer
-named @file{*Backtrace*} (or @file{*Backtrace*<2>} if it is the second
-recursive entry to the debugger, etc.), and fills it with information
-about the stack of Lisp function calls. It then enters a recursive
-edit, showing the backtrace buffer in Debugger mode.
+This function enters the debugger. In interactive sessions, it
+switches to a buffer named @file{*Backtrace*} (or
+@file{*Backtrace*<2>} if it is the second recursive entry to the
+debugger, etc.), and fills it with information about the stack of Lisp
+function calls. It then enters a recursive edit, showing the
+backtrace buffer in Debugger mode. In batch mode (more generally,
+when @code{noninteractive} is non-@code{nil}, @pxref{Batch Mode}),
+this function shows the Lisp backtrace on the standard error stream,
+and then kills Emacs, causing it to exit with a non-zero exit code
+(@pxref{Killing Emacs}). Binding
+@code{backtrace-on-error-noninteractive} to @code{nil} suppresses the
+backtrace in batch mode, see below.
The Debugger mode @kbd{c}, @kbd{d}, @kbd{j}, and @kbd{r} commands exit
the recursive edit; then @code{debug} switches back to the previous
@@ -717,6 +724,13 @@ under which @code{debug} is called.
@end table
@end deffn
+@defvar backtrace-on-error-noninteractive
+If this variable is non-@code{nil}, the default, entering the debugger
+in batch mode shows the backtrace of Lisp functions calls. Binding
+the variable to the @code{nil} value suppresses the backtrace and
+shows only the error message.
+@end defvar
+
@node Internals of Debugger
@subsection Internals of the Debugger
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index f365d88fade..f907a6aaf09 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -3614,7 +3614,9 @@ errors are suppressed, is instead run by a timer. Thus,
this mode
allows using debugging aids such as @code{debug-on-error}
(@pxref{Error Debugging}) and Edebug (@pxref{Edebug}) for finding and
fixing problems in font-lock code and any other code run by JIT
-font-lock.
+font-lock. Another command that could be useful when developing and
+debugging font-lock is @code{font-lock-debug-fontify}, see @ref{Font
+Lock Basics}.
@end deffn
@node Levels of Font Lock
@@ -5097,7 +5099,7 @@ this matcher doesn't check that argument. For example,
to match the
first child where parent is @code{argument_list}, use
@example
-(match nil "argument_list" nil nil 0 0)
+(match nil "argument_list" nil 0 0)
@end example
In addition, @var{node-type} can be a special value @code{null},
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 9febcbefa33..17961ffadfa 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -96,6 +96,12 @@ Hash notation cannot be read at all, so the Lisp reader
signals the
error @code{invalid-read-syntax} whenever it encounters @samp{#<}.
@kindex invalid-read-syntax
+ We describe the read syntax and the printed representation of each
+Lisp data type where we describe that data type, in the following
+sections of this chapter. For example, see @ref{String Type}, and its
+subsections for the read syntax and printed representation of strings;
+see @ref{Vector Type} for the same information about vectors; etc.
+
In other languages, an expression is text; it has no other form. In
Lisp, an expression is primarily a Lisp object and only secondarily the
text that is the object's read syntax. Often there is no need to
@@ -321,6 +327,8 @@ number whose value is 1500. They are all equivalent.
A @dfn{character} in Emacs Lisp is nothing more than an integer. In
other words, characters are represented by their character codes. For
example, the character @kbd{A} is represented as the @w{integer 65}.
+That is also their usual printed representation; see @ref{Basic Char
+Syntax}.
Individual characters are used occasionally in programs, but it is
more common to work with @emph{strings}, which are sequences composed
@@ -1106,6 +1114,22 @@ character. Likewise, you can include a backslash by
preceding it with
another backslash, like this: @code{"this \\ is a single embedded
backslash"}.
+ Since a string is an array of characters, you can specify the string
+characters using the read syntax of characters, but without the
+leading question mark. This is useful for including in string
+constants characters that don't stand for themselves. Thus, control
+characters can be specified as escape sequences that start with a
+backslash; for example, @code{"foo\r"} yields @samp{foo} followed by
+the carriage return character. @xref{Basic Char Syntax}, for escape
+sequences of other control characters. Similarly, you can use the
+special read syntax for control characters (@pxref{Ctl-Char Syntax}),
+as in @code{"foo\^Ibar"}, which produces a tab character embedded
+within a string. You can also use the escape sequences for non-ASCII
+characters described in @ref{General Escape Syntax}, as in
+@w{@code{"\N@{LATIN SMALL LETTER A WITH GRAVE@}"}} and @code{"\u00e0"}
+(however, see a caveat with non-ASCII characters in @ref{Non-ASCII in
+Strings}).
+
@cindex newline in strings
The newline character is not special in the read syntax for strings;
if you write a new line between the double-quotes, it becomes a
@@ -1182,8 +1206,9 @@ but it does terminate any preceding hex escape.
as in character literals (but do not use the question mark that begins a
character constant). For example, you can write a string containing the
nonprinting characters tab and @kbd{C-a}, with commas and spaces between
-them, like this: @code{"\t, \C-a"}. @xref{Character Type}, for a
-description of the read syntax for characters.
+them, like this: @code{"\t, \C-a"}. @xref{Character Type}, and its
+subsections for a description of the various kinds of read syntax for
+characters.
However, not all of the characters you can write with backslash
escape-sequences are valid in strings. The only control characters that
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 5711ba9016a..a5ff1005e6b 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2759,6 +2759,35 @@ way to specify the programs to run is with @samp{-l
@var{file}}, which
loads the library named @var{file}, or @samp{-f @var{function}}, which
calls @var{function} with no arguments, or @samp{--eval=@var{form}}.
+@defvar noninteractive
+This variable is non-@code{nil} when Emacs is running in batch mode.
+@end defvar
+
+ If the specified Lisp program signals an unhandled error in batch
+mode, Emacs exits with a non-zero exit status after invoking the Lisp
+debugger which shows the Lisp backtrace (@pxref{Invoking the
+Debugger}) on the standard error stream:
+
+@example
+$ emacs -Q --batch --eval '(error "foo")'; echo $?
+
+@group
+Error: error ("foo")
+mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0x4f85c5
+7c45e2f81>))
+debug-early-backtrace()
+debug-early(error (error "foo"))
+signal(error ("foo"))
+error("foo")
+eval((error "foo") t)
+command-line-1(("--eval" "(error \"foo\")"))
+command-line()
+normal-top-level()
+@end group
+foo
+255
+@end example
+
Any Lisp program output that would normally go to the echo area,
either using @code{message}, or using @code{prin1}, etc., with
@code{t} as the stream (@pxref{Output Streams}), goes instead to
@@ -2776,6 +2805,7 @@ if it is non-@code{nil}; this can be overridden by binding
@code{coding-system-for-write} to a coding system of you choice
(@pxref{Explicit Encoding}).
+@vindex gc-cons-percentage@r{, in batch mode}
In batch mode, Emacs will enlarge the value of the
@code{gc-cons-percentage} variable from the default of @samp{0.1} up to
@samp{1.0}. Batch jobs that are supposed to run for a long time
@@ -2783,19 +2813,6 @@ should adjust the limit back down again, because this
means that less
garbage collection will be performed by default (and more memory
consumed).
-@defvar noninteractive
-This variable is non-@code{nil} when Emacs is running in batch mode.
-@end defvar
-
-If Emacs exits due to signaling an error in batch mode, the exit
-status of the Emacs command is non-zero:
-
-@example
-$ emacs -Q --batch --eval '(error "foo")'; echo $?
-foo
-255
-@end example
-
@node Session Management
@section Session Management
@cindex session manager
diff --git a/doc/misc/org.org b/doc/misc/org.org
index 9721807a185..6ca14c851b0 100644
--- a/doc/misc/org.org
+++ b/doc/misc/org.org
@@ -20266,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}
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index dfc34a4eaca..ebecf50d26b 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -2017,6 +2017,16 @@ modern X servers have so many other ways to send input
to clients
without signifying that the event is synthesized that it does not
matter.
+*** Programs which use XSendEvent cannot send input events to Emacs.
+
+Emacs built to use the X Input Extension cannot receive core input
+events sent through the SendEvent server request, since these events
+intercepted by the X server when sent to input extension clients.
+
+For such programs to function again, Emacs must be run on an X server
+where the input extension is disabled, or alternatively be configured
+with the "--without-xinput2" option.
+
* Runtime problems on character terminals
** The meta key does not work on xterm.
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index 240e3366b0b..4b73a544e80 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
% Reference Card for Org Mode
-\def\orgversionnumber{9.6.10}
+\def\orgversionnumber{9.6.11}
\def\versionyear{2023} % latest update
\input emacsver.tex
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 418ee265e69..fab77669595 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1042,6 +1042,14 @@ or backward in the buffer. This is in contrast with
\\[forward-word]
and \\[backward-word], which see.
Value is normally t.
+
+The word boundaries are normally determined by the buffer's syntax
+table and character script (according to `char-script-table'), but
+`find-word-boundary-function-table', such as set up by `subword-mode',
+can change that. If a Lisp program needs to move by words determined
+strictly by the syntax table, it should use `forward-word-strictly'
+instead. See Info node `(elisp) Word Motion' for details.
+
If an edge of the buffer or a field boundary is reached, point is left there
and the function returns nil. Field boundaries are not noticed
if `inhibit-field-text-motion' is non-nil."
@@ -1058,6 +1066,14 @@ or forward in the buffer. This is in contrast with
\\[backward-word]
and \\[forward-word], which see.
Value is normally t.
+
+The word boundaries are normally determined by the buffer's syntax
+table and character script (according to `char-script-table'), but
+`find-word-boundary-function-table', such as set up by `subword-mode',
+can change that. If a Lisp program needs to move by words determined
+strictly by the syntax table, it should use `forward-word-strictly'
+instead. See Info node `(elisp) Word Motion' for details.
+
If an edge of the buffer or a field boundary is reached, point is left there
and the function returns nil. Field boundaries are not noticed
if `inhibit-field-text-motion' is non-nil."
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 093ea0e22b6..c27bae8439e 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -5277,7 +5277,12 @@ changes you have made in the order of the categories.
;; Point is on done items separator.
(save-excursion (beginning-of-line) (looking-at todo-category-done))
;; Buffer is widened.
- (looking-at (regexp-quote todo-category-beg)))
+ (looking-at (regexp-quote todo-category-beg))
+ ;; Moving an item to a todo file (with `C-u m') that had
+ ;; not yet been read into a buffer puts point at the
+ ;; beginning of the file, from where it is impossible to
+ ;; reach todo-item-start by the loop below (bug#66994).
+ (= (point) 1))
(goto-char (line-beginning-position))
(while (not (looking-at todo-item-start))
(forward-line -1))
diff --git a/lisp/dired.el b/lisp/dired.el
index c710e06722f..8919d2c223f 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -122,7 +122,9 @@ If nil, don't pass \"--dired\" to \"ls\".
The special value of `unspecified' means to check whether \"ls\"
supports the \"--dired\" option, and save the result in this
variable. This is performed the first time `dired-insert-directory'
-is invoked.
+is invoked. (If `ls-lisp' is used by default, the test is performed
+only if `ls-lisp-use-insert-directory-program' is non-nil, i.e., if
+Dired actually uses \"ls\".)
Note that if you set this option to nil, either through choice or
because your \"ls\" program does not support \"--dired\", Dired
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index dc23b071f0d..5411088189d 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -158,6 +158,13 @@ where CAUSE can be:
;;;###autoload
(defun debug (&rest args)
"Enter debugger. \\<debugger-mode-map>`\\[debugger-continue]' returns from
the debugger.
+
+In interactive sessions, this switches to a backtrace buffer and shows
+the Lisp backtrace of function calls there. In batch mode (more accurately,
+when `noninteractive' is non-nil), it shows the Lisp backtrace on the
+standard error stream (unless `backtrace-on-error-noninteractive' is nil),
+and then kills Emacs, causing it to exit with a negative exit code.
+
Arguments are mainly for use when this is called from the internals
of the evaluator.
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el
index e69ce4f1d12..2df3396ee72 100644
--- a/lisp/org/ob-core.el
+++ b/lisp/org/ob-core.el
@@ -1932,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)
@@ -2358,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
diff --git a/lisp/org/ob-shell.el b/lisp/org/ob-shell.el
index 2c30a26056b..87e38e414ce 100644
--- a/lisp/org/ob-shell.el
+++ b/lisp/org/ob-shell.el
@@ -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)
diff --git a/lisp/org/ol-info.el b/lisp/org/ol-info.el
index ad9e4a12bd7..350ccf5cc57 100644
--- a/lisp/org/ol-info.el
+++ b/lisp/org/ol-info.el
@@ -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/.>")
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 38e81d9d713..670116304e6 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -6321,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
@@ -6662,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
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index cfef38581c6..e5b0fbcf2a9 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -5,13 +5,13 @@
(defun org-release ()
"The release version of Org.
Inserted by installing Org mode or when a release is made."
- (let ((org-release "9.6.10"))
+ (let ((org-release "9.6.11"))
org-release))
;;;###autoload
(defun org-git-version ()
"The Git version of Org mode.
Inserted by installing Org or when a release is made."
- (let ((org-git-version "release_9.6.10"))
+ (let ((org-git-version "release_9.6.11"))
org-git-version))
(provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 49f62d0f43b..34c572a3f57 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -9,7 +9,7 @@
;; URL: https://orgmode.org
;; Package-Requires: ((emacs "26.1"))
-;; Version: 9.6.10
+;; Version: 9.6.11
;; This file is part of GNU Emacs.
;;
diff --git a/lisp/org/ox.el b/lisp/org/ox.el
index 94cc5a22881..e9cc0ed8fc7 100644
--- a/lisp/org/ox.el
+++ b/lisp/org/ox.el
@@ -264,13 +264,17 @@ See `org-export-inline-image-p' for more information about
rules.")
(defconst org-export-ignored-local-variables
- '( org-font-lock-keywords org-element--cache-change-tic
- org-element--cache-change-tic org-element--cache-size
- org-element--headline-cache-size
- org-element--cache-sync-keys-value
- org-element--cache-change-warning org-element--headline-cache
- org-element--cache org-element--cache-sync-keys
- org-element--cache-sync-requests org-element--cache-sync-timer)
+ '( org-font-lock-keywords
+ org-element--cache org-element--cache-size
+ org-element--headline-cache org-element--headline-cache-size
+ org-element--cache-hash-left org-element--cache-hash-right
+ org-element--cache-sync-requests org-element--cache-sync-timer
+ org-element--cache-sync-keys-value org-element--cache-change-tic
+ org-element--cache-last-buffer-size
+ org-element--cache-diagnostics-ring
+ org-element--cache-diagnostics-ring-size
+ org-element--cache-gapless
+ org-element--cache-change-warning)
"List of variables not copied through upon buffer duplication.
Export process takes place on a copy of the original buffer.
When this copy is created, all Org related local variables not in
@@ -6691,6 +6695,11 @@ or FILE."
',ext-plist)))
(with-temp-buffer
(insert output)
+ ;; Ensure final newline. This is what was done
+ ;; historically, when we used `write-file'.
+ ;; Note that adding a newline is only safe for
+ ;; non-binary data.
+ (unless (bolp) (insert "\n"))
(let ((coding-system-for-write ',encoding))
(write-region (point-min) (point-max) ,file)))
(or (ignore-errors (funcall ',post-process ,file)) ,file)))
@@ -6698,6 +6707,11 @@ or FILE."
backend subtreep visible-only body-only ext-plist)))
(with-temp-buffer
(insert output)
+ ;; Ensure final newline. This is what was done
+ ;; historically, when we used `write-file'.
+ ;; Note that adding a newline is only safe for
+ ;; non-binary data.
+ (unless (bolp) (insert "\n"))
(let ((coding-system-for-write encoding))
(write-region (point-min) (point-max) file)))
(when (and (org-export--copy-to-kill-ring-p) (org-string-nw-p
output))
diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el
index 53d471c381a..8fcdcaddc7b 100644
--- a/lisp/progmodes/cmake-ts-mode.el
+++ b/lisp/progmodes/cmake-ts-mode.el
@@ -63,7 +63,15 @@
((parent-is "foreach_loop") parent-bol cmake-ts-mode-indent-offset)
((parent-is "function_def") parent-bol cmake-ts-mode-indent-offset)
((parent-is "if_condition") parent-bol cmake-ts-mode-indent-offset)
- ((parent-is "normal_command") parent-bol cmake-ts-mode-indent-offset)))
+ ((parent-is "normal_command") parent-bol cmake-ts-mode-indent-offset)
+ ;;; Release v0.4.0 wraps arguments in an argument_list node.
+ ,@(ignore-errors
+ (treesit-query-capture 'cmake '((argument_list) @capture))
+ `(((parent-is "argument_list") grand-parent
cmake-ts-mode-indent-offset)))
+ ;;; Release v0.3.0 wraps the body of commands into a body node.
+ ,@(ignore-errors
+ (treesit-query-capture 'cmake '((body) @capture))
+ `(((parent-is "body") grand-parent cmake-ts-mode-indent-offset)))))
"Tree-sitter indent rules for `cmake-ts-mode'.")
(defvar cmake-ts-mode--constants
@@ -89,8 +97,8 @@
"CMake if conditions for tree-sitter font-locking.")
(defun cmake-ts-mode--font-lock-compatibility-fe9b5e0 ()
- "Indent rules helper, to handle different releases of tree-sitter-cmake.
-Check if a node type is available, then return the right indent rules."
+ "Font lock helper, to handle different releases of tree-sitter-cmake.
+Check if a node type is available, then return the right font lock rules."
;; handle commit fe9b5e0
(condition-case nil
(progn (treesit-query-capture 'cmake '((argument_list) @capture))
diff --git a/lisp/subr.el b/lisp/subr.el
index d4173b4daba..dec935c3152 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -460,6 +460,10 @@ Also see `ignore'."
Errors cause entry to the debugger when `debug-on-error' is non-nil.
This can be overridden by `debug-ignored-errors'.
+When `noninteractive' is non-nil (in particular, in batch mode), an
+unhandled error calls `kill-emacs', which terminates the Emacs
+session with a non-zero exit code.
+
To signal with MESSAGE without interpreting format characters
like `%', `\\=`' and `\\='', use (error \"%s\" MESSAGE).
In Emacs, the convention is that error messages start with a capital
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 45c5f313a8e..5ee00637ca6 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -1565,7 +1565,7 @@ MATCHER:
NODE's index in PARENT. Therefore, to match the first child
where PARENT is \"argument_list\", use
- (match nil \"argument_list\" nil nil 0 0).
+ (match nil \"argument_list\" nil 0 0).
NODE-TYPE, PARENT-TYPE, and NODE-FIELD are regexps.
NODE-TYPE can also be `null', which matches when NODE is nil.
diff --git a/src/eval.c b/src/eval.c
index d66bcdae6ce..12e811ce264 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1678,6 +1678,10 @@ DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0,
doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA.
This function does not return.
+When `noninteractive' is non-nil (in particular, in batch mode), an
+unhandled error calls `kill-emacs', which terminates the Emacs
+session with a non-zero exit code.
+
An error symbol is a symbol with an `error-conditions' property
that is a list of condition names. The symbol should be non-nil.
A handler for any of those names will get to handle this signal.