Merge from origin/emacs-29
648a5e33e8
Update to Org 9.6.8-3-g21171d458442fe78
Escape percent character in treesit--inspect-name (bug#65...bc0426ce8e
Don't add an extraneous slash in remote PATH list in Eshell34f7a47c9c
Fix Tramp on MS Windowsea5fd6c96b
* Fix native disassemble on Windows platforms (bug#65455)91d2d8439b
* Handle missing eln file when trying to disassble (bug#6...e7ac50a153
* lisp/emacs-lisp/comp.el (comp--native-compile): Fix OUT...45cf3a0ced
Update to Transient v0.4.331d3808fb9
Adapt Eshell manual0c50af054f
Fix applying patches with Git on MS-Windows # Conflicts: # doc/misc/transient.texi # test/lisp/eshell/esh-util-tests.el
This commit is contained in:
commit
ec3ea8c036
15 changed files with 96 additions and 72 deletions
|
@ -334,7 +334,8 @@ As with other shells, you can escape special characters and spaces by
|
|||
prefixing the character with a backslash (@samp{\}), or by surrounding
|
||||
the string with apostrophes (@samp{''}) or double quotes (@samp{""}).
|
||||
This is needed especially for file names with special characters like
|
||||
pipe (@samp{|}), which could be part of remote file names.
|
||||
pipe (@samp{|}) or square brackets (@samp{[} or @samp{]}), which could
|
||||
be part of remote file names.
|
||||
|
||||
When you escape a character with @samp{\} outside of any quotes, the
|
||||
result is the literal character immediately following it. For
|
||||
|
|
|
@ -290,18 +290,6 @@ cannot be interrupted with prefix commands.)
|
|||
@node Usage
|
||||
@chapter Usage
|
||||
|
||||
@menu
|
||||
* Invoking Transients::
|
||||
* Aborting and Resuming Transients::
|
||||
* Common Suffix Commands::
|
||||
* Saving Values::
|
||||
* Using History::
|
||||
* Getting Help for Suffix Commands::
|
||||
* Enabling and Disabling Suffixes::
|
||||
* Other Commands::
|
||||
* Configuration::
|
||||
@end menu
|
||||
|
||||
@node Invoking Transients
|
||||
@section Invoking Transients
|
||||
|
||||
|
@ -1014,14 +1002,6 @@ signal an error.
|
|||
@node Defining New Commands
|
||||
@chapter Defining New Commands
|
||||
|
||||
@menu
|
||||
* Defining Transients::
|
||||
* Binding Suffix and Infix Commands::
|
||||
* Defining Suffix and Infix Commands::
|
||||
* Using Infix Arguments::
|
||||
* Transient State::
|
||||
@end menu
|
||||
|
||||
@node Defining Transients
|
||||
@section Defining Transients
|
||||
|
||||
|
@ -2251,11 +2231,6 @@ available depending on user preference.
|
|||
@node Related Abstractions and Packages
|
||||
@chapter Related Abstractions and Packages
|
||||
|
||||
@menu
|
||||
* Comparison With Prefix Keys and Prefix Arguments::
|
||||
* Comparison With Other Packages::
|
||||
@end menu
|
||||
|
||||
@node Comparison With Prefix Keys and Prefix Arguments
|
||||
@section Comparison With Prefix Keys and Prefix Arguments
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
% Reference Card for Org Mode
|
||||
\def\orgversionnumber{9.6.7}
|
||||
\def\orgversionnumber{9.6.8}
|
||||
\def\versionyear{2023} % latest update
|
||||
\input emacsver.tex
|
||||
|
||||
|
|
|
@ -4177,7 +4177,8 @@ the deferred compilation mechanism."
|
|||
(symbols-with-pos-enabled t)
|
||||
;; Have byte compiler signal an error when compilation fails.
|
||||
(byte-compile-debug t)
|
||||
(comp-ctxt (make-comp-ctxt :output output
|
||||
(comp-ctxt (make-comp-ctxt :output (when output
|
||||
(expand-file-name output))
|
||||
:with-late-load with-late-load)))
|
||||
(comp-log "\n\n" 1)
|
||||
(unwind-protect
|
||||
|
|
|
@ -92,17 +92,16 @@ redefine OBJECT if it is a symbol."
|
|||
(subr-native-elisp-p obj))
|
||||
(progn
|
||||
(require 'comp)
|
||||
(call-process "objdump" nil (current-buffer) t "-S"
|
||||
(native-comp-unit-file (subr-native-comp-unit obj)))
|
||||
(let ((eln (native-comp-unit-file (subr-native-comp-unit obj))))
|
||||
(if (file-exists-p eln)
|
||||
(call-process "objdump" nil (current-buffer) t "-S" eln)
|
||||
(error "Missing eln file for #<subr %s>" name)))
|
||||
(goto-char (point-min))
|
||||
(re-search-forward (concat "^.*"
|
||||
(re-search-forward (concat "^.*<_?"
|
||||
(regexp-quote
|
||||
(concat "<"
|
||||
(when (eq system-type 'darwin)
|
||||
"_")
|
||||
(comp-c-func-name
|
||||
(subr-name obj) "F" t)
|
||||
">:"))))
|
||||
(comp-c-func-name
|
||||
(subr-name obj) "F" t))
|
||||
">:"))
|
||||
(beginning-of-line)
|
||||
(delete-region (point-min) (point))
|
||||
(when (re-search-forward "^.*<.*>:" nil t 2)
|
||||
|
|
|
@ -361,7 +361,7 @@ as the $PATH was actually specified."
|
|||
(eshell-under-windows-p))
|
||||
(push "." path))
|
||||
(if (and remote (not literal-p))
|
||||
(mapcar (lambda (x) (file-name-concat remote x)) path)
|
||||
(mapcar (lambda (x) (concat remote x)) path)
|
||||
path))))
|
||||
|
||||
(defun eshell-set-path (path)
|
||||
|
|
|
@ -2831,7 +2831,8 @@ the result will be a local, non-Tramp, file name."
|
|||
(with-parsed-tramp-file-name name nil
|
||||
;; If connection is not established yet, run the real handler.
|
||||
(if (not (tramp-connectable-p v))
|
||||
(tramp-run-real-handler #'expand-file-name (list name))
|
||||
(tramp-drop-volume-letter
|
||||
(tramp-run-real-handler #'expand-file-name (list name)))
|
||||
(unless (tramp-run-real-handler #'file-name-absolute-p (list localname))
|
||||
(setq localname (concat "~/" localname)))
|
||||
;; Tilde expansion if necessary. This needs a shell which
|
||||
|
|
|
@ -162,7 +162,7 @@ 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
|
||||
((or 'author 'editors)
|
||||
((or 'author 'editor)
|
||||
;; Author and editors are arrays of
|
||||
;; objects, each of them designing a
|
||||
;; person. These objects may contain
|
||||
|
|
|
@ -6705,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
|
||||
|
@ -7859,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)
|
||||
|
|
|
@ -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.7"))
|
||||
(let ((org-release "9.6.8"))
|
||||
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.7-13-g99cc96"))
|
||||
(let ((org-git-version "release_9.6.8-3-g21171d"))
|
||||
org-git-version))
|
||||
|
||||
(provide 'org-version)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
;; URL: https://orgmode.org
|
||||
;; Package-Requires: ((emacs "26.1"))
|
||||
|
||||
;; Version: 9.6.7
|
||||
;; Version: 9.6.8
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -6322,7 +6322,10 @@ unconditionally."
|
|||
(if (not level) (outline-next-heading) ;before first headline
|
||||
(org-back-to-heading invisible-ok)
|
||||
(when (equal arg '(16)) (org-up-heading-safe))
|
||||
(org-end-of-subtree)))
|
||||
(org-end-of-subtree invisible-ok 'to-heading)))
|
||||
;; At `point-max', if the file does not have ending newline,
|
||||
;; create one, so that we are not appending stars at non-empty
|
||||
;; line.
|
||||
(unless (bolp) (insert "\n"))
|
||||
(when (and blank? (save-excursion
|
||||
(backward-char)
|
||||
|
@ -6334,7 +6337,9 @@ unconditionally."
|
|||
(backward-char))
|
||||
(unless (and blank? (org-previous-line-empty-p))
|
||||
(org-N-empty-lines-before-current (if blank? 1 0)))
|
||||
(insert stars " ")
|
||||
(insert stars " " "\n")
|
||||
;; Move point after stars.
|
||||
(backward-char)
|
||||
;; When INVISIBLE-OK is non-nil, ensure newly created headline
|
||||
;; is visible.
|
||||
(unless invisible-ok
|
||||
|
@ -14753,12 +14758,12 @@ is considered `day' (i.e. only `bracket', `day', and `after' return
|
|||
values are possible).
|
||||
|
||||
When matching, the match groups are the following:
|
||||
group 1: year, if any
|
||||
group 2: month, if any
|
||||
group 3: day number, if any
|
||||
group 4: day name, if any
|
||||
group 5: hours, if any
|
||||
group 6: minutes, if any"
|
||||
group 2: year, if any
|
||||
group 3: month, if any
|
||||
group 4: day number, if any
|
||||
group 5: day name, if any
|
||||
group 7: hours, if any
|
||||
group 8: minutes, if any"
|
||||
(let* ((regexp
|
||||
(if extended
|
||||
(if (eq extended 'agenda)
|
||||
|
@ -17662,6 +17667,8 @@ If INDENT is non-nil, call `newline-and-indent' with ARG to
|
|||
indent unconditionally; otherwise, call `newline' with ARG and
|
||||
INTERACTIVE, which can trigger indentation if
|
||||
`electric-indent-mode' is enabled."
|
||||
(when interactive
|
||||
(org-fold-check-before-invisible-edit 'insert))
|
||||
(if indent
|
||||
(org-newline-and-indent arg)
|
||||
(newline arg interactive)))
|
||||
|
|
|
@ -2641,7 +2641,8 @@ in `treesit-parser-list'."
|
|||
'bold nil))
|
||||
name
|
||||
(if (treesit-node-check node 'named) ")" "\""))))
|
||||
(setq treesit--inspect-name name)
|
||||
;; Escape the percent character for mode-line. (Bug#65540)
|
||||
(setq treesit--inspect-name (string-replace "%" "%%" name))
|
||||
(force-mode-line-update)
|
||||
(when arg
|
||||
(if node-list
|
||||
|
|
|
@ -1120,7 +1120,15 @@ It is based on `log-edit-mode', and has Git-specific extensions."
|
|||
(t (push file-name to-stash)))
|
||||
(setq pos (point))))))
|
||||
(unless (string-empty-p vc-git-patch-string)
|
||||
(let ((patch-file (make-nearby-temp-file "git-patch")))
|
||||
(let ((patch-file (make-nearby-temp-file "git-patch"))
|
||||
;; Temporarily countermand the let-binding at the
|
||||
;; beginning of this function.
|
||||
(coding-system-for-write
|
||||
(coding-system-change-eol-conversion
|
||||
;; On DOS/Windows, it is important for the patch file
|
||||
;; to have the Unix EOL format, because Git expects
|
||||
;; that, even on Windows.
|
||||
(or pcsw vc-git-commits-coding-system) 'unix)))
|
||||
(with-temp-file patch-file
|
||||
(insert vc-git-patch-string))
|
||||
(unwind-protect
|
||||
|
|
|
@ -1883,7 +1883,9 @@ in the output buffer."
|
|||
(vc-run-delayed (vc-diff-finish (current-buffer) nil))))
|
||||
|
||||
(defun vc-diff-internal (async vc-fileset rev1 rev2 &optional verbose buffer)
|
||||
"Report diffs between two revisions of a fileset.
|
||||
"Report diffs between revisions REV1 and REV2 of a fileset in VC-FILESET.
|
||||
ASYNC non-nil means run the backend's commands asynchronously if possible.
|
||||
VC-FILESET should have the format described in `vc-deduce-fileset'.
|
||||
Output goes to the buffer BUFFER, which defaults to *vc-diff*.
|
||||
BUFFER, if non-nil, should be a buffer or a buffer name.
|
||||
Return t if the buffer had changes, nil otherwise."
|
||||
|
@ -1899,15 +1901,26 @@ Return t if the buffer had changes, nil otherwise."
|
|||
;; but the only way to set it for each file included would
|
||||
;; be to call the back end separately for each file.
|
||||
(coding-system-for-read
|
||||
(if files (vc-coding-system-for-diff (car files)) 'undecided))
|
||||
;; Force the EOL conversion to be -unix, in case the files
|
||||
;; to be compared have DOS EOLs. In that case, EOL
|
||||
;; conversion will produce a patch file that will either
|
||||
;; fail to apply, or will change the EOL format of some of
|
||||
;; the lines in the patched file.
|
||||
(coding-system-change-eol-conversion
|
||||
(if files (vc-coding-system-for-diff (car files)) 'undecided)
|
||||
'unix))
|
||||
(orig-diff-buffer-clone
|
||||
(if revert-buffer-in-progress-p
|
||||
(clone-buffer
|
||||
(generate-new-buffer-name " *vc-diff-clone*") nil))))
|
||||
;; On MS-Windows and MS-DOS, Diff is likely to produce DOS-style
|
||||
;; EOLs, which will look ugly if (car files) happens to have Unix
|
||||
;; EOLs.
|
||||
(if (memq system-type '(windows-nt ms-dos))
|
||||
;; EOLs. But for Git, we must force Unix EOLs in the diffs, since
|
||||
;; Git always produces Unix EOLs in the parts that didn't come
|
||||
;; from the file, and wants to see any CR characters when applying
|
||||
;; patches.
|
||||
(if (and (memq system-type '(windows-nt ms-dos))
|
||||
(not (eq (car vc-fileset) 'Git)))
|
||||
(setq coding-system-for-read
|
||||
(coding-system-change-eol-conversion coding-system-for-read
|
||||
'dos)))
|
||||
|
|
|
@ -19,9 +19,15 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'tramp)
|
||||
(require 'ert)
|
||||
(require 'esh-util)
|
||||
|
||||
(require 'eshell-tests-helpers
|
||||
(expand-file-name "eshell-tests-helpers"
|
||||
(file-name-directory (or load-file-name
|
||||
default-directory))))
|
||||
|
||||
;;; Tests:
|
||||
|
||||
(ert-deftest esh-util-test/eshell-stringify/string ()
|
||||
|
@ -156,4 +162,28 @@
|
|||
(ert-deftest esh-util-test/eshell-printable-size/human-readable-arg ()
|
||||
(should-error (eshell-printable-size 0 999 nil t)))
|
||||
|
||||
(ert-deftest esh-util-test/path/get ()
|
||||
"Test that getting the Eshell path returns the expected results."
|
||||
(let ((expected-path (butlast (exec-path))))
|
||||
(should (equal (eshell-get-path)
|
||||
(if (eshell-under-windows-p)
|
||||
(cons "." expected-path)
|
||||
expected-path)))
|
||||
(should (equal (eshell-get-path 'literal)
|
||||
expected-path))))
|
||||
|
||||
(ert-deftest esh-util-test/path/get-remote ()
|
||||
"Test that getting the remote Eshell path returns the expected results."
|
||||
(let* ((default-directory ert-remote-temporary-file-directory)
|
||||
(expected-path (butlast (exec-path))))
|
||||
;; Make sure we don't have a doubled directory separator.
|
||||
(should (seq-every-p (lambda (i) (not (string-match-p "//" i)))
|
||||
(eshell-get-path)))
|
||||
(should (equal (eshell-get-path)
|
||||
(mapcar (lambda (i)
|
||||
(concat (file-remote-p default-directory) i))
|
||||
expected-path)))
|
||||
(should (equal (eshell-get-path 'literal)
|
||||
expected-path))))
|
||||
|
||||
;;; esh-util-tests.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue