[nongnu] elpa/helm af5e9113c2 2/3: Colorize dependencies in packages installed source
branch: elpa/helm commit af5e9113c2970995587a610f9f05a1169906eaa3 Author: Thierry Volpiatto Commit: Thierry Volpiatto Colorize dependencies in packages installed source --- helm-packages.el | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/helm-packages.el b/helm-packages.el index d55bb783b1..d4ca8cdc69 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -96,11 +96,20 @@ as dependencies." for version = (and id (mapconcat #'number-to-string (package-desc-version id) ".")) for description = (and id (package-desc-summary id)) for disp = (format "%s%s%s%s%s%s%s%s%s" - (propertize c 'face 'font-lock-keyword-face 'match-part c) + (propertize + c + 'face (if (equal status "dependency") + font-lock-type-face + 'font-lock-keyword-face) + 'match-part c) (make-string (1+ (- (helm-in-buffer-get-longest-candidate) (length c))) ? ) - (or status "") + (propertize + (or status "") + 'face (if (equal status "dependency") + 'bold-italic + 'default)) (make-string (1+ (- 10 (length status))) ? ) (or provider "") (make-string (1+ (- 10 (length provider))) ? )
[nongnu] elpa/helm b8e9509490 3/3: Ask for confirmation before running actions on packages
branch: elpa/helm commit b8e9509490e17cc0f23d267f7c5385868d59daee Author: Thierry Volpiatto Commit: Thierry Volpiatto Ask for confirmation before running actions on packages --- helm-packages.el | 36 ++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/helm-packages.el b/helm-packages.el index d4ca8cdc69..9abccc0194 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -28,7 +28,11 @@ (defun helm-packages-upgrade (_candidate) "Helm action for upgrading marked packages." (let ((mkd (helm-marked-candidates))) -(mapc #'package-upgrade mkd))) +(with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar #'symbol-name mkd) + (when (y-or-n-p (format "Upgrade %s packages? " (length mkd))) +(mapc #'package-upgrade mkd) (defun helm-packages-describe (candidate) "Helm action for describing package CANDIDATE." @@ -49,7 +53,11 @@ (defun helm-packages-package-reinstall (_candidate) "Helm action for reinstalling marked packages." (let ((mkd (helm-marked-candidates))) -(mapc #'package-reinstall mkd))) +(with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar #'symbol-name mkd) + (when (y-or-n-p (format "Reinstall %s packages? " (length mkd))) +(mapc #'package-reinstall mkd) (defun helm-packages-delete-1 (packages &optional force) "Run `package-delete' on PACKAGES. @@ -63,24 +71,40 @@ If FORCE is non nil force deleting packages." Unlike `helm-packages-delete' this will refuse to delete packages when they are needed by others packages as dependencies." (let ((mkd (helm-marked-candidates))) -(helm-packages-delete-1 mkd))) +(with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar #'symbol-name mkd) + (when (y-or-n-p (format "Uninstall %s packages? " (length mkd))) +(helm-packages-delete-1 mkd) (defun helm-packages-delete (_candidate) "Helm action for deleting marked packages. Unlike `helm-packages-uninstall' this delete packages even when they are needed as dependencies." (let ((mkd (helm-marked-candidates))) -(helm-packages-delete-1 mkd 'force))) +(with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar #'symbol-name mkd) + (when (y-or-n-p (format "Delete %s packages? " (length mkd))) +(helm-packages-delete-1 mkd 'force) (defun helm-packages-recompile (_candidate) "Helm action for recompiling marked packages." (let ((mkd (helm-marked-candidates))) -(mapc #'package-recompile mkd))) +(with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar #'symbol-name mkd) + (when (y-or-n-p (format "Recompile %s packages? " (length mkd))) +(mapc #'package-recompile mkd) (defun helm-packages-install (_candidate) "Helm action for installing marked packages." (let ((mkd (helm-marked-candidates))) -(mapc #'package-install mkd))) +(with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar #'symbol-name mkd) + (when (y-or-n-p (format "Install %s packages? " (length mkd))) +(mapc #'package-install mkd) ;;; Transformer ;;
[nongnu] elpa/helm e9d15c17ab 1/3: comment only
branch: elpa/helm commit e9d15c17ab27c59b07f8c6ef2541ae8d34280022 Author: Thierry Volpiatto Commit: Thierry Volpiatto comment only --- helm-packages.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helm-packages.el b/helm-packages.el index 777e44d558..d55bb783b1 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -176,7 +176,9 @@ as dependencies." (helm-build-in-buffer-source "Available built-in packages" :data (cl-loop for p in package--builtins ;; Show only builtins that are available as - ;; well on (m)elpa. + ;; well on (m)elpa. Other builtins don't + ;; have a package-descriptor, the format is + ;; (sym . [version reqs summary]). when (package-desc-p (package-get-descriptor (car p))) collect (car p)) :coerce #'helm-symbolify
[nongnu] elpa/helm updated (7810a986c7 -> b8e9509490)
elpasync pushed a change to branch elpa/helm. from 7810a986c7 Filter out vc packages from "Others" and fix helm-packages buffer name new e9d15c17ab comment only new af5e9113c2 Colorize dependencies in packages installed source new b8e9509490 Ask for confirmation before running actions on packages Summary of changes: helm-packages.el | 53 - 1 file changed, 44 insertions(+), 9 deletions(-)
[nongnu] elpa/helm-core updated (7810a986c7 -> b8e9509490)
elpasync pushed a change to branch elpa/helm-core. from 7810a986c7 Filter out vc packages from "Others" and fix helm-packages buffer name adds e9d15c17ab comment only adds af5e9113c2 Colorize dependencies in packages installed source adds b8e9509490 Ask for confirmation before running actions on packages No new revisions were added by this update. Summary of changes: helm-packages.el | 53 - 1 file changed, 44 insertions(+), 9 deletions(-)
[nongnu] elpa/moe-theme 51795cd85e: fix: more idomatic way to get second element of list
branch: elpa/moe-theme commit 51795cd85ea5f01f3b2a82476914419a5bd89a55 Author: Aaron Gonzales Commit: クエン酸 fix: more idomatic way to get second element of list `second` does not seem to availble any longer in emacs-29.1 and I am not using `cl`. --- moe-theme-switcher.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moe-theme-switcher.el b/moe-theme-switcher.el index 437ca85949..c81d0c09b1 100644 --- a/moe-theme-switcher.el +++ b/moe-theme-switcher.el @@ -122,12 +122,12 @@ Take Keelung, Taiwan(25N,121E) for example, you can set like this: (> (car now) (car 24h/sunrise)) (and (= (car now) (car 24h/sunrise)) -(>= (second now) (second 24h/sunrise +(>= (cadr now) (cadr 24h/sunrise (or (< (car now) (car 24h/sunset)) (and (= (car now) (car 24h/sunset)) -(< (second now) (second 24h/sunset) +(< (cadr now) (cadr 24h/sunset) (moe-load-theme 'light) (moe-load-theme 'dark) ))
[nongnu] elpa/sweeprolog 750aa2aff8 1/9: * sweeprolog.el: Require 'compat'
branch: elpa/sweeprolog commit 750aa2aff81f4a8617ea58a84b04aa3369452c57 Author: Eshel Yaron Commit: Eshel Yaron * sweeprolog.el: Require 'compat' Add a dependency on the GNU ELPA compatibility package Compat. --- sweeprolog.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sweeprolog.el b/sweeprolog.el index 5754f90759..5e2699ccc5 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -7,7 +7,7 @@ ;; Keywords: prolog languages extensions ;; URL: https://git.sr.ht/~eshel/sweep ;; Package-Version: 0.22.2 -;; Package-Requires: ((emacs "28.1")) +;; Package-Requires: ((emacs "27.1") (compat "29.1.4.2")) ;; This file is NOT part of GNU Emacs. @@ -27,6 +27,7 @@ ;;; Code: +(require 'compat) (require 'comint) (require 'xref) (require 'autoinsert)
[nongnu] elpa/sweeprolog be195d894f 9/9: Announce Compat dependency and bump version to 0.23.0
branch: elpa/sweeprolog commit be195d894fa078d262d663ffdc8fdbf1a64ddee7 Author: Eshel Yaron Commit: Eshel Yaron Announce Compat dependency and bump version to 0.23.0 * NEWS.org (Version 0.23.0 on 2023-08-18): New entry. * README.org (Installation): Reword. * sweeprolog.el: Bump minor version. --- NEWS.org | 10 ++ README.org| 38 +- sweeprolog.el | 2 +- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/NEWS.org b/NEWS.org index 55f2133060..99500c2c15 100644 --- a/NEWS.org +++ b/NEWS.org @@ -11,6 +11,16 @@ SWI-Prolog in Emacs. For further details, please consult the manual: [[https://eshelyaron.com/sweep.html][https://eshelyaron.com/sweep.html]]. +* Version 0.23.0 on 2023-08-18 + +** Sweep now requires Compat, the forward-compatibility library for Elisp + +This version introduces a dependency of Sweep on Compat, the +forward-compatibility library for Elisp available from GNU ELPA. +Compat provides implementations of newer Elisp functions and features +for older Emacs versions, and Sweep now makes use of it for improved +backward compatibility and ease of maintenance. + * Version 0.22.2 on 2023-08-14 ** Fix potential crash due to a collision between Xwidgets and XPCE diff --git a/README.org b/README.org index 09ef6b1bcd..2daaa77b93 100644 --- a/README.org +++ b/README.org @@ -116,32 +116,28 @@ won't work with other Prolog systems. :ALT_TITLE: Installation :END: -#+CINDEX: install -The dynamic Emacs module =sweep-module= is included with SWI-Prolog -versions 8.5.18 and later. For instructions on how to build and -install SWI-Prolog, see [[https://www.swi-prolog.org/build/]]. - -The =sweeprolog= Elisp package is available on NonGNU ELPA, to install -=sweeprolog= simply type =M-x package-install RET sweeprolog RET=. +#+CINDEX: requirements +Installing Sweep requires: -An alternative to installing from ELPA is to get the Elisp library -from the Sweep Git repository: +- Emacs 27 or later, and +- SWI-Prolog 8.5.18 or later. -1. Clone the Sweep repository: - #+begin_src sh - git clone https://git.sr.ht/~eshel/sweep - #+end_src +#+CINDEX: install +Sweep is available from NonGNU ELPA, to install it simply type in +Emacs ~M-x package-install RET sweeprolog RET~. - Or: +Note that in Emacs prior to version 28, you need to explicitly enable +NonGNU ELPA by adding something like the following to your Emacs +configuration: - #+begin_src sh - git clone https://github.com/SWI-Prolog/packages-sweep sweep - #+end_src +#+begin_src emacs-lisp + (with-eval-after-load 'package +(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/";))) +#+end_src -2. Add Sweep to Emacs's =load-path=: - #+begin_src emacs-lisp - (add-to-list 'load-path "/path/to/sweep") - #+end_src +#+CINDEX: update +#+CINDEX: upgrade +To upgrade Sweep to a newer version, do ~M-x package-upgrade sweeprolog RET~. * Getting Started :PROPERTIES: diff --git a/sweeprolog.el b/sweeprolog.el index 2036a03678..b3e7d32cef 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -6,7 +6,7 @@ ;; Maintainer: Eshel Yaron <~eshel/d...@lists.sr.ht> ;; Keywords: prolog languages extensions ;; URL: https://git.sr.ht/~eshel/sweep -;; Package-Version: 0.22.2 +;; Package-Version: 0.23.0 ;; Package-Requires: ((emacs "27.1") (compat "29.1.4.2")) ;; This file is NOT part of GNU Emacs.
[nongnu] elpa/sweeprolog 226db0bd13 5/9: Use 'format-prompt'.
branch: elpa/sweeprolog commit 226db0bd137f7ff591dde3b463006cdc061d30d2 Author: Eshel Yaron Commit: Eshel Yaron Use 'format-prompt'. * sweeprolog.el (sweeprolog-read-predicate) (sweeprolog-plunit-testset-skeleton) (sweeprolog-read-existing-variable) (sweeprolog-read-breakpoint): Use 'format-prompt' instead of manual prompt formatting. --- sweeprolog.el | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index 7a11bfcd25..8e20cb9c46 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -1070,10 +1070,8 @@ default." (concat (make-string (- 64 (length key)) ? ) val) (default (sweeprolog-identifier-at-point))) (completing-read - (concat (or prompt sweeprolog-read-predicate-prompt) - (when default - (concat " (default " default ")")) - ": ") + (format-prompt (or prompt sweeprolog-read-predicate-prompt) +default) col (when sweeprolog-predicate-visible-p-function (lambda (cand) @@ -4848,9 +4846,7 @@ valid Prolog atom." (let* ((fn (buffer-file-name)) (def (when fn (file-name-base fn (sweeprolog-format-string-as-atom - (read-string (concat "Test set name" - (when def (concat " (default " def ")")) - ": ") + (read-string (format-prompt "Test set name" def) nil nil def))) ":- begin_tests(" str ").\n\n" "test(" _ ") :- " (sweeprolog--hole "TestBody") ".\n\n" @@ -6322,11 +6318,9 @@ EXISTING-VARS is a list of existing variable names (strings)." "occurrences" n (completing-read - (concat - (or prompt "Rename variable") - (when default -(concat " (default " (sweeprolog--format-variable default) ")")) - ": ") + (format-prompt "Rename variable" +(when default + (sweeprolog--format-variable default))) occurrences nil t nil nil default))) (defun sweeprolog-rename-variable (&optional old new point verbose) @@ -6582,9 +6576,7 @@ prompt with \"Breakpoint: \"." (lambda (key) (alist-get key col nil nil #'string=) (string-to-number - (completing-read (concat (or prompt "Breakpoint") - (when def (concat " (default " (car def) ")")) - ": ") + (completing-read (format-prompt (or prompt "Breakpoint") def) col nil t nil nil def (defun sweeprolog-read-breakpoint-condition ()
[nongnu] elpa/sweeprolog 03cfe0c924 7/9: Use 'without-restriction'.
branch: elpa/sweeprolog commit 03cfe0c92472be4a234fd155160e5d4f7c9ea89e Author: Eshel Yaron Commit: Eshel Yaron Use 'without-restriction'. * sweeprolog.el (sweeprolog-analyze-buffer) (sweeprolog--buffer-string) (sweeprolog-export-predicate): Use 'without-restriction' instead of 'save-restriction' and 'widen'. --- sweeprolog.el | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index a28723064a..0968365411 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -3017,17 +3017,15 @@ modified." (interactive (list t)) (when (or force sweeprolog--buffer-modified) (sweeprolog-xref-buffer) -(save-restriction - (widen) - (let ((sweeprolog--analyze-point (point))) +(without-restriction + (let ((sweeprolog--analyze-point (point))) (sweeprolog-analyze-region (point-min) (point-max (setq sweeprolog--buffer-modified nil))) (defun sweeprolog--buffer-string (filename) (when-let ((buf (find-buffer-visiting filename))) (with-current-buffer buf - (save-restriction -(widen) + (without-restriction (buffer-substring-no-properties (point-min) (point-max)) @@ -4593,8 +4591,7 @@ non-exported predicates defined in the current buffer." (sweeprolog-read-exportable-predicate) (read-string "Export comment: "))) sweeprolog-mode) - (save-restriction -(widen) + (without-restriction (save-excursion (goto-char (point-min)) (unless (or (sweeprolog-at-beginning-of-top-term-p)
[nongnu] elpa/sweeprolog ed2733e721 4/9: Use 'process-lines-handling-status'.
branch: elpa/sweeprolog commit ed2733e7216466ff4f9d86029786c3480c8ed986 Author: Eshel Yaron Commit: Eshel Yaron Use 'process-lines-handling-status'. * sweeprolog.el (sweeprolog--ensure-module): Use 'process-lines-handling-status' instead of 'split-string'-based approach. --- sweeprolog.el | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index 693befcb0c..7a11bfcd25 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -745,21 +745,19 @@ pack completion candidates." sweeprolog--directory))) (unless (file-readable-p sweep-pl) (error "Missing file `sweep.pl' in `sweeprolog' directory")) - (if-let ((lines (save-match-data -(split-string - (with-output-to-string - (with-current-buffer standard-output - (call-process - (or sweeprolog-swipl-path "swipl") - nil '(t nil) nil - "-q" "-g" "write_sweep_module_location" - "-t" "halt" - sweep-pl))) - "\n" t - (mapc #'sweeprolog--load-module lines) -(error (concat "Failed to locate `sweep-module'. " - "Make sure SWI-Prolog is installed " - "and up to date")) + (let* ((success nil) + (lines (process-lines-handling-status + (or sweeprolog-swipl-path "swipl") + (lambda (status) + (setq success (= status 0))) + "-q" "-g" "write_sweep_module_location" + "-t" "halt" + sweep-pl))) +(if (and success lines) +(mapc #'sweeprolog--load-module lines) + (error (concat "Failed to locate `sweep-module'. " + "Make sure SWI-Prolog is installed " + "and up to date"))) (defun sweeprolog-ensure-initialized () (sweeprolog--ensure-module)
[nongnu] elpa/sweeprolog e8fa3f0ed5 6/9: Prefer 'pos-bol/eol' over 'line-beginning/end-position'.
branch: elpa/sweeprolog commit e8fa3f0ed5be5672bdc9f1f679158f5abbe7784f Author: Eshel Yaron Commit: Eshel Yaron Prefer 'pos-bol/eol' over 'line-beginning/end-position'. * sweeprolog.el (sweeprolog--quoted-atom-or-functor-completion-at-point): (sweeprolog-end-of-top-term) (sweeprolog-export-predicate) (sweeprolog-align-spaces) (sweeprolog-infer-indent-style) (sweeprolog-indent-line-after-infix) (sweeprolog-create-index-function): Use 'pos-bol/eol' instead of 'line-beginning/end-position'. --- sweeprolog.el | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index 8e20cb9c46..a28723064a 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -1609,7 +1609,7 @@ Used for `completion-at-point' candidates in cases such as: Used for `completion-at-point' candidates in cases such as: foo :- \\='$bar-!-baz\\='(" - (let* ((end (or (sweeprolog--end-of-quote (line-end-position)) + (let* ((end (or (sweeprolog--end-of-quote (pos-eol)) (point (sweeprolog--atom-or-functor-completion-at-point beg end))) @@ -3554,7 +3554,7 @@ The command `beginning-of-defun' calls this function in "." "/" ":" "<" "=" ">" "?" "@" "\\" "^" "~") "." (or white "\n")) - (line-beginning-position + (pos-bol (not (eobp))) (while (and (nth 8 (syntax-ppss)) (not (eobp))) (forward-char)) @@ -4625,7 +4625,7 @@ non-exported predicates defined in the current buffer." (if target-position (save-excursion (goto-char target-position) - (let ((pos (- (point-max) (line-end-position + (let ((pos (- (point-max) (pos-eol (combine-after-change-calls (if exported-operator (progn @@ -4669,7 +4669,7 @@ distanced from the beginning of the previous by a multiple of four columns, which accommodates the convetional alignment for if-then-else constructs and other common layouts in SWI-Prolog." (interactive "" sweeprolog-mode) - (let ((bol (line-beginning-position))) + (let ((bol (pos-bol))) (if (nth 4 (syntax-ppss)) (combine-after-change-calls (delete-horizontal-space) @@ -4700,7 +4700,7 @@ if-then-else constructs and other common layouts in SWI-Prolog." This function is added to ‘post-self-insert-hook’ by `sweeprolog-electric-layout-mode'." (if (nth 8 (syntax-ppss)) - (when (member (buffer-substring-no-properties (line-beginning-position) + (when (member (buffer-substring-no-properties (pos-bol) (point)) '("%%" "%!")) (insert " ")) @@ -4891,7 +4891,7 @@ accordingly." (unless offset (save-excursion (goto-char beg) - (let ((prefix (buffer-substring (line-beginning-position) + (let ((prefix (buffer-substring (pos-bol) (point (save-match-data (cond @@ -4946,7 +4946,7 @@ accordingly." (goto-char fbeg) (sweeprolog-backward-term (1- pre)) (let ((go t) - (line-beg (line-beginning-position))) + (line-beg (pos-bol))) (while go (pcase (sweeprolog-last-token-boundaries) ((or `(operator ,lbeg ,lend) @@ -4982,7 +4982,7 @@ accordingly." (= (char-syntax (char-before)) ?_))) (when (save-excursion (forward-char) -(skip-syntax-forward " " (line-end-position)) +(skip-syntax-forward " " (pos-eol)) (eolp)) (skip-syntax-backward "w_"))) (current-column)) @@ -5078,7 +5078,7 @@ accordingly." (line (cdr entry))) (goto-char (point-min)) (forward-line (1- line)) - (cons car (line-beginning-position + (cons car (pos-bol (sweeprolog--query-once "sweep" "sweep_imenu_index" (buffer-file-name
[nongnu] elpa/sweeprolog 5f0e30be2e 8/9: Remove compatibility functions for buttonizing text.
branch: elpa/sweeprolog commit 5f0e30be2ee76c23729fd69ad12caa55e858d404 Author: Eshel Yaron Commit: Eshel Yaron Remove compatibility functions for buttonizing text. * sweeprolog.el (sweeprolog-render-html-span) (sweeprolog-render-html-a) (sweeprolog--describe-module) (sweeprolog--describe-predicate): Use 'buttonize' and 'buttonize-region' instead of... (sweeprolog--buttonize, sweeprolog--buttonize-region): Removed. --- sweeprolog.el | 47 +-- 1 file changed, 9 insertions(+), 38 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index 0968365411..2036a03678 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -1471,9 +1471,9 @@ resulting list even when found in the current clause." (save-excursion (goto-char beg) (save-match-data -(while (search-forward-regexp (rx bow (or "_" upper) - (* alnum)) - end t) +(while (re-search-forward (rx bow (or "_" upper) + (* alnum)) + end t) (unless (nth 8 (syntax-ppss)) (let ((match (match-string-no-properties 0))) (unless (or (member match exclude) @@ -5190,35 +5190,6 @@ accordingly." (interactive) (view-file (expand-file-name "NEWS.org" sweeprolog--directory))) -(defun sweeprolog--buttonize (string callback data) - (if (fboundp 'buttonize) - (buttonize string callback data) -(if (fboundp 'button-buttonize) -(button-buttonize string callback data) - (propertize string - 'face 'button - 'button t - 'follow-link t - 'category t - 'button-data data - 'keymap button-map - 'action callback - -(defun sweeprolog--buttonize-region (start end callback data) - (if (fboundp 'buttonize-region) - (buttonize-region start end callback data) -(add-text-properties start end - (list 'font-lock-face 'button - 'mouse-face 'highlight - 'help-echo nil - 'button t - 'follow-link t - 'category t - 'button-data data - 'keymap button-map - 'action callback)) -(add-face-text-property start end 'button t))) - (defun sweeprolog-render-html-span (dom) (if (string= "fn-text" (dom-attr dom 'class)) (progn (insert " ") @@ -5239,7 +5210,7 @@ accordingly." "/" (one-or-more digit) eos) target) -(sweeprolog--buttonize-region start +(buttonize-region start (point) #'sweeprolog-describe-predicate target))) @@ -5251,14 +5222,14 @@ accordingly." (let ((dir (file-name-directory path)) (base (file-name-base path))) (when (string= dir "/pldoc/doc/_SWI_/library/") -(sweeprolog--buttonize-region start +(buttonize-region start (point) #'find-file (concat "library(" base ")") ((string= path "/pldoc/man") (pcase (url-parse-query-string query) (`(("predicate" ,pred)) - (sweeprolog--buttonize-region start + (buttonize-region start (point) #'sweeprolog-describe-predicate pred)) @@ -5297,10 +5268,10 @@ accordingly." :type 'swi-prolog-module :file path)) (if page - (insert (sweeprolog--buttonize mod #'sweeprolog-find-module mod) + (insert (buttonize mod #'sweeprolog-find-module mod) " is a SWI-Prolog module.\n\n" page) -(insert (sweeprolog--buttonize mod #'sweeprolog-find-module mod) +(insert (buttonize mod #'sweeprolog-find-module mod) " is an undocumented SWI-Prolog module."))) (insert mod " is not documented as a SWI-Prolog module.")) @@ -5369,7 +5340,7 @@ accordingly." (list :symbol (intern pred) :type 'swi-prolog-predicate :file path)) - (insert (sweeprolog--buttonize pred #'sweeprolog-find-pred
[nongnu] elpa/sweeprolog updated (2eaa3a2653 -> be195d894f)
elpasync pushed a change to branch elpa/sweeprolog. from 2eaa3a2653 Announce recent changes in NEWS.org and bump version to 0.22.2 new 750aa2aff8 * sweeprolog.el: Require 'compat' new b2470c020b Use 'natnum' custom type new 209ac59d71 Use 'defvar-keymap' to define keymap variables. new ed2733e721 Use 'process-lines-handling-status'. new 226db0bd13 Use 'format-prompt'. new e8fa3f0ed5 Prefer 'pos-bol/eol' over 'line-beginning/end-position'. new 03cfe0c924 Use 'without-restriction'. new 5f0e30be2e Remove compatibility functions for buttonizing text. new be195d894f Announce Compat dependency and bump version to 0.23.0 Summary of changes: NEWS.org | 10 ++ README.org| 38 +++--- sweeprolog.el | 371 +++--- 3 files changed, 174 insertions(+), 245 deletions(-)
[nongnu] elpa/sweeprolog 209ac59d71 3/9: Use 'defvar-keymap' to define keymap variables.
branch: elpa/sweeprolog commit 209ac59d719fcaa0d147065dbd435c2286733b61 Author: Eshel Yaron Commit: Eshel Yaron Use 'defvar-keymap' to define keymap variables. * sweeprolog.el (sweeprolog-mode-map) (sweeprolog-forward-hole-repeat-map) (sweeprolog-top-level-mode-map) (sweeprolog-top-level-menu-mode-map) (sweeprolog-help-prefix-map) (sweeprolog-prefix-map) (sweeprolog-forward-hole-on-tab-mode-map) (sweeprolog-top-level-example-mode-map) (sweeprolog-term-search-map) (sweeprolog-read-term-map) (sweeprolog-read-goal-map): Convert to 'defvar-keymap'. --- sweeprolog.el | 234 +- 1 file changed, 99 insertions(+), 135 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index cd25357a35..693befcb0c 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -509,111 +509,113 @@ pack completion candidates." Keymaps -(defvar sweeprolog-mode-map - (let ((map (make-sparse-keymap))) -(define-key map (kbd "C-c C-b") #'sweeprolog-set-breakpoint) -(define-key map (kbd "C-c C-c") #'sweeprolog-analyze-buffer) -(define-key map (kbd "C-c C-d") #'sweeprolog-document-predicate-at-point) -(define-key map (kbd "C-c C-e") #'sweeprolog-export-predicate) -(define-key map (kbd "C-c TAB") #'sweeprolog-forward-hole) -(define-key map (kbd "C-c C-i") #'sweeprolog-forward-hole) -(define-key map (kbd "C-c ") #'sweeprolog-backward-hole) -(define-key map (kbd "C-c C-S-i") #'sweeprolog-backward-hole) -(define-key map (kbd "C-c C-l") #'sweeprolog-load-buffer) -(define-key map (kbd "C-c C-m") #'sweeprolog-insert-term-with-holes) -(define-key map (kbd "C-c C-o") #'sweeprolog-find-file-at-point) -(define-key map (kbd "C-c C-q") #'sweeprolog-top-level-send-goal) -(define-key map (kbd "C-c C-r") #'sweeprolog-rename-variable) -(define-key map (kbd "C-c C-s") #'sweeprolog-term-search) -(define-key map (kbd "C-c C-t") #'sweeprolog-top-level) -(define-key map (kbd "C-c C-u") #'sweeprolog-update-dependencies) -(define-key map (kbd "C-c C-`") -(if (fboundp 'flymake-show-buffer-diagnostics) ;; Flymake 1.2.1+ -#'sweeprolog-show-diagnostics - #'flymake-show-diagnostics-buffer)) -(define-key map (kbd "C-c C-&") #'sweeprolog-async-goal) -(define-key map (kbd "C-c C-%") #'sweeprolog-make-example-usage-comment) -(define-key map (kbd "C-c C--") #'sweeprolog-decrement-numbered-variables) -(define-key map (kbd "C-c C-+") #'sweeprolog-increment-numbered-variables) -(define-key map (kbd "C-M-^") #'kill-backward-up-list) -(define-key map (kbd "C-M-m") #'sweeprolog-insert-term-dwim) -(define-key map (kbd "M-p") #'sweeprolog-backward-predicate) -(define-key map (kbd "M-n") #'sweeprolog-forward-predicate) -(define-key map (kbd "M-h") #'sweeprolog-mark-predicate) -map) - "Keymap for `sweeprolog-mode'.") - -(defvar sweeprolog-forward-hole-repeat-map - (let ((map (make-sparse-keymap))) -(define-key map (kbd "TAB") #'sweeprolog-forward-hole) -(define-key map (kbd "C-i") #'sweeprolog-forward-hole) -(define-key map (kbd "") #'sweeprolog-backward-hole) -(define-key map (kbd "C-S-i") #'sweeprolog-backward-hole) -(define-key map (kbd "C-m") #'sweeprolog-insert-term-with-holes) -map) - "Repeat map for \\[sweeprolog-forward-hole].") - -(defvar sweeprolog-top-level-mode-map - (let ((map (make-sparse-keymap))) -(define-key map (kbd "C-c C-c") #'sweeprolog-top-level-signal-current) -(define-key map (kbd "C-c C-i") #'sweeprolog-forward-hole) -map) - "Keymap for `sweeprolog-top-level-mode'.") - -(defvar sweeprolog-top-level-menu-mode-map - (let ((map (make-sparse-keymap))) -(define-key map (kbd "RET") #'sweeprolog-top-level-menu-go-to) -(define-key map (kbd "k") #'sweeprolog-top-level-menu-kill) -(define-key map (kbd "t") #'sweeprolog-top-level-menu-new) -(define-key map (kbd "s") #'sweeprolog-top-level-menu-signal) -map) - "Local keymap for `sweeprolog-top-level-menu-mode' buffers.") - -(defvar sweeprolog-help-prefix-map - (let ((map (make-sparse-keymap))) -(define-key map "m" #'sweeprolog-describe-module) -(define-key map "p" #'sweeprolog-describe-predicate) -(define-key map "e" #'sweeprolog-view-messages) -(define-key map "n" #'sweeprolog-view-news) -map) - "Keymap for `sweeprolog' help commands.") +(defvar-keymap sweeprolog-mode-map + :doc "Keymap for `sweeprolog-mode'." + "C-c C-b" #'sweeprolog-set-breakpoint + "C-c C-c" #'sweeprolog-analyze-buffer + "C-c C-d" #'sweeprolog-document-predicate-at-point + "C-c C-e" #'sweeprolog-export-predicate + "C-c TAB" #'sweeprolog-forward-hole + "C-c C-i" #'sweeprolog-forward-hole + "C-c " #'sweeprolog-backward-hole + "C-c C-S-i" #'sweeprolog-backward-hole + "C-c C-l" #'sweeprolog-load-buffer + "C-c C-m" #'sweeprolog-insert-term-with-holes + "C-c C-o" #'s
[nongnu] elpa/sweeprolog b2470c020b 2/9: Use 'natnum' custom type
branch: elpa/sweeprolog commit b2470c020b6afaada02b7140ee7be27f171cceb9 Author: Eshel Yaron Commit: Eshel Yaron Use 'natnum' custom type * sweeprolog.el (sweeprolog-indent-offset): (sweeprolog-analyze-buffer-max-size): (sweeprolog-pack-description-max-width): Update type to 'natnum'. --- sweeprolog.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index 5e2699ccc5..cd25357a35 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -144,7 +144,7 @@ notices with the module header." (defcustom sweeprolog-indent-offset 4 "Number of columns to indent with in `sweeprolog-mode' buffers." :package-version '((sweeprolog . "0.3.1")) - :type 'integer + :type 'natnum :group 'sweeprolog) (defcustom sweeprolog-qq-mode-alist '(("graphql". graphql-mode) @@ -182,7 +182,7 @@ This makes the first invocation of \\[cycle-spacing] in (defcustom sweeprolog-analyze-buffer-max-size 10 "Maximum buffer size to analyze on idle." :package-version '((sweeprolog . "0.8.2")) - :type 'integer + :type 'natnum :group 'sweeprolog) (make-obsolete-variable 'sweeprolog-colourise-buffer-max-size @@ -505,7 +505,7 @@ This is an integer specifying a string width at which `sweeprolog-pack-install' truncates pack descriptions annotating pack completion candidates." :package-version '((sweeprolog "0.22.2")) - :type 'integer) + :type 'natnum) Keymaps
[elpa] externals/org 83fd03fb6d 9/9: org-attach: Fix when called from agenda
branch: externals/org commit 83fd03fb6d28ce87e36dc9b30f30f953397422d3 Author: Ihor Radchenko Commit: Ihor Radchenko org-attach: Fix when called from agenda * lisp/org-attach.el (org-attach): Do not try to call `org-attach-dir' from non-Org buffer. This requires parser, which cannot run in agenda buffer. --- lisp/org-attach.el | 110 ++--- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 23c581035a..a2ff955241 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -301,68 +301,68 @@ ask the user instead, else remove without asking." "The dispatcher for attachment commands. Shows a list of commands and prompts for another key to execute a command." (interactive) - (let ((dir (org-attach-dir nil 'no-fs-check)) - c marker) + (let (c marker) (when (eq major-mode 'org-agenda-mode) (setq marker (or (get-text-property (point) 'org-hd-marker) (get-text-property (point) 'org-marker))) (unless marker (error "No item in current line"))) (org-with-point-at marker - (if (and (featurep 'org-inlinetask) - (not (org-inlinetask-in-task-p))) - (org-with-limited-levels - (org-back-to-heading-or-point-min t)) + (let ((dir (org-attach-dir nil 'no-fs-check))) (if (and (featurep 'org-inlinetask) -(org-inlinetask-in-task-p)) -(org-inlinetask-goto-beginning) - (org-back-to-heading-or-point-min t))) - (save-excursion - (save-window-excursion - (unless org-attach-expert - (org-switch-to-buffer-other-window "*Org Attach*") - (erase-buffer) - (setq cursor-type nil - header-line-format "Use C-v, M-v, C-n or C-p to navigate.") - (insert - (concat "Attachment folder:\n" -(or dir -"Can't find an existing attachment-folder") -(unless (and dir (file-directory-p dir)) - "\n(Not yet created)") -"\n\n" -(format "Select an Attachment Command:\n\n%s" -(mapconcat - (lambda (entry) - (pcase entry - (`((,key . ,_) ,_ ,docstring) - (format "%c %s" - key - (replace-regexp-in-string "\n\\([\t ]*\\)" -"" -docstring -nil nil 1))) - (_ - (user-error - "Invalid `org-attach-commands' item: %S" - entry - org-attach-commands - "\n" -(goto-char (point-min))) - (org-fit-window-to-buffer (get-buffer-window "*Org Attach*")) - (let ((msg (format "Select command: [%s]" -(concat (mapcar #'caar org-attach-commands) - (message msg) - (while (and (setq c (read-char-exclusive)) -(memq c '(?\C-n ?\C-p ?\C-v ?\M-v))) - (org-scroll c t))) - (and (get-buffer "*Org Attach*") (kill-buffer "*Org Attach*" - (let ((command (cl-some (lambda (entry) - (and (memq c (nth 0 entry)) (nth 1 entry))) - org-attach-commands))) - (if (commandp command) - (command-execute command) - (error "No such attachment command: %c" c)) +(not (org-inlinetask-in-task-p))) + (org-with-limited-levels +(org-back-to-heading-or-point-min t)) + (if (and (featurep 'org-inlinetask) + (org-inlinetask-in-task-p)) + (org-inlinetask-goto-beginning) +(org-back-to-heading-or-point-min t))) +(save-excursion + (save-window-excursion + (unless org-attach-expert + (org-switch-to-buffer-other-window "*Org Attach*") + (erase-buffer) + (setq cursor-type nil + header-line-format "Use C-v, M-v, C-n or C-p to navigate.") + (insert + (concat "Attachment folder:\n" + (or dir + "Can't find an existing attachment-folder") + (unless (and dir (file-directory-p dir)) +"\n(Not yet created)") + "\n\n" + (format "Select an Attachment Command:\n\n%s" +
[elpa] externals/org b3660cf135 7/9: * testing/lisp/test-org-attach-git.el: Avoid using global git config
branch: externals/org commit b3660cf1351e9ffeb7dc127f53a82171e89e155c Author: Ihor Radchenko Commit: Ihor Radchenko * testing/lisp/test-org-attach-git.el: Avoid using global git config (test-org-attach-git/with-annex): Disable global git config during testing. --- testing/lisp/test-org-attach-git.el | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/testing/lisp/test-org-attach-git.el b/testing/lisp/test-org-attach-git.el index cc2a1dc627..e8b41fe8ce 100644 --- a/testing/lisp/test-org-attach-git.el +++ b/testing/lisp/test-org-attach-git.el @@ -28,9 +28,16 @@ (unwind-protect (let ((default-directory tmpdir) (org-attach-id-dir tmpdir)) - (shell-command "git init") - (shell-command "git annex init") - ,@body + ;; Ignore global git config. + (with-environment-variables + (("GIT_CONFIG_GLOBAL" (concat tmpdir ".global-config")) +("GIT_CONFIG_SYSTEM" "")) + ;; Otherwise, some git operations may err. + (shell-command "git config --global user.email \"john@example.com\"") + (shell-command "git config --global user.name \"John Doe\"") +(shell-command "git init") +(shell-command "git annex init") +,@body) (ert-deftest test-org-attach-git/use-annex () (test-org-attach-git/with-annex
[elpa] externals/org 9e40208547 2/9: test-org-agenda/todo-selector: Remove stray `message' call
branch: externals/org commit 9e4020854787353b5e5fd824d7a541ed2e0174f4 Author: Ihor Radchenko Commit: Ihor Radchenko test-org-agenda/todo-selector: Remove stray `message' call * testing/lisp/test-org-agenda.el: Remove leftover message call. --- testing/lisp/test-org-agenda.el | 1 - 1 file changed, 1 deletion(-) diff --git a/testing/lisp/test-org-agenda.el b/testing/lisp/test-org-agenda.el index d9e7cca83b..409d441921 100644 --- a/testing/lisp/test-org-agenda.el +++ b/testing/lisp/test-org-agenda.el @@ -102,7 +102,6 @@ (should (progn "all todo" -(message "%S\n\n%s\n\n" org-todo-keywords (buffer-string)) (goto-char (point-min)) (search-forward "[ ] Unchecked and will appear in agenda" nil t))) (should
[elpa] externals/org 2eb4fd8900 6/9: lisp/ox-latex.el: Add the `:literal' attribute to verse block.
branch: externals/org commit 2eb4fd89001ad22143c308f10ea53d04eec90264 Author: Juan Manuel Macias Commit: Ihor Radchenko lisp/ox-latex.el: Add the `:literal' attribute to verse block. * (org-latex-verse-block): Now the treatment of blank lines is consistent with the syntax of the LaTeX `verse' environment, and the one provided by the `verse' package. If the `:literal' attribute is used, all blank lines are preserved and exported as `\vspace*{\baselineskip}', including the blank lines before or after contents. The rx code has been suggested by Ihor Radchenko, to improve readability. * doc/org-manual.org (Verse blocks in LaTeX export): The new feature is documented. * testing/lisp/test-ox-latex.el (test-ox-latex/verse): Updated. --- doc/org-manual.org| 18 ++ lisp/ox-latex.el | 36 +++- testing/lisp/test-ox-latex.el | 8 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 8bd7a39309..4049a4e298 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -14458,10 +14458,10 @@ The LaTeX export backend converts horizontal rules by the specified #+cindex: verse blocks, in @LaTeX{} export #+cindex: @samp{ATTR_LATEX}, keyword -The LaTeX export backend accepts four attributes for verse blocks: -=:lines=, =:center=, =:versewidth= and =:latexcode=. The three first -require the external LaTeX package =verse.sty=, which is an extension -of the standard LaTeX environment. +The LaTeX export backend accepts five attributes for verse blocks: +=:lines=, =:center=, =:versewidth=, =:latexcode= and =:literal=. The +three first require the external LaTeX package =verse.sty=, which is +an extension of the standard LaTeX environment. - =:lines= :: To add marginal verse numbering. Its value is an integer, the sequence in which the verses should be numbered. @@ -14473,6 +14473,16 @@ of the standard LaTeX environment. verse. - =:latexcode= :: It accepts any arbitrary LaTeX code that can be included within a LaTeX =verse= environment. +- =:literal= :: With value t, all blank lines are preserved and + exported as =\vspace*{\baselineskip}=, including the blank lines + before or after contents. Note that without the =:literal= + attribute, one or more blank lines between stanzas are exported as a + single blank line, and any blank lines before or after the content + are removed, which is more consistent with the syntax of the LaTeX + `verse' environment, and the one provided by the =verse= package. + If the =verse= package is loaded, the vertical spacing between all + stanzas can be controlled by the global length =\stanzaskip= (see + https://www.ctan.org/pkg/verse). A complete example with Shakespeare's first sonnet: diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 776a011df1..52d9ca5fa0 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -4116,10 +4116,11 @@ contextual information." (let* ((lin (org-export-read-attribute :attr_latex verse-block :lines)) (latcode (org-export-read-attribute :attr_latex verse-block :latexcode)) (cent (org-export-read-attribute :attr_latex verse-block :center)) + (lit (org-export-read-attribute :attr_latex verse-block :literal)) (attr (concat - (if cent "[\\versewidth]" "") - (if lin (format "\n\\poemlines{%s}" lin) "") - (if latcode (format "\n%s" latcode) ""))) + (if cent "[\\versewidth]" "") + (if lin (format "\n\\poemlines{%s}" lin) "") + (if latcode (format "\n%s" latcode) ""))) (versewidth (org-export-read-attribute :attr_latex verse-block :versewidth)) (vwidth (if versewidth (format "\\settowidth{\\versewidth}{%s}\n" versewidth) "")) (linreset (if lin "\n\\poemlines{0}" ""))) @@ -4128,20 +4129,37 @@ contextual information." verse-block ;; In a verse environment, add a line break to each newline ;; character and change each white space at beginning of a line - ;; into a space of 1 em. Also change each blank line with - ;; a vertical space of 1 em. + ;; into a normal space, calculated with `\fontdimen2\font'. One + ;; or more blank lines between lines are exported as a single + ;; blank line. If the `:lines' attribute is used, the last + ;; verse of each stanza ends with the string `\\!', according to + ;; the syntax of the `verse' package. The separation between + ;; stanzas can be controlled with the length `\stanzaskip', of + ;; the aforementioned package. If the `:literal' attribute is + ;; used, all blank lines are preserved and exported as + ;; `\vspace*{\baselineskip}', including the blank lines before + ;; or after CONTENTS. (format "%s\\begin{verse}%s\n%s\\end{verse}%s" vwidth
[elpa] externals/org 3b49db8755 1/9: Revert "Prefer `string-search' when matching exact strings"
branch: externals/org commit 3b49db87550e42522d67b5b9864b3d6bdc685b33 Author: Ihor Radchenko Commit: Ihor Radchenko Revert "Prefer `string-search' when matching exact strings" This reverts commit e9110a8dd77c271248257f588c49796876500f22. `string-search' is not available in Emacs<28 and also always case-sensitive. --- lisp/ob-core.el | 4 ++-- lisp/org-agenda.el | 2 +- lisp/org-persist.el | 2 +- lisp/ox-beamer.el | 4 ++-- lisp/ox-latex.el| 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 9cc267f5a2..411ced2e29 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -175,7 +175,7 @@ This string must include a \"%s\" which will be replaced by the results." 'safe-local-variable (lambda (value) (and (stringp value) - (string-search "%s" value + (string-match-p "%s" value (defcustom org-babel-hash-show-time nil "Non-nil means show the time the code block was evaluated in the result hash." @@ -2060,7 +2060,7 @@ block of the same language with the previous." (stars (concat (make-string (or (org-current-level) 1) ?*) " ")) (upper-case-p (and block (let (case-fold-search) - (string-search "#+BEGIN_SRC" block) + (string-match-p "#\\+BEGIN_SRC" block) (if (and info start) ;; At src block, but not within blank lines after it. (mapc (lambda (place) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 272010a257..57cddcfe9e 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8288,7 +8288,7 @@ also press `-' or `+' to switch between filtering and excluding." (setq org-agenda-represented-categories ;; Enclose category names with a hyphen in double ;; quotes to process them specially in `org-agenda-filter'. - (mapcar (lambda (s) (if (string-search "-" s) (format "\"%s\"" s) s)) + (mapcar (lambda (s) (if (string-match-p "-" s) (format "\"%s\"" s) s)) (nreverse (org-uniquify (delq nil categories) (defvar org-tag-groups-alist-for-agenda) diff --git a/lisp/org-persist.el b/lisp/org-persist.el index b98cfa3a84..81edcf6f28 100644 --- a/lisp/org-persist.el +++ b/lisp/org-persist.el @@ -426,7 +426,7 @@ FORMAT and ARGS are passed to `message'." ;; Remove problematic file. (unless (bufferp buffer-or-file) (delete-file buffer-or-file)) ;; Do not report the known error to user. - (if (string-search "Invalid read syntax" (error-message-string err)) + (if (string-match-p "Invalid read syntax" (error-message-string err)) (message "Emacs reader failed to read data in %S. The error was: %S" buffer-or-file (error-message-string err)) (warn "Emacs reader failed to read data in %S. The error was: %S" diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index c58b0c6bcf..2f11994998 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -452,12 +452,12 @@ used as a communication channel." ;; allowed by Beamer. (and (not (member "allowframebreaks" options)) (not (cl-some (lambda (s) (string-match-p "^label=" s)) -options)) + options)) (list (let ((label (org-beamer--get-label headline info))) ;; Labels containing colons need to be ;; wrapped within braces. - (format (if (string-search ":" label) + (format (if (string-match-p ":" label) "label={%s}" "label=%s") label)) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 7874101c70..776a011df1 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2640,7 +2640,7 @@ could be a member of `org-latex-caption-above' or `math'." (regexp-opt '("table" "longtable" "tabular" "tabu" "longtabu"))) env) 'table) - ((string-search "figure" env) 'image) + ((string-match-p "figure" env) 'image) ((string-match-p (eval-when-compile (regexp-opt '("lstlisting" "listing" "verbatim" "minted"))) @@ -2796,7 +2796,7 @@ used as a communication channel." (when (and search-option (equal filetype "pdf") (string-match-p "\\`[0-9]+\\'" search-option) - (not (string-search "page=" options))) + (not (string-match-p "page=" options))) (setq options (concat options ",page=" search-option (setq image-code (format "\\includegraphics%s{%s}"
[elpa] externals/org updated (d0c7cd48eb -> 83fd03fb6d)
elpasync pushed a change to branch externals/org. from d0c7cd48eb org-babel-do-key-sequence-in-edit-buffer: Mention argument in docstring new 3b49db8755 Revert "Prefer `string-search' when matching exact strings" new 9e40208547 test-org-agenda/todo-selector: Remove stray `message' call new 933d282881 Fix Emacs 27 false-positive warnings new 3ec0933122 Fix Emacs 27 test failure new f1359546ad org-element-at-point: Throw an error when not in org-mode new 2eb4fd8900 lisp/ox-latex.el: Add the `:literal' attribute to verse block. new b3660cf135 * testing/lisp/test-org-attach-git.el: Avoid using global git config new 79aa149143 org-babel-map-executable: Describe header arg in the docstring new 83fd03fb6d org-attach: Fix when called from agenda Summary of changes: doc/org-manual.org | 18 -- lisp/ob-core.el | 5 +- lisp/org-agenda.el | 2 +- lisp/org-attach.el | 110 ++-- lisp/org-element-ast.el | 10 +++- lisp/org-element.el | 6 +- lisp/org-id.el | 12 ++-- lisp/org-persist.el | 2 +- lisp/ox-beamer.el | 4 +- lisp/ox-latex.el| 40 + testing/lisp/test-org-agenda.el | 1 - testing/lisp/test-org-attach-git.el | 13 - testing/lisp/test-ox-latex.el | 8 +-- testing/lisp/test-ox.el | 7 +++ 14 files changed, 147 insertions(+), 91 deletions(-)
[elpa] externals/org 79aa149143 8/9: org-babel-map-executable: Describe header arg in the docstring
branch: externals/org commit 79aa1491439ff0e7d1b0f3377dcfcd8f8470545e Author: Ihor Radchenko Commit: Ihor Radchenko org-babel-map-executable: Describe header arg in the docstring * lisp/ob-core.el (org-babel-execute-buffer): Mention in the docstring how prefix argument is handled. --- lisp/ob-core.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 411ced2e29..4496f4c4a4 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1381,6 +1381,7 @@ buffer." ;;;###autoload (defun org-babel-execute-buffer (&optional arg) "Execute source code blocks in a buffer. +Prefix argument ARG is passed to `org-babel-execute-src-block'. Call `org-babel-execute-src-block' on every source block in the current buffer." (interactive "P")
[elpa] externals/org f1359546ad 5/9: org-element-at-point: Throw an error when not in org-mode
branch: externals/org commit f1359546ad7dee9698b75ca25ad453e6f054bd06 Author: Ihor Radchenko Commit: Ihor Radchenko org-element-at-point: Throw an error when not in org-mode * lisp/org-element.el (org-element-at-point): Explicitly throw an error when not in org-mode buffer. The parser expects certain buffer-local constants and may fail otherwise. It is better to indicate the problem explicitly instead of dealing with cryptic generic errors. (org-element-plain-list-interpreter): * testing/lisp/test-ox.el (test-org-export/expand-include/links): Make sure that we never invoke parser in non-Org buffers. --- lisp/org-element.el | 4 testing/lisp/test-ox.el | 7 +++ 2 files changed, 11 insertions(+) diff --git a/lisp/org-element.el b/lisp/org-element.el index 69a62a2f5c..58693d4e33 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -1780,6 +1780,7 @@ Assume point is at the beginning of the list." "Interpret plain-list element as Org syntax. CONTENTS is the contents of the element." (with-temp-buffer +(org-mode) (insert contents) (goto-char (point-min)) (org-list-repair) @@ -8031,6 +8032,9 @@ This function may modify the match data." (if (org-element-type epom t) epom (setq epom (or epom (point))) (org-with-point-at epom + (unless (derived-mode-p 'org-mode) +(error "`org-element-at-point' cannot be used in non-Org buffer %S (%s)" + (current-buffer) major-mode)) ;; Allow re-parsing when the command can benefit from it. (when (and cached-only (memq this-command org-element--cache-non-modifying-commands)) diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el index 87c6db8af0..4ba0ba0325 100644 --- a/testing/lisp/test-ox.el +++ b/testing/lisp/test-ox.el @@ -1498,6 +1498,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote] (let ((buffer (find-file-noselect includer t))) (unwind-protect (with-current-buffer buffer + (org-mode) (org-export-expand-include-keyword) (org-trim (buffer-string))) (when (buffer-live-p buffer) @@ -1520,6 +1521,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote] (let ((buffer (find-file-noselect includer t))) (unwind-protect (with-current-buffer buffer + (org-mode) (org-export-expand-include-keyword) (org-trim (buffer-string))) (when (buffer-live-p buffer) @@ -1542,6 +1544,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote] (let ((buffer (find-file-noselect includer t))) (unwind-protect (with-current-buffer buffer + (org-mode) (org-export-expand-include-keyword) (org-trim (buffer-string))) (when (buffer-live-p buffer) @@ -1564,6 +1567,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote] (let ((buffer (find-file-noselect includer t))) (unwind-protect (with-current-buffer buffer + (org-mode) (org-export-expand-include-keyword) (org-trim (buffer-string))) (when (buffer-live-p buffer) @@ -1586,6 +1590,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote] (let ((buffer (find-file-noselect includer t))) (unwind-protect (with-current-buffer buffer + (org-mode) (org-export-expand-include-keyword) (org-trim (buffer-string))) (when (buffer-live-p buffer) @@ -1608,6 +1613,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote] (let ((buffer (find-file-noselect includer t))) (unwind-protect (with-current-buffer buffer + (org-mode) (org-export-expand-include-keyword) (org-trim (buffer-string))) (when (buffer-live-p buffer) @@ -1628,6 +1634,7 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline footnote] (let ((buffer (find-file-noselect includer t))) (unwind-protect (with-current-buffer buffer + (org-mode) (org-export-expand-include-keyword) (org-trim (buffer-string))) (when (buffer-live-p buffer)
[elpa] externals/org 3ec0933122 4/9: Fix Emacs 27 test failure
branch: externals/org commit 3ec093312201b5ee02e77cdaff166d3c55d5155f Author: Ihor Radchenko Commit: Ihor Radchenko Fix Emacs 27 test failure * lisp/org-id.el (org-id-find-id-in-file): Work around change functions not always firing up in Emacs 27 when using `insert-file-contents'. --- lisp/org-id.el | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/org-id.el b/lisp/org-id.el index c11fa9a2d1..463bd831cb 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -686,8 +686,12 @@ optional argument MARKERP, return the position as a new marker." (unless (derived-mode-p 'org-mode) (org-mode)) (unless (or visiting markerp) (buffer-disable-undo) - (erase-buffer) - (insert-file-contents file)) + ;; FIXME: In Emacs 27, `insert-file-contents' seemingly + ;; does not trigger modification hooks in some + ;; scenarios. This is manifested in test failures due + ;; to element cache losing track of the modifications. + (org-element-cache-reset) + (insert-file-contents file nil nil nil 'replace)) (let ((pos (org-find-entry-with-id id))) (cond ((null pos) nil)
[nongnu] elpa/cider 00f765b800 04/15: Add a standard header suggesting `it` blocks
branch: elpa/cider commit 00f765b80014c55f81d7600ce945d6b4216a6d25 Author: vemv Commit: Bozhidar Batsov Add a standard header suggesting `it` blocks --- test/cider-apropos-tests.el | 2 ++ test/cider-browse-ns-tests.el | 2 ++ test/cider-browse-spec-tests.el | 2 ++ test/cider-classpath-tests.el | 2 ++ test/cider-client-tests.el| 2 ++ test/cider-clojuredocs-tests.el | 2 ++ test/cider-common-tests.el| 2 ++ test/cider-connection-tests.el| 2 ++ test/cider-debug-tests.el | 2 ++ test/cider-doc-tests.el | 2 ++ test/cider-eldoc-tests.el | 2 ++ test/cider-error-parsing-tests.el | 2 ++ test/cider-eval-tests.el | 2 ++ test/cider-find-tests.el | 2 ++ test/cider-font-lock-tests.el | 1 + test/cider-interaction-tests.el | 2 ++ test/cider-jar-tests.el | 2 ++ test/cider-locals-tests.el| 2 ++ test/cider-log-tests.el | 2 ++ test/cider-ns-tests.el| 2 ++ test/cider-overlay-tests.el | 2 ++ test/cider-repl-tests.el | 2 ++ test/cider-selector-tests.el | 2 ++ test/cider-stacktrace-tests.el| 2 ++ test/cider-test-tests.el | 2 ++ test/cider-tests--no-auto.el | 2 ++ test/cider-tests.el | 2 ++ test/cider-util-tests.el | 2 ++ test/integration/integration-tests.el | 3 ++- test/nrepl-bencode-tests.el | 2 ++ test/nrepl-client-tests.el| 2 ++ test/nrepl-dict-tests.el | 2 ++ 32 files changed, 63 insertions(+), 1 deletion(-) diff --git a/test/cider-apropos-tests.el b/test/cider-apropos-tests.el index 227c4a31f9..e832b4ad43 100644 --- a/test/cider-apropos-tests.el +++ b/test/cider-apropos-tests.el @@ -30,6 +30,8 @@ (require 'buttercup) (require 'cider-apropos) +;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. + (describe "cider-apropos" (it "raises user-error when cider is not connected." (spy-on 'cider-connected-p :and-return-value nil) diff --git a/test/cider-browse-ns-tests.el b/test/cider-browse-ns-tests.el index f621c74c65..080c9c1f51 100644 --- a/test/cider-browse-ns-tests.el +++ b/test/cider-browse-ns-tests.el @@ -30,6 +30,8 @@ (require 'buttercup) (require 'cider-browse-ns) +;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. + (describe "cider-browse-ns--text-face" (it "identifies a function" (expect (cider-browse-ns--text-face '(dict "arglists" "fn arg list")) diff --git a/test/cider-browse-spec-tests.el b/test/cider-browse-spec-tests.el index 8907529466..e550f97ad0 100644 --- a/test/cider-browse-spec-tests.el +++ b/test/cider-browse-spec-tests.el @@ -29,6 +29,8 @@ (require 'buttercup) (require 'cider-browse-spec) +;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. + (defvar cider-browse-spec-tests--schema-vector-response '("clojure.alpha.spec/schema" (":example.customer/id" ":example.customer/name")) diff --git a/test/cider-classpath-tests.el b/test/cider-classpath-tests.el index 09fdda0925..5b41b267c4 100644 --- a/test/cider-classpath-tests.el +++ b/test/cider-classpath-tests.el @@ -30,6 +30,8 @@ (require 'buttercup) (require 'cider-classpath) +;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. + (describe "cider-classpath" (it "raises user-error when cider is not connected." (spy-on 'cider-connected-p :and-return-value nil) diff --git a/test/cider-client-tests.el b/test/cider-client-tests.el index c24141cb59..5050673976 100644 --- a/test/cider-client-tests.el +++ b/test/cider-client-tests.el @@ -33,6 +33,8 @@ (require 'cider-connection) (require 'cider-connection-test-utils "test/utils/cider-connection-test-utils") +;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. + ;;; cider-client tests (describe "cider-var-info" diff --git a/test/cider-clojuredocs-tests.el b/test/cider-clojuredocs-tests.el index 7ee4c664fe..867e475b51 100644 --- a/test/cider-clojuredocs-tests.el +++ b/test/cider-clojuredocs-tests.el @@ -30,6 +30,8 @@ (require 'buttercup) (require 'cider-clojuredocs) +;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. + ;;; clojuredocs tests (describe "cider-clojuredocs-replace-special" diff --git a/test/cider-common-tests.el b/test/cider-common-tests.el index afb2b56259..b918811b72 100644 --- a/test/cider-common-tests.el +++ b/test/cider-common-tests.el @@ -30,6 +30,8 @@ (require 'buttercup) (require 'cider-common) +;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. + ;;; cider-common tests (describe "cider-abbreviate-ns" (it
[nongnu] elpa/cider ff98bc7df2 05/15: Bump some copyright years
branch: elpa/cider commit ff98bc7df24236abc5bc39dad4014f7a9a184b4e Author: vemv Commit: Bozhidar Batsov Bump some copyright years --- test/integration/integration-test-utils.el | 2 +- test/integration/integration-tests.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/integration-test-utils.el b/test/integration/integration-test-utils.el index ef4389618a..4f552663d1 100644 --- a/test/integration/integration-test-utils.el +++ b/test/integration/integration-test-utils.el @@ -1,6 +1,6 @@ ;;; integration-test-utils.el -*- lexical-binding: t; -*- -;; Copyright © 2022 Ioannis Kappas +;; Copyright © 2022-2023 Ioannis Kappas ;; This file is NOT part of GNU Emacs. diff --git a/test/integration/integration-tests.el b/test/integration/integration-tests.el index caa1c23501..a337e63fb0 100644 --- a/test/integration/integration-tests.el +++ b/test/integration/integration-tests.el @@ -1,6 +1,6 @@ ;;; integration-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2022 Ioannis Kappas +;; Copyright © 2022-2023 Ioannis Kappas ;; This file is NOT part of GNU Emacs.
[nongnu] elpa/helm a13a3e7907 1/4: Error message with outdated package list when installing
branch: elpa/helm commit a13a3e79076f3936cd32b253419ad5dcf2f43a94 Author: Thierry Volpiatto Commit: Thierry Volpiatto Error message with outdated package list when installing --- helm-packages.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helm-packages.el b/helm-packages.el index 9abccc0194..f1f810db92 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -104,7 +104,9 @@ as dependencies." helm-marked-buffer-name (mapcar #'symbol-name mkd) (when (y-or-n-p (format "Install %s packages? " (length mkd))) -(mapc #'package-install mkd) +(condition-case err +(mapc #'package-install mkd) + (error "%S:\n Please refresh package list before installing" err)) ;;; Transformer ;;
[nongnu] elpa/cider 1f426a4ac8 03/15: Settle on `*tests.el` naming
branch: elpa/cider commit 1f426a4ac885dafe12b87755f27a808bcfade2d1 Author: vemv Commit: Bozhidar Batsov Settle on `*tests.el` naming --- test/{cider-eval-test.el => cider-eval-tests.el} | 0 test/{cider-jar-test.el => cider-jar-tests.el} | 0 test/{cider-log-test.el => cider-log-tests.el} | 0 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/test/cider-eval-test.el b/test/cider-eval-tests.el similarity index 100% rename from test/cider-eval-test.el rename to test/cider-eval-tests.el diff --git a/test/cider-jar-test.el b/test/cider-jar-tests.el similarity index 100% rename from test/cider-jar-test.el rename to test/cider-jar-tests.el diff --git a/test/cider-log-test.el b/test/cider-log-tests.el similarity index 100% rename from test/cider-log-test.el rename to test/cider-log-tests.el
[nongnu] elpa/helm updated (b8e9509490 -> 497f479ec1)
elpasync pushed a change to branch elpa/helm. from b8e9509490 Ask for confirmation before running actions on packages new a13a3e7907 Error message with outdated package list when installing new 2f16aa8d4e Docstring only new dfb1d02e5b New file NEWS.org new 497f479ec1 Bump to 3.9.4 Summary of changes: NEWS.org | 51 +++ helm-core.el | 2 +- helm-packages.el | 11 +-- helm.el | 4 ++-- 4 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 NEWS.org
[nongnu] elpa/cider 093f79cf09 11/15: Check `.nrepl-port`-like files for liveness
branch: elpa/cider commit 093f79cf0916c4c5ea7fbb9c113285cd026b7423 Author: vemv Commit: vemv Check `.nrepl-port`-like files for liveness Fixes https://github.com/clojure-emacs/cider/issues/3408 --- CHANGELOG.md| 1 + nrepl-client.el | 16 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bcd9f6282..530f7ca036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ ### Changes - [#3390](https://github.com/clojure-emacs/cider/issues/3390): Enhance `cider-connect` to show all nREPLs available ports, instead of only Leiningen ones. +- [#3408](https://github.com/clojure-emacs/cider/issues/3408): `cider-connect`: check `.nrepl-port`-like files for liveness, hiding them if they don't reflect an active port. - Preserve the `:cljs-repl-type` more reliably. - Improve the presentation of `xref` data. - `cider-test`: only show diffs for collections. diff --git a/nrepl-client.el b/nrepl-client.el index 97be8e0f8f..23dbbf6a2c 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -254,12 +254,18 @@ PARAMS is as in `nrepl-make-buffer-name'." (make-obsolete 'nrepl-extract-port 'nrepl-extract-ports "1.5.0") (defun nrepl--port-from-file (file) - "Attempts to read port from a file named by FILE." + "Attempts to read port from a file named by FILE. + +Discards it if it can be determined that the port is not active." (when (file-exists-p file) -(with-temp-buffer - (insert-file-contents file) - (replace-regexp-in-string "\n\\'" "" ;; remove any trailing newline, so that our UIs look better. -(buffer-string) +(let ((port-string (with-temp-buffer + (insert-file-contents file) + (string-trim-right (buffer-string) + (if (eq system-type 'windows-nt) + port-string +(when (not (equal "" + (shell-command-to-string (concat "lsof -i:" port-string + port-string) ;;; Bencode
[nongnu] elpa/helm 497f479ec1 4/4: Bump to 3.9.4
branch: elpa/helm commit 497f479ec113583c2570c03a526c999e3d410f95 Author: Thierry Volpiatto Commit: Thierry Volpiatto Bump to 3.9.4 --- helm-core.el | 2 +- helm.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-core.el b/helm-core.el index a701102588..3451933063 100644 --- a/helm-core.el +++ b/helm-core.el @@ -4,7 +4,7 @@ ;; Author: Thierry Volpiatto ;; URL: https://emacs-helm.github.io/helm/ -;; Version: 3.9.3 +;; Version: 3.9.4 ;; Package-Requires: ((emacs "25.1") (async "1.9.7")) ;; This program is free software; you can redistribute it and/or modify diff --git a/helm.el b/helm.el index f9554e8d1e..03afe95fa8 100644 --- a/helm.el +++ b/helm.el @@ -11,9 +11,9 @@ ;; Thierry Volpiatto ;; Author: Thierry Volpiatto -;; Version: 3.9.3 +;; Version: 3.9.4 ;; URL: https://emacs-helm.github.io/helm/ -;; Package-Requires: ((helm-core "3.9.3") (wfnames "1.1") (popup "0.5.3")) +;; Package-Requires: ((helm-core "3.9.4") (wfnames "1.1") (popup "0.5.3")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by
[nongnu] elpa/cider 363b8e9eb2 10/15: Recompute namespace info on each fighweel-main recompilation
branch: elpa/cider commit 363b8e9eb2dabde38d1241d929689a6533af65dd Author: vemv Commit: vemv Recompute namespace info on each fighweel-main recompilation Similar to https://github.com/clojure-emacs/cider/pull/3396, except that it's only necessary on recompilation - not on evaluations. --- CHANGELOG.md | 2 ++ cider-repl.el | 27 --- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52f4482b20..2bcd9f6282 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ - [#3112](https://github.com/clojure-emacs/cider/issues/3112): Fix the CIDER `xref-find-references` backend to return correct filenames. - [#3393](https://github.com/clojure-emacs/cider/issues/3393): recompute namespace info on each shadow-cljs recompilation or evaluation. - [#3402](https://github.com/clojure-emacs/cider/issues/3402): fix `cider-format-connection-params` edge case for Emacs 29. +- [#3393](https://github.com/clojure-emacs/cider/issues/3393): Recompute namespace info on each shadow-cljs recompilation or evaluation. +- Recompute namespace info on each fighweel-main recompilation. - Fix the `xref-find-definitions` CIDER backend to return correct filenames. - Fix the `cider-xref-fn-deps` buttons to direct to the right file. diff --git a/cider-repl.el b/cider-repl.el index d70b708c36..b083a08deb 100644 --- a/cider-repl.el +++ b/cider-repl.el @@ -986,6 +986,12 @@ t, as the content-type response is (currently) an alternative to the value response. However for handlers which themselves issue subsequent nREPL ops, it may be convenient to prevent inserting a prompt.") +(defun cider--maybe-get-state-cljs () + "Invokes `cider/get-state' when it's possible to do so." + (when-let ((conn (cider-current-repl 'cljs))) +(when (nrepl-op-supported-p "cider/get-state" conn) + (nrepl-send-request '("op" "cider/get-state") nil conn + (defun cider--maybe-get-state-for-shadow-cljs (buffer &optional err) "Refresh the changed namespaces metadata given BUFFER and ERR (stderr string). @@ -1003,9 +1009,16 @@ This is particularly necessary for shadow-cljs because: (if err (string-match-p "Build completed\\." err) t)) - (when-let ((conn (cider-current-repl 'cljs))) -(when (nrepl-op-supported-p "cider/get-state" conn) - (nrepl-send-request '("op" "cider/get-state") nil conn)) + (cider--maybe-get-state-cljs + +(defun cider--maybe-get-state-for-figwheel-main (buffer out) + "Refresh the changed namespaces metadata given BUFFER and OUT (stdout string)." + (with-current-buffer buffer +(when (and (eq cider-repl-type 'cljs) + (eq cider-cljs-repl-type 'figwheel-main) + (not cider-repl-cljs-upgrade-pending) + (string-match-p "Successfully compiled build" out)) + (cider--maybe-get-state-cljs (defun cider--shadow-cljs-handle-stderr (buffer err) "Refresh the changed namespaces metadata given BUFFER and ERR." @@ -1015,6 +1028,12 @@ This is particularly necessary for shadow-cljs because: "Refresh the changed namespaces metadata given BUFFER." (cider--maybe-get-state-for-shadow-cljs buffer)) +(defvar cider--repl-stdout-functions (list #'cider--maybe-get-state-for-figwheel-main) + "Functions to be invoked each time new stdout is received on a repl buffer. + +Good for, for instance, monitoring specific strings that may be logged, +and responding to them.") + (defvar cider--repl-stderr-functions (list #'cider--shadow-cljs-handle-stderr) "Functions to be invoked each time new stderr is received on a repl buffer. @@ -1032,6 +1051,8 @@ and responding to them.") (lambda (buffer value) (cider-repl-emit-result buffer value t)) (lambda (buffer out) + (dolist (f cider--repl-stdout-functions) + (funcall f buffer out)) (cider-repl-emit-stdout buffer out)) (lambda (buffer err) (dolist (f cider--repl-stderr-functions)
[nongnu] elpa/cider 34f1bfc377 09/15: Bump the injected Piggieback to 0.5.3
branch: elpa/cider commit 34f1bfc377845dd6c4bba3d4162d79b80ec329a2 Author: vemv Commit: vemv Bump the injected Piggieback to 0.5.3 --- CHANGELOG.md | 1 + cider.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13241e7846..52f4482b20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - `cider-test`: only show diffs for collections. - [#3375](https://github.com/clojure-emacs/cider/pull/3375): `cider-test`: don't render a newline between expected and actual, most times. - Improve `nrepl-dict` error reporting. +- Bump the injected `piggieback` to [0.5.3](https://github.com/nrepl/piggieback/blob/0.5.3/CHANGES.md#053-2021-10-26). - Bump the injected `cider-nrepl` to [0.35](https://github.com/clojure-emacs/cider-nrepl/blob/v0.35.0/CHANGELOG.md#0350-2023-08-09). - Improves indentation, font-locking and other metadata support for ClojureScript. - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.14.2/CHANGELOG.md) diff --git a/cider.el b/cider.el index c180790361..bf26024425 100644 --- a/cider.el +++ b/cider.el @@ -472,7 +472,7 @@ your version of Boot or Leiningen is bundling an older one." "List of dependencies where elements are lists of artifact name and version. Added to `cider-jack-in-dependencies' when doing `cider-jack-in-cljs'.") (put 'cider-jack-in-cljs-dependencies 'risky-local-variable t) -(cider-add-to-alist 'cider-jack-in-cljs-dependencies "cider/piggieback" "0.5.2") +(cider-add-to-alist 'cider-jack-in-cljs-dependencies "cider/piggieback" "0.5.3") (defvar cider-jack-in-dependencies-exclusions nil "List of exclusions for jack in dependencies.
[nongnu] elpa/helm-core updated (b8e9509490 -> 497f479ec1)
elpasync pushed a change to branch elpa/helm-core. from b8e9509490 Ask for confirmation before running actions on packages adds a13a3e7907 Error message with outdated package list when installing adds 2f16aa8d4e Docstring only adds dfb1d02e5b New file NEWS.org adds 497f479ec1 Bump to 3.9.4 No new revisions were added by this update. Summary of changes: NEWS.org | 51 +++ helm-core.el | 2 +- helm-packages.el | 11 +-- helm.el | 4 ++-- 4 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 NEWS.org
[nongnu] elpa/cider 856a35cf97 15/15: Don't lose the CIDER session over TRAMP files
branch: elpa/cider commit 856a35cf97f0709e0e0e10b9b79d0cc345b13c70 Author: vemv Commit: vemv Don't lose the CIDER session over TRAMP files Fixes https://github.com/clojure-emacs/cider/issues/3250 --- CHANGELOG.md | 1 + cider-connection.el| 2 ++ test/cider-common-tests.el | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efd32c4c1a..7196c4c277 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - [#3402](https://github.com/clojure-emacs/cider/issues/3402): fix `cider-format-connection-params` edge case for Emacs 29. - [#3393](https://github.com/clojure-emacs/cider/issues/3393): Recompute namespace info on each shadow-cljs recompilation or evaluation. - Recompute namespace info on each fighweel-main recompilation. +- [#3250](https://github.com/clojure-emacs/cider/issues/3250): don't lose the CIDER session over TRAMP files. - Fix the `xref-find-definitions` CIDER backend to return correct filenames. - Fix the `cider-xref-fn-deps` buttons to direct to the right file. - Make TRAMP functionality work when using non-standard ports. diff --git a/cider-connection.el b/cider-connection.el index 765d915ced..9c0c093508 100644 --- a/cider-connection.el +++ b/cider-connection.el @@ -624,6 +624,8 @@ REPL defaults to the current REPL." (when (string-match-p "#uzip" file) (let ((avfs-path (directory-file-name (expand-file-name (or (getenv "AVFSBASE") "~/.avfs/") (setq file (replace-regexp-in-string avfs-path "" file t t +(when-let ((tp (cider-tramp-prefix (current-buffer + (setq file (string-remove-prefix tp file))) (when (process-live-p proc) (let* ((classpath (or (process-get proc :cached-classpath) (let ((cp (with-current-buffer repl diff --git a/test/cider-common-tests.el b/test/cider-common-tests.el index 92df2bbe71..de2d25e1b6 100644 --- a/test/cider-common-tests.el +++ b/test/cider-common-tests.el @@ -72,7 +72,7 @@ (expect (cider-make-tramp-prefix "ssh" "cider-devs" "192.168.50.9#22") :to-equal "/ssh:cider-devs@192.168.50.9#22:") (expect (cider-make-tramp-prefix "ssh" "cider-devs" "192.168.50.9") - :to-equal "/ssh:cider-devs@192.168.50.9#22:") + :to-equal "/ssh:cider-devs@192.168.50.9:") (expect (cider-make-tramp-prefix "ssh" "cider-devs" "192.168.50.9" "12345") :to-equal "/ssh:cider-devs@192.168.50.9#12345:") (expect (cider-make-tramp-prefix "ssh" "cider-devs" "192.168.50.9#12345")
[nongnu] elpa/cider 9e4bce60d9 13/15: Add a Dockerfile for TRAMP development purposes
branch: elpa/cider commit 9e4bce60d946f6f677ae515b65a6734af26280cc Author: vemv Commit: vemv Add a Dockerfile for TRAMP development purposes --- dev/sample-project/Dockerfile | 61 ++ dev/sample-project/Makefile| 10 +++ dev/sample-project/README.md | 17 dev/sample-project/project.clj | 5 dev/sample-project/src/foo.clj | 3 +++ 5 files changed, 96 insertions(+) diff --git a/dev/sample-project/Dockerfile b/dev/sample-project/Dockerfile new file mode 100644 index 00..01890c1c70 --- /dev/null +++ b/dev/sample-project/Dockerfile @@ -0,0 +1,61 @@ +# Use an official Clojure runtime as a parent image +FROM clojure:temurin-17-lein-bullseye + +# Set environment variables to non-interactive (this prevents some prompts) +ENV DEBIAN_FRONTEND=noninteractive + +# Define environment variable for nREPL port +ENV NREPL_PORT=7888 + +RUN apt-get update \ +&& apt-get install -y openssh-server locales \ +&& mkdir /var/run/sshd + +RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ +locale-gen +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +RUN locale-gen en_US.UTF-8 +RUN locale-gen en en_US en_US.UTF-8 +RUN dpkg-reconfigure locales + +# Set root password +RUN echo 'root:cider' | chpasswd + +RUN sed -i 's/^#* *PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config +RUN sed -i 's/^#* *PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config +RUN sed -i 's/^#* *ChallengeResponseAuthentication .*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config + +# SSH login fix. Otherwise user is kicked off after login +RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd + +# Expose SSH port +EXPOSE 22 + +CMD ["/usr/sbin/sshd", "-D"] + +# Set the working directory in the docker image +WORKDIR /usr/src/app + +# Copy the current directory contents into the directory at /usr/src/app in the image +COPY . /usr/src/app + +# Install any needed packages specified in project.clj +RUN lein deps + +# Forward all relevant env vars for ssh sessions +RUN echo "export JAVA_HOME=${JAVA_HOME}" >> /root/.bashrc +RUN echo "export LEIN_HOME=${LEIN_HOME}" >> /root/.bashrc +RUN echo "export LEIN_JAVA_CMD=${LEIN_JAVA_CMD}" >> /root/.bashrc +RUN echo "export LEIN_JVM_OPTS=${LEIN_JVM_OPTS}" >> /root/.bashrc +RUN echo "export LEIN_ROOT=${LEIN_ROOT}" >> /root/.bashrc +RUN echo "export NREPL_PORT=${NREPL_PORT}" >> /root/.bashrc +RUN echo "export PATH=${PATH}" >> /root/.bashrc + +# Make port 7888 available to the world outside this container (nREPL default port) +#EXPOSE 7888 + +# Run lein repl when the container launches, on port defined by NREPL_PORT +#CMD ["lein", "repl", ":headless", ":host", "0.0.0.0", ":port", "7888"] diff --git a/dev/sample-project/Makefile b/dev/sample-project/Makefile new file mode 100644 index 00..d2487db65e --- /dev/null +++ b/dev/sample-project/Makefile @@ -0,0 +1,10 @@ +build: + DOCKER_BUILDKIT=0 docker build --no-cache -t cider-tramp-dev . + +run: build + docker run -p 7888:7888 -p 8022:22 cider-tramp-dev + +ssh: + ssh-keygen -R "[localhost]:8022" + echo "Password is: cider" + ssh root@localhost -p 8022 diff --git a/dev/sample-project/README.md b/dev/sample-project/README.md new file mode 100644 index 00..c731ed072d --- /dev/null +++ b/dev/sample-project/README.md @@ -0,0 +1,17 @@ +This project spins up a Clojure project within a Docker image. + +The Docker image exposes a SSH server. + +This way, for development purposes, we can SSH into it with TRAMP and exercise CIDER's TRAMP-related capabilities. + +To get started: + +* In one terminal tab, run `make run` to run the Docker image +* Once it's ready, from another tab, run `make ssh` + * The password is `cider` + * `cd /usr/src/app; lein repl :headless :host 0.0.0.0 :port 7888` + +Now, from emacs you can `cider-connect` to localhost. + +* `M-:`, `(dired "/sshx:root@localhost#8022:/usr/src/app")` +* `M-x cider-connect` (choose `localhost`, `7888`) diff --git a/dev/sample-project/project.clj b/dev/sample-project/project.clj new file mode 100644 index 00..a57ba3a938 --- /dev/null +++ b/dev/sample-project/project.clj @@ -0,0 +1,5 @@ +(defproject cider-tramp-dev "0" + :dependencies [[org.clojure/clojure "1.11.1"] + [clj-http "3.12.3"]] + :source-paths ["src"] + :plugins [[cider/cider-nrepl "0.35.0"]]) diff --git a/dev/sample-project/src/foo.clj b/dev/sample-project/src/foo.clj new file mode 100644 index 00..e5a730e664 --- /dev/null +++ b/dev/sample-project/src/foo.clj @@ -0,0 +1,3 @@ +(ns foo + (:require + [clj-http.client :as client]))
[nongnu] elpa/cider f3f7d83bb1 02/15: Use `it` more
branch: elpa/cider commit f3f7d83bb1a56098f96a0c7cedcc12465572eb9c Author: vemv Commit: Bozhidar Batsov Use `it` more This ensures their execution is displayed on CI. --- test/cider-connection-tests.el | 4 +-- test/cider-doc-tests.el| 30 ++--- test/cider-jar-test.el | 60 +++--- test/cider-test-tests.el | 19 ++--- 4 files changed, 66 insertions(+), 47 deletions(-) diff --git a/test/cider-connection-tests.el b/test/cider-connection-tests.el index d4c6ea9a21..a397d5a8c1 100644 --- a/test/cider-connection-tests.el +++ b/test/cider-connection-tests.el @@ -434,7 +434,7 @@ (sesman-unregister 'CIDER session)) (describe "cider-format-connection-params" - (describe "correctly abbreviates short directory names" + (it "correctly abbreviates short directory names" (expect (cider-format-connection-params "%J" '(:project-dir "~")) :to-equal "~") (expect (cider-format-connection-params "%j" '(:project-dir "~")) @@ -470,7 +470,7 @@ (expect 'y-or-n-p :to-have-been-called-times 3))) (describe "cider-compatible-middleware-version-p" - (describe "correctly check compatible required and middleware versions" + (it "correctly checks compatible required and middleware versions" (expect (cider--compatible-middleware-version-p "0.24.0" "0.24.1") :to-be t) (expect (cider--compatible-middleware-version-p "0.24.1" "0.23.2") diff --git a/test/cider-doc-tests.el b/test/cider-doc-tests.el index 586a893e7c..f4b680064f 100644 --- a/test/cider-doc-tests.el +++ b/test/cider-doc-tests.el @@ -29,12 +29,24 @@ (require 'cider-doc) (describe "cider--abbreviate-file-protocol" - (expect (cider--abbreviate-file-protocol "file:foo.clj") - :to-equal - "foo.clj") - (expect (cider--abbreviate-file-protocol "jar:file:/root/.m2/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj") - :to-equal - "clojure/core.clj") - (expect (cider--abbreviate-file-protocol "zip:file:/root/.m2/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj") - :to-equal - "clojure/core.clj")) + (it "Removes the file or jar part" +(expect (cider--abbreviate-file-protocol "file:foo.clj") +:to-equal +"foo.clj") +(expect (cider--abbreviate-file-protocol "jar:file:/root/.m2/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj") +:to-equal +"clojure/core.clj") +(expect (cider--abbreviate-file-protocol "zip:file:/root/.m2/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj") +:to-equal +"clojure/core.clj") +(expect (format-spec "*cider-repl %s(%r:%S)*" + (list '(115 . "ClojureProjects/PPL:localhost:36453") + '(104 . "localhost") + '(72 . "") + '(112 . 36453) + '(106 . "PPL") + '(74 . "ClojureProjects/PPL") + '(114 . clj) + '(83 . ""))) +:to-equal +"*cider-repl ClojureProjects/PPL:localhost:36453(clj:)*"))) diff --git a/test/cider-jar-test.el b/test/cider-jar-test.el index fb567f1f84..e639ebd2dd 100644 --- a/test/cider-jar-test.el +++ b/test/cider-jar-test.el @@ -30,43 +30,49 @@ (require 'map) (describe "cider-jar--cider-nrepl-clojars-url" - (expect (cider-jar-clojars-url "cider" "cider-nrepl" "0.1.2") - :to-equal - "https://repo.clojars.org/cider/cider-nrepl/0.1.2/cider-nrepl-0.1.2.jar";)) + (it "Builds a Clojars url" +(expect (cider-jar-clojars-url "cider" "cider-nrepl" "0.1.2") +:to-equal + "https://repo.clojars.org/cider/cider-nrepl/0.1.2/cider-nrepl-0.1.2.jar";))) (describe "cider-jar-ensure-cider-nrepl-jar" - (expect (cider-jar-find-or-fetch "cider" "cider-nrepl" "0.20.0") - :to-match - (rx "cider-cache/repo.clojars.org/cider/cider-nrepl/0.20.0/cider-nrepl-0.20.0.jar"))) + (it "Builds a path" +(expect (cider-jar-find-or-fetch "cider" "cider-nrepl" "0.20.0") +:to-match +(rx "cider-cache/repo.clojars.org/cider/cider-nrepl/0.20.0/cider-nrepl-0.20.0.jar" (describe "cider-jar-contents" - (expect - (cider-jar-contents (cider-jar-find-or-fetch "cider" "cider-nrepl" "0.20.0")) - :to-contain - "cider/nrepl.clj")) + (it "Has reasonable contents" +(expect + (cider-jar-contents (cider-jar-find-or-fetch "cider" "cider-nrepl" "0.20.0")) + :to-contain + "cider/nrepl.clj"))) (describe "cider-jar-contents-cached" - (expect - (map-elt (cider-jar-contents-cached (cider-jar-find-or-fetch "cider" "cider-nrepl" "0.20.0")) -"cider/nrepl.clj") - :to-be t)) + (it "Has reasonable contents" +(expect + (map-elt (cider-jar-
[nongnu] elpa/cider 74472b120b 06/15: Cover `cider-format-connection-params`
branch: elpa/cider commit 74472b120b90fe3055e623e27da8e0f7be8ed6d5 Author: vemv Commit: Bozhidar Batsov Cover `cider-format-connection-params` --- test/cider-connection-tests.el | 18 ++ 1 file changed, 18 insertions(+) diff --git a/test/cider-connection-tests.el b/test/cider-connection-tests.el index 803035b386..f30ce7e9bc 100644 --- a/test/cider-connection-tests.el +++ b/test/cider-connection-tests.el @@ -487,3 +487,21 @@ :to-be t) (expect (cider--compatible-middleware-version-p "1.25.3" "1.25.2-alpha2") :to-be t))) + +(describe "cider-format-connection-params" + (it "Generates a pretty string. `:repl-type' can be symbol." ;; https://github.com/clojure-emacs/cider/issues/3402 +(expect (cider-format-connection-params nrepl-repl-buffer-name-template nil) +:to-equal "*cider-repl ~/project:localhost:(unknown)*") +(expect (cider-format-connection-params nrepl-repl-buffer-name-template '(:host "localhost" + :port 12345 + :project-dir "/Users/me/myproject" + :repl-type clj + :cljs-repl-type shadow)) +:to-equal "*cider-repl me/myproject:localhost:12345(clj)*") + +(expect (cider-format-connection-params nrepl-repl-buffer-name-template '(:host "localhost" + :port 12345 + :project-dir "/Users/me/myproject" + :repl-type cljs + :cljs-repl-type shadow)) +:to-equal "*cider-repl me/myproject:localhost:12345(cljs:shadow)*")))
[nongnu] elpa/cider 012e3fe71f 14/15: Make TRAMP functionality work when using non-standard ports
branch: elpa/cider commit 012e3fe71fef324856db74d26a29b239c3eceb88 Author: vemv Commit: vemv Make TRAMP functionality work when using non-standard ports --- CHANGELOG.md | 1 + cider-common.el| 8 +--- test/cider-common-tests.el | 8 +++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 530f7ca036..efd32c4c1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Recompute namespace info on each fighweel-main recompilation. - Fix the `xref-find-definitions` CIDER backend to return correct filenames. - Fix the `cider-xref-fn-deps` buttons to direct to the right file. +- Make TRAMP functionality work when using non-standard ports. ### Changes diff --git a/cider-common.el b/cider-common.el index 90a7382a5d..4225a5434b 100644 --- a/cider-common.el +++ b/cider-common.el @@ -226,8 +226,8 @@ create a valid path." (match-string 1 filename) filename))) -(defun cider-make-tramp-prefix (method user host) - "Constructs a Tramp file prefix from METHOD, USER, HOST. +(defun cider-make-tramp-prefix (method user host &optional port) + "Constructs a Tramp file prefix from METHOD, USER, HOST, PORT. It originated from Tramp's `tramp-make-tramp-file-name'. The original be forced to make full file name with `with-parsed-tramp-file-name', not providing prefix only option." @@ -240,6 +240,8 @@ prefix only option." (if (string-match tramp-ipv6-regexp host) (concat tramp-prefix-ipv6-format host tramp-postfix-ipv6-format) host)) + (when port +(concat "#" port)) tramp-postfix-host-format)) (defun cider-tramp-prefix (&optional buffer) @@ -253,7 +255,7 @@ if BUFFER is local." (when (tramp-tramp-file-p name) (with-parsed-tramp-file-name name v (with-no-warnings - (cider-make-tramp-prefix v-method v-user v-host)) + (cider-make-tramp-prefix v-method v-user v-host v-port)) (defun cider--client-tramp-filename (name &optional buffer) "Return the tramp filename for path NAME relative to BUFFER. diff --git a/test/cider-common-tests.el b/test/cider-common-tests.el index b918811b72..92df2bbe71 100644 --- a/test/cider-common-tests.el +++ b/test/cider-common-tests.el @@ -68,9 +68,15 @@ (describe "cider-make-tramp-prefix" (it "returns tramp-prefix only" - ;;; The third parameter is a host. It must contains a port number. + ;;; The third parameter is a host. (expect (cider-make-tramp-prefix "ssh" "cider-devs" "192.168.50.9#22") :to-equal "/ssh:cider-devs@192.168.50.9#22:") + (expect (cider-make-tramp-prefix "ssh" "cider-devs" "192.168.50.9") + :to-equal "/ssh:cider-devs@192.168.50.9#22:") + (expect (cider-make-tramp-prefix "ssh" "cider-devs" "192.168.50.9" "12345") + :to-equal "/ssh:cider-devs@192.168.50.9#12345:") + (expect (cider-make-tramp-prefix "ssh" "cider-devs" "192.168.50.9#12345") + :to-equal "/ssh:cider-devs@192.168.50.9#12345:") ;;; These two cases are for using ssh config alias. (expect (cider-make-tramp-prefix "ssh" nil "test.cider.com") :to-equal "/ssh:test.cider.com:")
[nongnu] elpa/cider f14c8de037 12/15: Describe `cider-locate-running-nrepl-ports`
branch: elpa/cider commit f14c8de03736b1849ea4413534639dfe6e9f745e Author: vemv Commit: vemv Describe `cider-locate-running-nrepl-ports` --- test/cider-tests.el | 13 + 1 file changed, 13 insertions(+) diff --git a/test/cider-tests.el b/test/cider-tests.el index b804211598..ac63645bb5 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -701,4 +701,17 @@ ;; kill server (delete-process (get-buffer-process client-buffer))) +(describe "cider-locate-running-nrepl-ports" + (it "Concatenates values from different sources" +(spy-on 'file-exists-p :and-return-value t) +(spy-on 'cider--running-lein-nrepl-paths :and-return-value '(("lein" "1234"))) +(spy-on 'cider--running-local-nrepl-paths :and-return-value '(("local" "2345"))) +(spy-on 'cider--running-non-lein-nrepl-paths :and-return-value '(("non-lein" "3456"))) +(spy-on 'clojure-project-dir :and-return-value #'identity) +(spy-on 'cider--path->path-port-pairs :and-return-value '(("from-dir" "4567"))) +(spy-on 'directory-file-name :and-call-fake #'identity) +(spy-on 'file-name-nondirectory :and-call-fake #'identity) +(expect (cider-locate-running-nrepl-ports "from-dir") +:to-equal '(("from-dir" "4567") ("lein" "1234") ("local" "2345") ("non-lein" "3456") + ;;; cider-tests.el ends here
[nongnu] elpa/helm dfb1d02e5b 3/4: New file NEWS.org
branch: elpa/helm commit dfb1d02e5be9cac063f154faa1bed8991ca7b91a Author: Thierry Volpiatto Commit: Thierry Volpiatto New file NEWS.org --- NEWS.org | 51 +++ 1 file changed, 51 insertions(+) diff --git a/NEWS.org b/NEWS.org new file mode 100644 index 00..ff166bab54 --- /dev/null +++ b/NEWS.org @@ -0,0 +1,51 @@ +#+STARTUP:showall + +* NEWS + +** Version 3.9.4 + +*** Add two new alists to allow extending completions-detailed + +This allows providing detailed completions in more places, see +`helm-completing-read-extra-metadata` and +`helm-completing-read-command-categories`. +They are not provided as user variables as it may be tricky to provide +the corresponding affixations functions. +As of now we have detailed completions in +describe-function/variable/symbol/command/package, +find-function/variable, switch-to-buffer, +customize-variable/group, package-(vc)install, package-vc-checkout. + +*** New helm packages manager + +The old helm-elisp-package has been replaced by helm-packages. +The old one was too slow, taking lot of memory and even crashing Emacs +especially with last Emacs-29. + +** Version 3.9.3 + +*** Ensure to use affixation functions provided by caller in helm-mode + +** Version 3.9.2 + +*** New progress bar for Rsync action from helm-find-files +*** Describe-* commands with completions-detailed are now fast +*** Use Wfnames package as dependency to replace Wdired + +** Version 3.9.1 + +*** helm-config file has been removed + +Therefore (require 'helm-config) will return an error, don't use this +anymore. If installing from source use instead (require 'helm-autoloads), otherwise from a package install, the autoloads file +will be automatically loaded. + + +*** Allow using helm-completion-styles-alist by command + +*** New mode for editing large vars + +Will be used automatically when using the set variable action from +helm-apropos. + +*** Improve all-the-icons in many places
[elpa] externals/org 933d282881 3/9: Fix Emacs 27 false-positive warnings
branch: externals/org commit 933d2828812084ca8f8eff72699dcd025fff88de Author: Ihor Radchenko Commit: Ihor Radchenko Fix Emacs 27 false-positive warnings * lisp/org-element-ast.el (org-element--plist-property): Shield annoying warning spam with `with-no-warnings'. The warnings are not present in newer Emacs. * lisp/org-element.el (org-element--interpret-affiliated-keywords): Suppress warning about two token unused `_' arguments. * lisp/org-id.el (org-id-find-id-in-file): Suppress warning about number of arguments. --- lisp/org-element-ast.el | 10 -- lisp/org-element.el | 2 +- lisp/org-id.el | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/org-element-ast.el b/lisp/org-element-ast.el index c845be26b4..e829474189 100644 --- a/lisp/org-element-ast.el +++ b/lisp/org-element-ast.el @@ -393,12 +393,18 @@ Ignore standard property array." (`plain-text (or (get-text-property 0 ,property ,node) (when ,dflt - (if (plist-member (text-properties-at 0 ,node) ,property) + (if + ;; FIXME: Byte-compiler throws false positives in Emacs 27. + (with-no-warnings +(plist-member (text-properties-at 0 ,node) ,property)) nil ,dflt (_ (or (plist-get (nth 1 ,node) ,property) (when ,dflt - (if (plist-member (nth 1 ,node) ,property) + (if + ;; FIXME: Byte-compiler throws false positives in Emacs 27. + (with-no-warnings +(plist-member (nth 1 ,node) ,property)) nil ,dflt (define-inline org-element-property-raw (property node &optional dflt) diff --git a/lisp/org-element.el b/lisp/org-element.el index f197e34a94..69a62a2f5c 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -5219,7 +5219,7 @@ If there is no affiliated keyword, return the empty string." ;; cannot belong to the property list. (let (acc) (org-element-properties-mapc -(lambda (prop _ _) +(lambda (prop _ __) (let ((keyword (upcase (substring (symbol-name prop) 1 (when (or (string-match-p "^ATTR_" keyword) (and diff --git a/lisp/org-id.el b/lisp/org-id.el index d09c61b066..c11fa9a2d1 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -678,8 +678,8 @@ optional argument MARKERP, return the position as a new marker." (buffer (or visiting (if markerp (find-file-noselect file) (if (<= 2 (cdr (func-arity #'get-buffer-create))) - (get-buffer-create " *Org ID temp*" t) - ;; Emacs 27 does not yet have second argument. + (with-no-warnings (get-buffer-create " *Org ID temp*" t)) + ;; FIXME: Emacs 27 does not yet have second argument. (get-buffer-create " *Org ID temp*")) (unwind-protect (with-current-buffer buffer
[nongnu] elpa/cider 60aaf2cf44 01/15: Remove unused `provide`s in tests
branch: elpa/cider commit 60aaf2cf445fb3cf951bdaf5b35080e5e61987cb Author: vemv Commit: Bozhidar Batsov Remove unused `provide`s in tests These can be confusing. --- test/cider-eval-test.el | 2 -- test/cider-jar-test.el| 4 +--- test/cider-locals-tests.el| 1 - test/cider-overlay-tests.el | 1 - test/cider-tests.el | 2 -- test/integration/integration-tests.el | 2 -- 6 files changed, 1 insertion(+), 11 deletions(-) diff --git a/test/cider-eval-test.el b/test/cider-eval-test.el index 24f8419634..23cff5ee75 100644 --- a/test/cider-eval-test.el +++ b/test/cider-eval-test.el @@ -46,5 +46,3 @@ (with-temp-file filename (insert "🍻")) (expect (cider-provide-file filename) :to-equal "8J+Nuw==" - -(provide 'cider-eval-tests) diff --git a/test/cider-jar-test.el b/test/cider-jar-test.el index 21c7f66c08..fb567f1f84 100644 --- a/test/cider-jar-test.el +++ b/test/cider-jar-test.el @@ -69,6 +69,4 @@ "{dbg cider.nrepl.middleware.debug/debug-reader break cider.nrepl.middleware.debug/breakpoint-reader light cider.nrepl.middleware.enlighten/light-reader} -")) - -(provide 'cider-jar-test) +"))) diff --git a/test/cider-locals-tests.el b/test/cider-locals-tests.el index fd508c6010..423d781a74 100644 --- a/test/cider-locals-tests.el +++ b/test/cider-locals-tests.el @@ -140,5 +140,4 @@ ("a" "b" "the-ns") (cider--read-locals-from-arglist -(provide 'cider-locals-tests) ;;; cider-locals-tests.el ends here diff --git a/test/cider-overlay-tests.el b/test/cider-overlay-tests.el index 72d8a0020d..57fdca85ac 100644 --- a/test/cider-overlay-tests.el +++ b/test/cider-overlay-tests.el @@ -227,5 +227,4 @@ being set that way" (setq overlay-position (mapcar #'overlay-start (overlays-at (point-min (expect overlay-position :to-equal nil -(provide 'cider-overlay-tests) ;;; cider-overlay-tests.el ends here diff --git a/test/cider-tests.el b/test/cider-tests.el index 80c70ff855..16f7107b52 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -699,6 +699,4 @@ ;; kill server (delete-process (get-buffer-process client-buffer))) -(provide 'cider-tests) - ;;; cider-tests.el ends here diff --git a/test/integration/integration-tests.el b/test/integration/integration-tests.el index 6ed8eef6a8..7f7a970ea2 100644 --- a/test/integration/integration-tests.el +++ b/test/integration/integration-tests.el @@ -548,7 +548,5 @@ If CLI-COMMAND is nil, then use the default." (cider-itu-poll-until (not (eq (process-status nrepl-proc) 'run)) 15) (expect (member (process-status nrepl-proc) '(exit signal))) -(provide 'integration-tests) - ;;; integration-tests.el ends here
[nongnu] elpa/helm 2f16aa8d4e 2/4: Docstring only
branch: elpa/helm commit 2f16aa8d4e771af83381554da6c73f1e4b928175 Author: Thierry Volpiatto Commit: Thierry Volpiatto Docstring only --- helm-packages.el | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helm-packages.el b/helm-packages.el index f1f810db92..03597d30d2 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -148,7 +148,12 @@ as dependencies." ;;;###autoload (defun helm-packages (&optional arg) - "Helm interface to list packages." + "Helm interface to manage packages. + +With a prefix arg ARG refresh package list. + +When installing ensure to refresh the package list to avoid errors with outdated +packages no more availables." (interactive "P") (package-initialize) (when arg
[nongnu] elpa/cider 9d1c3cd203 08/15: fix `cider-format-connection-params` edge case for Emacs 29
branch: elpa/cider commit 9d1c3cd203eb298e3785779c924407e31bc7f5c7 Author: vemv Commit: Bozhidar Batsov fix `cider-format-connection-params` edge case for Emacs 29 Fixes https://github.com/clojure-emacs/cider/issues/3402 --- CHANGELOG.md | 1 + cider-connection.el| 16 +++- test/cider-connection-tests.el | 26 -- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4c8cfcd4b..13241e7846 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - [#3331](https://github.com/clojure-emacs/cider/issues/3331): `cider-eval`: never jump to spurious locations, as sometimes conveyed by nREPL. - [#3112](https://github.com/clojure-emacs/cider/issues/3112): Fix the CIDER `xref-find-references` backend to return correct filenames. - [#3393](https://github.com/clojure-emacs/cider/issues/3393): recompute namespace info on each shadow-cljs recompilation or evaluation. +- [#3402](https://github.com/clojure-emacs/cider/issues/3402): fix `cider-format-connection-params` edge case for Emacs 29. - Fix the `xref-find-definitions` CIDER backend to return correct filenames. - Fix the `cider-xref-fn-deps` buttons to direct to the right file. diff --git a/cider-connection.el b/cider-connection.el index 9ada652292..765d915ced 100644 --- a/cider-connection.el +++ b/cider-connection.el @@ -720,6 +720,19 @@ Fallback on `cider' command." (plist-put :session-name ses-name) (plist-put :repl-buffer r))) +(defun cider--ensure-spec-is-not-invokable (spec) + "Ensures SPEC cannot be invoked as a function. + +Invokeable specs are an Emacs 29 feature +that we don't intend to use in this context." + (let ((spec-char (car spec)) +(spec-value (cdr spec))) +`(,spec-char + . + ,(if (symbolp spec-value) + (prin1-to-string spec-value) + spec-value + (defun cider-format-connection-params (template params) "Format PARAMS with TEMPLATE string. The following formats can be used in TEMPLATE string: @@ -771,7 +784,8 @@ removed." (?S . ,cljs-repl-type))) (ses-name (or (plist-get params :session-name) (format-spec cider-session-name-template specs))) - (specs (append `((?s . ,ses-name)) specs))) + (specs (append `((?s . ,ses-name)) specs)) + (specs (mapcar #'cider--ensure-spec-is-not-invokable specs))) (thread-last (format-spec template specs) ;; remove extraneous separators diff --git a/test/cider-connection-tests.el b/test/cider-connection-tests.el index f30ce7e9bc..def21d5ebc 100644 --- a/test/cider-connection-tests.el +++ b/test/cider-connection-tests.el @@ -488,15 +488,20 @@ (expect (cider--compatible-middleware-version-p "1.25.3" "1.25.2-alpha2") :to-be t))) +(defun cider-connection-tests-dummy-function (a b c d) + "A B C D." + ;; See https://github.com/clojure-emacs/cider/issues/3402 + (error "I should never be invoked!")) + (describe "cider-format-connection-params" (it "Generates a pretty string. `:repl-type' can be symbol." ;; https://github.com/clojure-emacs/cider/issues/3402 (expect (cider-format-connection-params nrepl-repl-buffer-name-template nil) :to-equal "*cider-repl ~/project:localhost:(unknown)*") -(expect (cider-format-connection-params nrepl-repl-buffer-name-template '(:host "localhost" - :port 12345 - :project-dir "/Users/me/myproject" - :repl-type clj - :cljs-repl-type shadow)) +(expect (cider-format-connection-params nrepl-repl-buffer-name-template '(:host "localhost" + :port 12345 + :project-dir "/Users/me/myproject" + :repl-type clj + :cljs-repl-type shadow)) :to-equal "*cider-repl me/myproject:localhost:12345(clj)*") (expect (cider-format-connection-params nrepl-repl-buffer-name-template '(:host "localhost" @@ -504,4 +509,13 @@ :project-dir "/Users/me/myproject" :repl-type cljs :cljs-repl-type shadow)) -:to-e
[nongnu] elpa/cider aa516693bd 07/15: Run test suite on Emacs 29
branch: elpa/cider commit aa516693bdeff47fed8e8485f2d8b3a149fd118a Author: vemv Commit: Bozhidar Batsov Run test suite on Emacs 29 --- .circleci/config.yml | 10 ++ .github/workflows/test.yml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 37160e78ca..140e967b53 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,6 +76,13 @@ jobs: steps: - setup - test + test-ubuntu-emacs-29: +docker: + - image: silex/emacs:29-ci +entrypoint: bash +steps: + - setup + - test test-ubuntu-emacs-master: docker: @@ -123,6 +130,9 @@ workflows: - test-ubuntu-emacs-28: requires: - test-lint + - test-ubuntu-emacs-29: + requires: +- test-lint - test-ubuntu-emacs-master: requires: - test-lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e51ec25c2..3d2907cb0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] -emacs_version: ['26.3', '27.2', '28.2'] +emacs_version: ['26.3', '27.2', '28.2', '29.1'] steps: - name: Set up Emacs
[nongnu] elpa/cider updated (e28fe55d55 -> 856a35cf97)
elpasync pushed a change to branch elpa/cider. from e28fe55d55 Add a Makefile new 60aaf2cf44 Remove unused `provide`s in tests new f3f7d83bb1 Use `it` more new 1f426a4ac8 Settle on `*tests.el` naming new 00f765b800 Add a standard header suggesting `it` blocks new ff98bc7df2 Bump some copyright years new 74472b120b Cover `cider-format-connection-params` new aa516693bd Run test suite on Emacs 29 new 9d1c3cd203 fix `cider-format-connection-params` edge case for Emacs 29 new 34f1bfc377 Bump the injected Piggieback to 0.5.3 new 363b8e9eb2 Recompute namespace info on each fighweel-main recompilation new 093f79cf09 Check `.nrepl-port`-like files for liveness new f14c8de037 Describe `cider-locate-running-nrepl-ports` new 9e4bce60d9 Add a Dockerfile for TRAMP development purposes new 012e3fe71f Make TRAMP functionality work when using non-standard ports new 856a35cf97 Don't lose the CIDER session over TRAMP files Summary of changes: .circleci/config.yml | 10 +++ .github/workflows/test.yml | 2 +- CHANGELOG.md | 7 +++ cider-common.el | 8 ++- cider-connection.el | 18 +- cider-repl.el| 27 +++- cider.el | 2 +- dev/sample-project/Dockerfile| 61 ++ dev/sample-project/Makefile | 10 +++ dev/sample-project/README.md | 17 + dev/sample-project/project.clj | 5 ++ dev/sample-project/src/foo.clj | 3 + nrepl-client.el | 16 +++-- test/cider-apropos-tests.el | 2 + test/cider-browse-ns-tests.el| 2 + test/cider-browse-spec-tests.el | 2 + test/cider-classpath-tests.el| 2 + test/cider-client-tests.el | 2 + test/cider-clojuredocs-tests.el | 2 + test/cider-common-tests.el | 10 ++- test/cider-connection-tests.el | 38 ++- test/cider-debug-tests.el| 2 + test/cider-doc-tests.el | 32 +++--- test/cider-eldoc-tests.el| 2 + test/cider-error-parsing-tests.el| 2 + test/{cider-eval-test.el => cider-eval-tests.el} | 4 +- test/cider-find-tests.el | 2 + test/cider-font-lock-tests.el| 1 + test/cider-interaction-tests.el | 2 + test/cider-jar-test.el | 74 -- test/cider-jar-tests.el | 80 test/cider-locals-tests.el | 3 +- test/{cider-log-test.el => cider-log-tests.el} | 2 + test/cider-ns-tests.el | 2 + test/cider-overlay-tests.el | 3 +- test/cider-repl-tests.el | 2 + test/cider-selector-tests.el | 2 + test/cider-stacktrace-tests.el | 2 + test/cider-test-tests.el | 21 --- test/cider-tests--no-auto.el | 2 + test/cider-tests.el | 15 - test/cider-util-tests.el | 2 + test/integration/integration-test-utils.el | 2 +- test/integration/integration-tests.el| 7 +-- test/nrepl-bencode-tests.el | 2 + test/nrepl-client-tests.el | 2 + test/nrepl-dict-tests.el | 2 + 47 files changed, 399 insertions(+), 119 deletions(-) create mode 100644 dev/sample-project/Dockerfile create mode 100644 dev/sample-project/Makefile create mode 100644 dev/sample-project/README.md create mode 100644 dev/sample-project/project.clj create mode 100644 dev/sample-project/src/foo.clj rename test/{cider-eval-test.el => cider-eval-tests.el} (94%) delete mode 100644 test/cider-jar-test.el create mode 100644 test/cider-jar-tests.el rename test/{cider-log-test.el => cider-log-tests.el} (95%)
[elpa] externals/corfu 78a97db72f: Expand docstrings and documentation
branch: externals/corfu commit 78a97db72f9eef3d523b77f1777f946b4c7c5508 Author: Daniel Mendler Commit: Daniel Mendler Expand docstrings and documentation --- corfu.el | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/corfu.el b/corfu.el index 5d06612dc2..16221d945a 100644 --- a/corfu.el +++ b/corfu.el @@ -78,7 +78,7 @@ The value should lie between 0 and corfu-count/2." (defcustom corfu-continue-commands ;; nil is undefined command '(nil ignore universal-argument universal-argument-more digit-argument -"\\`corfu-" "\\`scroll-other-window") +"\\`corfu-" "\\`scroll-other-window") "Continue Corfu completion after executing these commands." :type '(repeat (choice regexp symbol))) @@ -361,8 +361,10 @@ completion backend in use is expensive." (defun corfu--capf-wrapper (fun &optional prefix) "Wrapper for `completion-at-point' FUN. -The wrapper determines if the Capf is applicable at the current position -and performs sanity checking on the returned result. PREFIX is a prefix +The wrapper determines if the Capf is applicable at the current +position and performs sanity checking on the returned result. +For non-exclusive Capfs wrapper additionally checks if the +current input can be completed successfully. PREFIX is a prefix length override, set to t for manual completion." (pcase (funcall fun) ((and res `(,beg ,end ,table . ,plist)) @@ -756,7 +758,12 @@ FRAME is the existing frame." (overlay-put corfu--preview-ov (if (= beg end) 'after-string 'display) cand))) (defun corfu--continue-p () - "Continue completion?" + "Check if completion should be continued after a command. +Corfu bails out if the currently selected buffer changed +unexpectedly, if point moved to an unexpected position, if the +input doesn't satisfy the `completion-in-region-mode--predicate' +or if the last invoked command is not listed in +`corfu-continue-commands'." (pcase-let ((pt (point)) (buf (current-buffer)) (`(,beg ,end . ,_) completion-in-region--data)) @@ -1064,6 +1071,10 @@ A scroll bar is displayed from LO to LO+BAR." ;; Ensure that state is initialized before next Corfu command (when (and (symbolp this-command) (string-prefix-p "corfu-" (symbol-name this-command))) (corfu--update)) + ;; If the next command is not listed in `corfu-continue-commands', insert the + ;; currently selected candidate and bail out of completion. This way you can + ;; continue typing after selecting a candidate. The candidate will be inserted + ;; and your new input will be appended. (when (and (eq corfu-preview-current 'insert) (/= corfu--index corfu--preselect) ;; See the comment about `overriding-local-map' in `corfu--post-command'.
[elpa] externals/denote-menu updated (8cc5ee37a1 -> dca339b904)
elpasync pushed a change to branch externals/denote-menu. from 8cc5ee37a1 update README to include new filter function new 655c9ef1f9 denote-menu-list-denotes now kills any pre-existing buffer new dca339b904 give denote-menu buffers better names Summary of changes: denote-menu.el | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-)
[elpa] externals/org 7cc208af91 2/3: org-agenda: Do not err on SCHEDULED/DEADLINE with inactive timestamp
branch: externals/org commit 7cc208af91fc948b9e7739acecafcf179cad56a0 Author: Ihor Radchenko Commit: Ihor Radchenko org-agenda: Do not err on SCHEDULED/DEADLINE with inactive timestamp * lisp/org-agenda.el (org-agenda-get-deadlines): (org-agenda-get-scheduled): Ignore SCHEDULED/DEADLINE set to inactive timestamps. Previously, an error would be thrown. Reported-by: Christian Barthel Link: https://orgmode.org/list/875y5tlouo.fsf@localhost --- lisp/org-agenda.el | 10 ++ 1 file changed, 10 insertions(+) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 57cddcfe9e..0f61d75bba 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6335,6 +6335,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 @@ -6536,6 +6541,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
[elpa] externals/org d560a2d739 1/3: org-lint-invalid-id-link: Only update ID locations if there are ID links
branch: externals/org commit d560a2d7394cc9b016eade35360350023684448e Author: Ihor Radchenko Commit: Ihor Radchenko org-lint-invalid-id-link: Only update ID locations if there are ID links * lisp/org-lint.el (org-lint-invalid-id-link): Avoid running `org-id-update-id-locations' when there are no ID links in the linted file. --- lisp/org-lint.el | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/lisp/org-lint.el b/lisp/org-lint.el index d0f6994215..7a9195cb63 100644 --- a/lisp/org-lint.el +++ b/lisp/org-lint.el @@ -585,18 +585,23 @@ Use :header-args: instead" path) (defun org-lint-invalid-id-link (ast) - (org-id-update-id-locations nil t) - (org-element-map ast 'link -(lambda (link) - (let ((id (org-element-property :path link))) - (and (equal (org-element-property :type link) "id") - ;; The locations are up-to-date with file changes after - ;; the call to `org-id-update-id-locations'. We do not - ;; need to double-check if recorded ID is still present - ;; in the file. -(not (org-id-find-id-file id)) -(list (org-element-begin link) - (format "Unknown ID \"%s\"" id))) + (let ((id-locations-updated nil)) +(org-element-map ast 'link + (lambda (link) +(let ((id (org-element-property :path link))) + (and (equal (org-element-property :type link) "id") + (progn + (unless id-locations-updated + (org-id-update-id-locations nil t) + (setq id-locations-updated t)) + t) + ;; The locations are up-to-date with file changes after + ;; the call to `org-id-update-id-locations'. We do not + ;; need to double-check if recorded ID is still present + ;; in the file. + (not (org-id-find-id-file id)) + (list (org-element-begin link) +(format "Unknown ID \"%s\"" id (defun org-lint-confusing-brackets (ast) (org-element-map ast 'link
[elpa] externals/denote-menu 655c9ef1f9 1/2: denote-menu-list-denotes now kills any pre-existing buffer
branch: externals/denote-menu commit 655c9ef1f9a268f501bd7a417c7627830d8da644 Author: Mohamed Suliman Commit: Mohamed Suliman denote-menu-list-denotes now kills any pre-existing buffer Kills any *Denote* buffers before setting up a new one. This is needed for the workaround mentioned in issue #11 to work. --- denote-menu.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/denote-menu.el b/denote-menu.el index 5e75c09bdb..8c9ddbad84 100644 --- a/denote-menu.el +++ b/denote-menu.el @@ -92,6 +92,9 @@ denote file corresponding to the button." (defun denote-menu-list-notes () "Display list of Denote files in variable `denote-directory'." (interactive) + ;; kill any existing *Denote* buffer + (when (get-buffer "*Denote*") + (kill-buffer "*Denote*")) (let ((buffer (get-buffer-create "*Denote*"))) (with-current-buffer buffer (setq buffer-file-coding-system 'utf-8)
[elpa] externals/denote-menu dca339b904 2/2: give denote-menu buffers better names
branch: externals/denote-menu commit dca339b9041805b9eb8b9a91f3a8e89682df1a05 Author: Mohamed Suliman Commit: Mohamed Suliman give denote-menu buffers better names Now denote-menu buffers follow the format of "*Denote* ". --- denote-menu.el | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/denote-menu.el b/denote-menu.el index 8c9ddbad84..b3f13e7f85 100644 --- a/denote-menu.el +++ b/denote-menu.el @@ -93,15 +93,16 @@ denote file corresponding to the button." "Display list of Denote files in variable `denote-directory'." (interactive) ;; kill any existing *Denote* buffer - (when (get-buffer "*Denote*") - (kill-buffer "*Denote*")) - (let ((buffer (get-buffer-create "*Denote*"))) -(with-current-buffer buffer - (setq buffer-file-coding-system 'utf-8) - (setq denote-menu-current-regex denote-menu-initial-regex) - (denote-menu-mode)) + (let ((denote-menu-buffer-name (format "*Denote %s*" denote-directory))) +(when (get-buffer denote-menu-buffer-name) + (kill-buffer "*Denote*")) +(let ((buffer (get-buffer-create denote-menu-buffer-name))) + (with-current-buffer buffer +(setq buffer-file-coding-system 'utf-8) +(setq denote-menu-current-regex denote-menu-initial-regex) +(denote-menu-mode)) -(pop-to-buffer-same-window buffer))) + (pop-to-buffer-same-window buffer (defalias 'list-denotes 'denote-menu-list-notes "Alias of `denote-menu-list-notes' command.")
[nongnu] elpa/cider 3e54af31ff: Use cider-nrepl 0.35.1
branch: elpa/cider commit 3e54af31ffec5468a250daa2624b4344eea4e564 Author: vemv Commit: vemv Use cider-nrepl 0.35.1 --- CHANGELOG.md | 5 ++- cider.el | 2 +- .../ROOT/pages/basics/middleware_setup.adoc| 10 ++--- doc/modules/ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- test/cider-tests.el| 44 +++--- 6 files changed, 34 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7196c4c277..c2f01421cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ - [#3375](https://github.com/clojure-emacs/cider/pull/3375): `cider-test`: don't render a newline between expected and actual, most times. - Improve `nrepl-dict` error reporting. - Bump the injected `piggieback` to [0.5.3](https://github.com/nrepl/piggieback/blob/0.5.3/CHANGES.md#053-2021-10-26). -- Bump the injected `cider-nrepl` to [0.35](https://github.com/clojure-emacs/cider-nrepl/blob/v0.35.0/CHANGELOG.md#0350-2023-08-09). +- Bump the injected `cider-nrepl` to [0.35.1](https://github.com/clojure-emacs/cider-nrepl/blob/v0.35.1/CHANGELOG.md#0351-2023-08-18). - Improves indentation, font-locking and other metadata support for ClojureScript. - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.14.2/CHANGELOG.md) - introduces support for displaying the docstring and arglists of 'indirect' vars (e.g. `(def foo bar)`) for Clojure/Script. @@ -48,7 +48,8 @@ - Updates [Suitable](https://github.com/clojure-emacs/clj-suitable/blob/v0.5.0/CHANGELOG.md#050-2023-07-28) - avoiding side-effecting `->` evaluation for pure-ClojureScript chains. - Updates [Compliment](https://github.com/alexander-yakushev/compliment/blob/0.4.0/CHANGELOG.md#040-2023-07-05) -- Supports better completions for var-quote (`#'some/var`) . +- Supports better completions for var-quote (`#'some/var`). + - Updates [Haystack](https://github.com/clojure-emacs/haystack/blob/v0.1.0/CHANGELOG.md#010). ## 1.7.0 (2023-03-23) diff --git a/cider.el b/cider.el index bf26024425..068e539016 100644 --- a/cider.el +++ b/cider.el @@ -489,7 +489,7 @@ the artifact.") (defconst cider-latest-clojure-version "1.10.1" "Latest supported version of Clojure.") -(defconst cider-required-middleware-version "0.35.0" +(defconst cider-required-middleware-version "0.35.1" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 8ddd83b558..2ebd3fcbe3 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,7 +32,7 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] -:plugins [[cider/cider-nrepl "0.35.0"] +:plugins [[cider/cider-nrepl "0.35.1"] [mx.cider/enrich-classpath "x.y.z"]] @@ -46,7 +46,7 @@ A minimal `profiles.clj` for CIDER would be: [source,clojure] -{:repl {:plugins [[cider/cider-nrepl "0.35.0"] +{:repl {:plugins [[cider/cider-nrepl "0.35.1"] [mx.cider/enrich-classpath "1.9.0"]]}} @@ -67,7 +67,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.35.0"]]) + concat '[[cider/cider-nrepl "0.35.1"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -84,11 +84,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.35.0"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.35.1"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} -cider/cider-nrepl {:mvn/version "0.35.0"} +cider/cider-nrepl {:mvn/version "0.35.1"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 3dd4b90cc5..4818ee983d 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -67,7 +67,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `t
[elpa] externals/org 3cbd9f4233 3/3: org-lint: New checker for SCHEDULED/DEADLINE with inactive timestamp
branch: externals/org commit 3cbd9f423385bf725dc964a5cff573bba17db3ff Author: Ihor Radchenko Commit: Ihor Radchenko org-lint: New checker for SCHEDULED/DEADLINE with inactive timestamp * lisp/org-lint.el (org-lint-inactive-planning): Add new checker. Link: https://orgmode.org/list/875y5tlouo.fsf@localhost --- lisp/org-lint.el | 17 + 1 file changed, 17 insertions(+) diff --git a/lisp/org-lint.el b/lisp/org-lint.el index 7a9195cb63..5114902942 100644 --- a/lisp/org-lint.el +++ b/lisp/org-lint.el @@ -1436,6 +1436,19 @@ AST is the buffer parse tree." (unless (equal expected actual) (list (org-element-property :begin timestamp) (format "Potentially malformed timestamp %s. Parsed as: %s" actual expected))) +(defun org-lint-inactive-planning (ast) + "Report inactive timestamp in SCHEDULED/DEADLINE. +AST is the buffer parse tree." + (org-element-map ast 'planning +(lambda (planning) + (let ((scheduled (org-element-property :scheduled planning)) +(deadline (org-element-property :deadline planning))) +(cond + ((memq (org-element-property :type scheduled) '(inactive inactive-range)) + (list (org-element-begin planning) "Inactive timestamp in SCHEDULED will not appear in agenda.")) + ((memq (org-element-property :type deadline) '(inactive inactive-range)) + (list (org-element-begin planning) "Inactive timestamp in DEADLINE will not appear in agenda.")) + (t nil)) ;;; Checkers declaration @@ -1706,6 +1719,10 @@ AST is the buffer parse tree." "Report malformed timestamps." #'org-lint-timestamp-syntax :categories '(timestamp) :trust 'low) +(org-lint-add-checker 'planning-inactive + "Report inactive timestamps in SCHEDULED/DEADLINE." + #'org-lint-inactive-planning + :categories '(timestamp) :trust 'high) (provide 'org-lint)
[elpa] externals/org updated (83fd03fb6d -> 3cbd9f4233)
elpasync pushed a change to branch externals/org. from 83fd03fb6d org-attach: Fix when called from agenda new d560a2d739 org-lint-invalid-id-link: Only update ID locations if there are ID links new 7cc208af91 org-agenda: Do not err on SCHEDULED/DEADLINE with inactive timestamp new 3cbd9f4233 org-lint: New checker for SCHEDULED/DEADLINE with inactive timestamp Summary of changes: lisp/org-agenda.el | 10 ++ lisp/org-lint.el | 46 ++ 2 files changed, 44 insertions(+), 12 deletions(-)
[elpa] externals/brief 3ab763445b: * brief.el: Misc simplifications and silence some compiler warnings
branch: externals/brief commit 3ab763445b841319cd23c06e48b90bfb3be289a8 Author: Stefan Monnier Commit: Stefan Monnier * brief.el: Misc simplifications and silence some compiler warnings Test `emacs-major-version` rather than `emacs-version`. Replace `(cl-eval-when (compile load eval)` with `eval-and-compile`. Move macro definitions outside of `eval-and-compile`. Fix docstrings' use of the quote character to silence compiler warnings. (brief--bookmark-jump-wrapper): Rename from `bookmark-jump-wrapper`. (brief-select-enable-primary, brief-select-enable-clipboard): Set their default value according to `brief-is-winnt` so we don't need to re-check `brief-is-winnt` every time we use them. (brief-kill-current-buffer): Remove gymnastics around `text-scale-mode-amount` and use the form of code recognized by the bytecompiler instead. (brief--deleted-frame-param): Follow conventional style in docstring. (move-to-column): Remove backward compatibility for Emacs<19.29. (line-number-at-pos): Don't install advice during compilation. --- brief.el | 287 ++- 1 file changed, 120 insertions(+), 167 deletions(-) diff --git a/brief.el b/brief.el index 4ea46c1983..7dd8c2f6d0 100644 --- a/brief.el +++ b/brief.el @@ -444,7 +444,7 @@ unresolved ;; Some advised function causing arguments count change, ignore them redefine)) - (if (version< emacs-version "25.0") + (if (< emacs-major-version 25) (setq byte-compile-warnings (append byte-compile-warnings '(free-vars callargs) ;;(eval-when-compile (require 'cl-lib)) @@ -481,34 +481,39 @@ (defvar brief-selection-op-legacy nil) -(cl-eval-when (compile load eval) +(defmacro brief-is-x () + `(eq (framep (selected-frame)) 'x)) - (defmacro brief-is-x () -`(eq (framep (selected-frame)) 'x)) +(defmacro brief-is-terminal () + `(eq (framep (selected-frame)) 't)) - (defmacro brief-is-terminal () -`(eq (framep (selected-frame)) 't)) +(defmacro brief-is-winnt () + `(or (eq system-type 'windows-nt) ;; Is there a terminal mode Emacs for winnt? + (eq (framep (selected-frame)) 'w32) ;; Win64 Emacs still return w32 + (eq (framep (selected-frame)) 'w64))) ;; for future, just in case - (defmacro brief-is-winnt () -`(or (eq system-type 'windows-nt) ;; Is there a terminal mode Emacs for winnt? - (eq (framep (selected-frame)) 'w32) ;; Win64 Emacs still return w32 - (eq (framep (selected-frame)) 'w64))) ;; for future, just in case +;; FIXME: Can we drop support for Emacs<24? +(defmacro brief-input-pending-p () + (if (< emacs-major-version 24) + `(input-pending-p) +`(input-pending-p t))) - (defmacro brief-input-pending-p () -(if (version< emacs-version "24.0") -`(input-pending-p) - `(input-pending-p t))) +(defmacro brief--bookmark-jump-wrapper (bmk func regionp) + ;; A wrapper to ignore arguments + (if (< emacs-major-version 24) + `(bookmark-jump ,bmk ,func) +`(bookmark-jump ,bmk ,func ,regionp))) +(eval-when-compile ;; Define macros for all cases, byte-compilation, interpreting, or loading. - (if (and (version< emacs-version "25.1") - ;; in case some backward compatibility layer already loaded - (not (fboundp 'save-mark-and-excursion))) + (if (not (fboundp 'save-mark-and-excursion)) (defmacro save-mark-and-excursion (&rest body) "A backward compatibility macro for Emacs version below 25.1. This macro behaves exactly like `save-excursion' before Emacs 25.1. After Emacs 25.1 `save-excursion' no longer save mark and point." -`(save-excursion ,@body))) +`(save-excursion ,@body +(eval-and-compile ;; Emacs <= v25 (unless (boundp 'inhibit-message) (defvar inhibit-message nil)) @@ -525,7 +530,7 @@ process." '(run open listen connect stop) ;; Backward compatibility functions for Emacs23 - (when (version< emacs-version "24.0") + (when (< emacs-major-version 24) (if (and (not (fboundp 'x-get-selection-value)) (fboundp 'x-get-selection)) @@ -555,15 +560,8 @@ If FILE1 or FILE2 does not exist, the return value is unspecified." chars))) c - (if (version< emacs-version "24.0") - ;; a wrapper function to ignore arguments - (defmacro bookmark-jump-wrapper (bmk func _regionp) -`(bookmark-jump ,bmk ,func)) -(defmacro bookmark-jump-wrapper (bmk func regionp) - `(bookmark-jump ,bmk ,func ,regionp))) - ;; Selection/clipboard related functions and variables - (when (version< emacs-version "25.1") + (when (< emacs-major-version 25) ;;(unless (boundp 'saved-region-selection) ;; Legacy code for XEmacs ;; (defvar saved-region-selection nil)) @@ -693,7 +691,7 @@ Also, under terminal mode it can't actually get the slowdown." (t (se
[elpa] externals/denote-menu ceb67d2d5e: fix typo
branch: externals/denote-menu commit ceb67d2d5e72df60681d298e3e95133af3950372 Author: Mohamed Suliman Commit: Mohamed Suliman fix typo --- denote-menu.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/denote-menu.el b/denote-menu.el index b3f13e7f85..ff9d351c38 100644 --- a/denote-menu.el +++ b/denote-menu.el @@ -95,7 +95,7 @@ denote file corresponding to the button." ;; kill any existing *Denote* buffer (let ((denote-menu-buffer-name (format "*Denote %s*" denote-directory))) (when (get-buffer denote-menu-buffer-name) - (kill-buffer "*Denote*")) + (kill-buffer denote-menu-buffer-name)) (let ((buffer (get-buffer-create denote-menu-buffer-name))) (with-current-buffer buffer (setq buffer-file-coding-system 'utf-8)
[elpa] externals/emms c68448c497 3/4: Depreciate point-at-*.
branch: externals/emms commit c68448c497b75d9362a9f3ab87765984df8f5d3a Author: Yoni Rabkin Commit: Yoni Rabkin Depreciate point-at-*. --- emms-browser.el | 16 emms-librefm-scrobbler.el | 20 ++-- emms-librefm-stream.el| 4 ++-- emms-metaplaylist-mode.el | 14 +++--- emms-playlist-mode.el | 8 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/emms-browser.el b/emms-browser.el index e0dcc41ac7..cefa91b645 100644 --- a/emms-browser.el +++ b/emms-browser.el @@ -936,7 +936,7 @@ Uses `emms-browser-alpha-sort-function'." (defun emms-browser-bdata-at-point () "Return the bdata object at point. Includes information at point (such as album name), and metadata." - (get-text-property (point-at-bol) + (get-text-property (line-beginning-position) 'emms-browser-bdata)) (defun emms-browser-data-at-point () @@ -1063,14 +1063,14 @@ If there is no more subitems to expand, collapse the current node." Stops at the next line at the same level, or EOF." (when (emms-browser-subitems-visible) (let ((current-level (emms-browser-level-at-point)) - (next-line (point-at-bol 2))) + (next-line (line-beginning-position 2))) (emms-with-inhibit-read-only-t (delete-region next-line (save-excursion (while (emms-browser-find-entry-more-than-level current-level)) -(point-at-bol 2))) +(line-beginning-position 2))) ;; -- ;; Dealing with the playlist (queuing songs, etc) @@ -1161,8 +1161,8 @@ After expanding, jump to the currently marked entry." (save-excursion (emms-browser-find-top-level) (emms-with-inhibit-read-only-t - (add-text-properties (point-at-bol) - (point-at-eol) + (add-text-properties (line-beginning-position) + (line-end-position) (list 'emms-browser-mark t) (defun emms-browser-pop-mark () @@ -1174,8 +1174,8 @@ After expanding, jump to the currently marked entry." (progn (goto-char pos) (emms-with-inhibit-read-only-t - (remove-text-properties (point-at-bol) - (point-at-eol) + (remove-text-properties (line-beginning-position) + (line-end-position) (list 'emms-browser-mark (message "No mark saved!" @@ -1207,7 +1207,7 @@ Return point. If at level one, return the current point." (when (emms-browser-subitems-visible) (emms-browser-kill-subitems)) (emms-with-inhibit-read-only-t - (goto-char (point-at-bol)) + (goto-char (line-beginning-position)) (kill-line 1)) (unless (eq (emms-browser-bdata-level child-bdata) 1) ;; remove the node from the parent, and recurse diff --git a/emms-librefm-scrobbler.el b/emms-librefm-scrobbler.el index 3b97f00fb3..ebb6aed544 100644 --- a/emms-librefm-scrobbler.el +++ b/emms-librefm-scrobbler.el @@ -151,27 +151,27 @@ TOKEN is :user of :secret." (error "response not a buffer")) (with-current-buffer resbuf (goto-char (point-min)) -(when (not (re-search-forward "^.*200 OK$" (point-at-eol) t)) +(when (not (re-search-forward "^.*200 OK$" (line-end-position) t)) (error "bad HTTP server response")) ;; go to the start of the FM response (when (not (re-search-forward "\n\n" (point-max) t)) (error "bad FM server response")) -(let ((status (buffer-substring (point-at-bol) - (point-at-eol +(let ((status (buffer-substring (line-beginning-position) + (line-end-position (when (not (string= status "OK")) (error "FM server returned: %s" status)) (let (session-id now-playing-url submission-url) (forward-line 1) - (setq session-id (buffer-substring (point-at-bol) - (point-at-eol))) + (setq session-id (buffer-substring (line-beginning-position) + (line-end-position))) (forward-line 1) - (setq now-playing-url (buffer-substring (point-at-bol) - (point-at-eol))) + (setq now-playing-url (buffer-substring (line-beginning-position) + (line-end-position))) (forward-line 1) - (setq submission-url (buffer-substring (point-at-bol) - (point-at-eol))) + (setq submission-url (buffer-substring (line-beginning-position) + (line-end-p
[elpa] externals/emms 4567938c2c 4/4: * emms-mode-line.el: place declaration before interactive calls
branch: externals/emms commit 4567938c2c4182ba1ad01e7b3133d32a10095fb5 Author: Yoni Rabkin Commit: Yoni Rabkin * emms-mode-line.el: place declaration before interactive calls --- emms-mode-line.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emms-mode-line.el b/emms-mode-line.el index dc28bf2761..404453f04b 100644 --- a/emms-mode-line.el +++ b/emms-mode-line.el @@ -93,8 +93,8 @@ ;;;###autoload (defun emms-mode-line-enable () "Turn on `emms-mode-line'." - (interactive) (declare (obsolete emms-mode-line-mode "Apr 2021")) + (interactive) (emms-mode-line-mode 1)) ;;;###autoload @@ -106,8 +106,8 @@ ;;;###autoload (defun emms-mode-line-toggle () "Toggle `emms-mode-line'." - (interactive) (declare (obsolete emms-mode-line-mode "Apr 2021")) + (interactive) (emms-mode-line-mode 'toggle)) (defun emms-mode-line-alter (&optional track)
[elpa] externals/emms updated (8ad5cf981b -> 4567938c2c)
elpasync pushed a change to branch externals/emms. from 8ad5cf981b Version 16 released. new 06e44f2854 Add info support for SNES SPC files. new 675fba101a Escape single quotes in documentation strings. new c68448c497 Depreciate point-at-*. new 4567938c2c * emms-mode-line.el: place declaration before interactive calls Summary of changes: AUTHORS | 1 + emms-browser.el | 59 ++--- emms-info-native.el | 12 +- emms-info-spc.el | 95 +++ emms-librefm-scrobbler.el | 20 +- emms-librefm-stream.el| 4 +- emms-lyrics.el| 20 +- emms-metaplaylist-mode.el | 14 +++ emms-mode-line.el | 4 +- emms-player-mpd.el| 4 +- emms-player-mpv.el| 68 - emms-playlist-limit.el| 14 +++ emms-playlist-mode.el | 8 ++-- emms-tag-editor.el| 18 - emms.el | 6 +-- 15 files changed, 226 insertions(+), 121 deletions(-) create mode 100644 emms-info-spc.el
[elpa] externals/emms 06e44f2854 1/4: Add info support for SNES SPC files.
branch: externals/emms commit 06e44f28541ceb050252fa29ad1889c64f97a67f Author: Yoni Rabkin Commit: Yoni Rabkin Add info support for SNES SPC files. Code by Warren Wilkinson. --- AUTHORS | 1 + emms-info-native.el | 10 +- emms-info-spc.el| 95 + emms.el | 2 +- 4 files changed, 106 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 282a1a5677..e7ba653f49 100644 --- a/AUTHORS +++ b/AUTHORS @@ -34,6 +34,7 @@ Tassilo Horn Thierry Volpiatto Trent Buck Ulrik Jensen +Warren Wilkinson William Xu Ye Wenbin Yoni (Johnathan) Rabkin diff --git a/emms-info-native.el b/emms-info-native.el index 3e3e2d48f7..e17df9126a 100644 --- a/emms-info-native.el +++ b/emms-info-native.el @@ -1,6 +1,6 @@ ;;; emms-info-native.el --- Native Emacs Lisp info method for EMMS -*- lexical-binding: t; -*- -;; Copyright (C) 2020-2021 Free Software Foundation, Inc. +;; Copyright (C) 2020-2023 Free Software Foundation, Inc. ;; Author: Petteri Hintsanen @@ -51,6 +51,10 @@ ;; encryption are not supported. Based on id3v2 Informal Standards, ;; see URL `https://id3.org'. ;; +;; - SPC files with extension `.spc' and id666 tags. This is an audio +;; file based on a memory dump from an SPC700, a special audio chip +;; found within Super Nintendos. +;; ;; Format detection is based solely on filename extension, which is ;; matched case-insensitively. @@ -59,6 +63,7 @@ (require 'bindat) (require 'cl-lib) (require 'emms-info) +(require 'emms-info-spc) (require 'seq) (require 'subr-x) @@ -954,6 +959,8 @@ strings." (emms-info-native--decode-flac-comments filename)) ((eq stream-type 'mp3) (emms-info-native--decode-id3v2 filename)) + ((eq stream-type 'spc) + (emms-info-spc--decode-id666 filename)) (t nil (defun emms-info-native--find-stream-type (filename) @@ -967,6 +974,7 @@ Return one of symbols `vorbis', `opus', `flac', or `mp3'." ((string-match ".opus$" filename) 'opus) ((string-match ".flac$" filename) 'flac) ((string-match ".mp3$" filename) 'mp3) + ((string-match ".spc$" filename) 'spc) (t nil (provide 'emms-info-native) diff --git a/emms-info-spc.el b/emms-info-spc.el new file mode 100644 index 00..fd092a52d0 --- /dev/null +++ b/emms-info-spc.el @@ -0,0 +1,95 @@ +;;; emms-info-spc.el --- Native Emacs Lisp info method for EMMS -*- lexical-binding: t; -*- + +;; Copyright (C) 2023 Free Software Foundation, Inc. + +;; Author: Warren Wilkinson + +;; This file is part of EMMS. + +;; EMMS 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, or (at your option) +;; any later version. + +;; EMMS 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 EMMS; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301, USA. + +;;; Commentary: + +;; This file provides a native emms-info-method for SPC files. (well, +;; actually the id666 tag embedded inside them). "Native" means a pure +;; Emacs Lisp implementation instead of one relying on external tools +;; or libraries. + +;;; Code: + +(require 'bindat) + +(defconst emms-info-spc--id666-magic-array + [#x53 #x4e #x45 #x53 #x2d #x53 #x50#x43 #x37 #x30 #x30 #x20 #x53 #x6f #x75 #x6e #x64 #x20 #x46 #x69 #x6c #x65 #x20 #x44 #x61 #x74 #x61 #x20 #x76 #x30 #x2e #x33 #x30] + "id666 header magic pattern `SNES-SPC700 Sound File Data v0.30'") + +(defconst emms-info-spc--id666-header-bindat-spec + '((file-identifier vec 33) +(eval (unless (equal last emms-info-spc--id666-magic-array) +(error "id666 framing mismatch: expected `%s', got `%s'" + emms-info-spc--id666-magic-array + last))) +(unused u16) +(has-id666 u8) +(revision u8) +(pc-reg u16) +(a-reg u8) +(x-reg u8) +(y-reg u8) +(psw-reg u8) +(sp-reg u8) +(res-reg u16) +(song-title strz 32) +(game-title strz 32) +(dumper strz 16) +(comment strz 32) +(date strz 11) +(fadeout vec 3) +(fadeout-length vec 5) +(artist strz 32)) + "id666 header specification. + +Sources: + +- URL `https://ocremix.org/info/SPC_Format_Specification' +- URL `https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html'") + +(defun emms-info-spc--decode-id666-header (filename) + "Read and decode id666 header from FILENAME." + (with-tem
[elpa] externals/emms 675fba101a 2/4: Escape single quotes in documentation strings.
branch: externals/emms commit 675fba101a075c412c31e991b66dadc67a45e55d Author: Yoni Rabkin Commit: Yoni Rabkin Escape single quotes in documentation strings. This is to avoid compilation warnings post Emacs 29.1. --- emms-browser.el| 43 +++ emms-info-native.el| 2 +- emms-lyrics.el | 20 +++ emms-player-mpd.el | 4 +-- emms-player-mpv.el | 68 +- emms-playlist-limit.el | 14 +-- emms-tag-editor.el | 18 ++--- emms.el| 4 +-- 8 files changed, 87 insertions(+), 86 deletions(-) diff --git a/emms-browser.el b/emms-browser.el index 0b334aba48..e0dcc41ac7 100644 --- a/emms-browser.el +++ b/emms-browser.el @@ -364,7 +364,7 @@ Called once for each directory." (make-variable-buffer-local 'emms-browser-top-level-hash) (defvar emms-browser-top-level-type nil - "The current mapping type, eg. 'info-artist.") + "The current mapping type, eg. \\='info-artist.") (make-variable-buffer-local 'emms-browser-top-level-type) (defvar emms-browser-current-indent nil @@ -587,10 +587,10 @@ This function can be used as (defun emms-browser-get-track-field-albumartist (track type) "Return TYPE from TRACK with an albumartist-oriented heuristic. -For 'info-artist TYPE, use 'info-albumartistsort, 'info-albumartist, -'info-artistsort. -For 'info-year TYPE, use 'info-originalyear, 'info-originaldate and -'info-date symbols." +For \\='info-artist TYPE, use \\='info-albumartistsort, +\\='info-albumartist, \\='info-artistsort. +For \\='info-year TYPE, use \\='info-originalyear, \\='info-originaldate and +\\='info-date symbols." (cond ((eq type 'info-artist) (or (emms-track-get track 'info-albumartist) (emms-track-get track 'info-albumartistsort) @@ -701,7 +701,8 @@ browser, and hit 'b 1' to refresh."))) (defun emms-browser-next-mapping-type (current-mapping) "Return the next sensible mapping. -Eg. if CURRENT-MAPPING is currently 'info-artist, return 'info-album." +Eg. if CURRENT-MAPPING is currently \\='info-artist, return + \\='info-album." (cond ((eq current-mapping 'info-artist) 'info-album) ((eq current-mapping 'info-composer) 'info-album) @@ -720,7 +721,7 @@ Eg. if CURRENT-MAPPING is currently 'info-artist, return 'info-album." (defun emms-browser-make-bdata-tree-recurse (type level tracks) "Build a tree of alists based on a list of tracks, TRACKS. -For example, if TYPE is 'info-year, return an alist like: +For example, if TYPE is \\='info-year, return an alist like: artist1 -> album1 -> *track* 1.." (let* ((next-type (emms-browser-next-mapping-type type)) (next-level (1+ level)) @@ -778,8 +779,8 @@ return an empty string." discnum))) (defun emms-browser-year-number (track) - "Return a string representation of a track's year. -This will be in the form '(1998) '." + "Return a string representation of a track\\='s year. +This will be in the form \\='(1998) \\='." (let ((year (emms-track-get-year track))) (if (or (not (stringp year)) (string= year "0")) "" @@ -800,7 +801,7 @@ If no duration is available, return an empty string." "Return a browser data item from ALIST. DATA should be a list of DB items, or a list of tracks. NAME is a name for the DB item. -TYPE is a category the data is organised by, such as 'info-artist. +TYPE is a category the data is organised by, such as \\='info-artist. LEVEL is the number of the sublevel the db item will be placed in." (list (cons 'type type) (cons 'level level) @@ -809,7 +810,7 @@ LEVEL is the number of the sublevel the db item will be placed in." (defun emms-browser-make-alist (type tracks) "Make an alist mapping of TYPE -> TRACKS. -Items with no metadata for TYPE will be placed in 'misc'" +Items with no metadata for TYPE will be placed in \\='misc\\='" (let (db key existing tracknum) (dolist (track tracks) (setq key (emms-browser-get-track-field track type)) @@ -831,8 +832,8 @@ Items with no metadata for TYPE will be placed in 'misc'" (defun emms-browser-make-sorted-alist (type tracks) "Return a sorted alist of TRACKS. -TYPE is the metadata to make the alist by - eg. if it's -'info-artist, an alist of artists will be made." +TYPE is the metadata to make the alist by - eg. if it\\='s +\\='info-artist, an alist of artists will be made." (emms-browser-sort-alist (emms-browser-make-alist type tracks) type)) @@ -2067,10 +2068,10 @@ If the track is not of TYPE, return t." width nor height exceed this dimension.") (defun emms-browser-thumbnail-filter-default (dir) - "Select covers containing 'front' or 'cover' in DIR. -If none was found, fallback on `emms-browser-thumbnail-filter-all'. + "Select covers containing \\='front\\=' or \\='cover\\=' in DIR. +If none was found, fallback on `emms-browser-thumbnail-filter-all\\='. -See `emms-browser-thumbnail-filter'." +
[elpa] externals/cape updated (758b45d133 -> 5914a87844)
elpasync pushed a change to branch externals/cape. from 758b45d133 Rename and expand docstring new f5364cd145 Add cape-wrap-debug and cape-capf-debug new ebac3e2eab Add cape--debug-length new 545f6d9023 cape-wrap-debug: Minor cleanup new be4379ba2c cape-wrap-debug: Always print the current input new 9bba4a80e2 cape-wrap-debug: Add optional NAME argument new 087e9818b4 Improve cape-wrap-debug new 8a68ff3dc4 Improve cape-wrap-debug new 5914a87844 cape-wrap-debug: Simplify Summary of changes: CHANGELOG.org | 4 +++ README.org| 12 +--- cape.el | 88 +++ 3 files changed, 100 insertions(+), 4 deletions(-)
[elpa] externals/cape f5364cd145 1/8: Add cape-wrap-debug and cape-capf-debug
branch: externals/cape commit f5364cd1455fae83885092a32ab74e90a177c419 Author: Daniel Mendler Commit: Daniel Mendler Add cape-wrap-debug and cape-capf-debug --- CHANGELOG.org | 4 README.org| 12 cape.el | 61 +++ 3 files changed, 73 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 26a1636e02..8eb108dab6 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -2,6 +2,10 @@ #+author: Daniel Mendler #+language: en +* Development + +- Add =cape-wrap-debug= and =cape-capf-debug= to add debug messages to a Capf. + * Version 0.17 (2023-08-14) - Bugfixes. diff --git a/README.org b/README.org index f70a0f6cf2..5a0b2836d4 100644 --- a/README.org +++ b/README.org @@ -252,6 +252,7 @@ the Capf transformers with =defalias= to a function symbol. - ~cape-interactive-capf~, ~cape-interactive~: Create a Capf which can be called interactively. - ~cape-wrap-accept-all~, ~cape-capf-accept-all~: Create a Capf which accepts every input as valid. +- ~cape-wrap-debug~, ~cape-capf-debug~: Create a Capf which prints debugging messages. - ~cape-wrap-silent~, ~cape-capf-silent~: Wrap a chatty Capf and silence it. - ~cape-wrap-purify~, ~cape-capf-purify~: Purify a broken Capf and ensure that it does not modify the buffer. - ~cape-wrap-nonexclusive~, ~cape-capf-nonexclusive:~ Mark Capf as non-exclusive. @@ -279,11 +280,14 @@ personal configuration. (setq-local completion-at-point-functions (list (cape-capf-prefix-length #'cape-dabbrev 2))) -;; Example 3: Named Capf +;; Example 3: Create a Capf with debugging messages +(setq-local completion-at-point-functions (list (cape-capf-debug #'cape-dict))) + +;; Example 4: Named Capf (defalias 'cape-dabbrev-min-2 (cape-capf-prefix-length #'cape-dabbrev 2)) (setq-local completion-at-point-functions (list #'cape-dabbrev-min-2)) -;; Example 4: Define a defensive Dabbrev Capf, which accepts all inputs. If you +;; Example 5: Define a defensive Dabbrev Capf, which accepts all inputs. If you ;; use Corfu and `corfu-auto=t', the first candidate won't be auto selected if ;; `corfu-preselect=valid', such that it cannot be accidentally committed when ;; pressing RET. @@ -291,12 +295,12 @@ personal configuration. (cape-wrap-accept-all #'cape-dabbrev)) (add-to-list 'completion-at-point-functions #'my-cape-dabbrev-accept-all) -;; Example 5: Define interactive Capf which can be bound to a key. Here we wrap +;; Example 6: Define interactive Capf which can be bound to a key. Here we wrap ;; the `elisp-completion-at-point' such that we can complete Elisp code ;; explicitly in arbitrary buffers. (keymap-global-set "C-c p e" (cape-interactive-capf #'elisp-completion-at-point)) -;; Example 6: Ignore :keywords in Elisp completion. +;; Example 7: Ignore :keywords in Elisp completion. (defun ignore-elisp-keywords (sym) (not (keywordp sym))) (setq-local completion-at-point-functions diff --git a/cape.el b/cape.el index fe45aa2abd..0ae93c0190 100644 --- a/cape.el +++ b/cape.el @@ -203,6 +203,45 @@ BODY is the wrapping expression." (let ((default-directory dir) (non-essential t)) +(defun cape--debug-print (obj &optional full) + "Print OBJ as string, truncate lists if FULL is nil." + (cond + ((symbolp obj) (symbol-name obj)) + ((functionp obj) "#") + ((and (consp obj) (ignore-errors (length obj))) +(concat + "(" + (string-join (mapcar #'cape--debug-print (if full obj (take 5 obj))) " ") + (if (and (not full) (length> obj 5)) " ...)" ")"))) + (t (let ((print-level 2)) +(prin1-to-string obj) + +(defun cape--debug-table (table name) + "Create completion TABLE with debug messages. +NAME is the name of the Capf." + ;; TODO reuse `cape--wrapped-table' + (lambda (str pred action) +(let ((result (complete-with-action action table str pred))) + (if (and (eq action 'completion--unquote) (functionp (cadr result))) + (cl-callf cape--debug-table (cadr result) name) +(message + "%s(action=%S prefix=%S ignore-case=%S%s%s) => %s" + name + (pcase action + ('nil 'try) + ('t 'all) + ('lambda 'test) + (_ action)) + str completion-ignore-case + (if completion-regexp-list + (format " regexp=%s" (cape--debug-print completion-regexp-list t)) + "") + (if pred + (format " predicate=%s" (cape--debug-print pred)) + "") + (cape--debug-print result))) + result))) + (cl-defun cape--table-with-properties (table &key category (sort t) &allow-other-keys) "Create completion TABLE with properties. CATEGORY is the optional completion category. @@ -852,6 +891,26 @@ changed. The function `cape-company-to-capf' is experimental." (interactive (list t)) (if interactive (cape-interactive capf) (funcall capf +;;;###autoload +(
[elpa] externals/cape 5914a87844 8/8: cape-wrap-debug: Simplify
branch: externals/cape commit 5914a87844859ae1927e76f2b11bc5137199cb5f Author: Daniel Mendler Commit: Daniel Mendler cape-wrap-debug: Simplify --- cape.el | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cape.el b/cape.el index ad4781d689..76b4f6c43a 100644 --- a/cape.el +++ b/cape.el @@ -913,7 +913,7 @@ meaningful debugging output." (pcase (funcall capf) (`(,beg ,end ,table . ,plist) (let* (completion-ignore-case completion-regexp-list -(limit cape--debug-length) +(limit (1+ cape--debug-length)) (pred (plist-get plist :predicate)) (cands (all-completions "" table @@ -927,10 +927,9 @@ meaningful debugging output." (cape--debug-print (cadr plist-elt))) plist-elt (cddr plist-elt))) (cape--debug-message -"%s() => input=%s:%s:%S table=(%s%s)%s" +"%s() => input=%s:%s:%S table=%s%s" name (+ beg 0) (+ end 0) (buffer-substring-no-properties beg end) -(string-join (mapcar #'prin1-to-string cands) " ") -(and (< limit 0) " ...") +(cape--debug-print cands) plist-str)) `(,beg ,end ,(cape--debug-table table name (copy-marker beg) (copy-marker end t))
[elpa] externals/cape 545f6d9023 3/8: cape-wrap-debug: Minor cleanup
branch: externals/cape commit 545f6d9023fdbac41f408a6d9065679b89fa2ab6 Author: Daniel Mendler Commit: Daniel Mendler cape-wrap-debug: Minor cleanup --- cape.el | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cape.el b/cape.el index bd9f46a61d..08d198802f 100644 --- a/cape.el +++ b/cape.el @@ -903,15 +903,17 @@ changed. The function `cape-company-to-capf' is experimental." (let ((name (if (symbolp capf) (symbol-name capf) "capf"))) (pcase (funcall capf) (`(,beg ,end ,table . ,plist) - (let* ((count 0) - (cands (all-completions "" table - (lambda (&rest _) -(<= (cl-incf count) cape--debug-length) + (let* (completion-ignore-case completion-regexp-list + (limit cape--debug-length) + (cands (all-completions + "" table + (lambda (&rest _) +(>= (cl-decf limit) 0) (message - "%s() => beg=%s end=%s candidates=(%s%s)%s" + "%s() => beg=%s end=%s table=(%s%s)%s" name beg end (string-join (mapcar #'prin1-to-string cands) " ") - (and (> count cape--debug-length) " ...") + (and (< limit 0) " ...") (if plist (format " plist=%s" (cape--debug-print plist t)) ""))) `(,beg ,end ,(cape--debug-table table name) . ,plist)) (result
[elpa] externals/corfu 416d7360e7: README: Mention cape-capf-debug
branch: externals/corfu commit 416d7360e7a18ef8a7697e63a6fe75a437f4b145 Author: Daniel Mendler Commit: Daniel Mendler README: Mention cape-capf-debug --- README.org | 8 1 file changed, 8 insertions(+) diff --git a/README.org b/README.org index 5617108c9c..c13c8ecb18 100644 --- a/README.org +++ b/README.org @@ -601,6 +601,14 @@ command. (advice-add #'corfu--post-command :around #'force-debug) #+end_src +When Capfs do not yield the expected result you can use ~cape-capf-debug~ to add +debug messages to a Capf. The Capf will then produce a completion log in the +messages buffer. + +#+begin_src emacs-lisp +(setq completion-at-point-functions (list (cape-capf-debug #'cape-dict))) +#+end_src + * Contributions Since this package is part of [[https://elpa.gnu.org/packages/corfu.html][GNU ELPA]] contributions require a copyright
[elpa] externals/cape 087e9818b4 6/8: Improve cape-wrap-debug
branch: externals/cape commit 087e9818b40385bace40fe596055673f6a42ee18 Author: Daniel Mendler Commit: Daniel Mendler Improve cape-wrap-debug --- cape.el | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/cape.el b/cape.el index 535891d210..211f8bec75 100644 --- a/cape.el +++ b/cape.el @@ -908,24 +908,23 @@ meaningful debugging output." (pcase (funcall capf) (`(,beg ,end ,table . ,plist) (let* (completion-ignore-case completion-regexp-list - (limit cape--debug-length) - (cands (all-completions - "" table - (lambda (&rest _) - (>= (cl-decf limit) 0) +(limit cape--debug-length) +(pred (plist-get plist :predicate)) +(cands (all-completions +"" table +(lambda (&rest args) + (and (or (not pred) (apply pred args)) (>= (cl-decf limit) 0)) (message "%s() => input=%s:%s:%S table=(%s%s)%s" name (+ beg 0) (+ end 0) (buffer-substring-no-properties beg end) (string-join (mapcar #'prin1-to-string cands) " ") (and (< limit 0) " ...") (if plist (format " plist=%s" (cape--debug-print plist t)) ""))) - `(,beg ,end -,(cape--debug-table table name -(copy-marker beg) (copy-marker end t)) -. ,plist)) + `(,beg ,end ,(cape--debug-table + table name (copy-marker beg) (copy-marker end t)) + . ,plist)) (result - (message "%s() => %s (No completion)" - name (cape--debug-print result) + (message "%s() => %s (No completion)" name (cape--debug-print result) ;;;###autoload (defun cape-wrap-buster (capf &optional valid)
[elpa] externals/cape ebac3e2eab 2/8: Add cape--debug-length
branch: externals/cape commit ebac3e2eabf24e2fec1309d44fce5913c7c1a331 Author: Daniel Mendler Commit: Daniel Mendler Add cape--debug-length --- cape.el | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cape.el b/cape.el index 0ae93c0190..bd9f46a61d 100644 --- a/cape.el +++ b/cape.el @@ -203,6 +203,9 @@ BODY is the wrapping expression." (let ((default-directory dir) (non-essential t)) +(defvar cape--debug-length 5 + "Length of printed lists in `cape--debug-print'.") + (defun cape--debug-print (obj &optional full) "Print OBJ as string, truncate lists if FULL is nil." (cond @@ -211,8 +214,11 @@ BODY is the wrapping expression." ((and (consp obj) (ignore-errors (length obj))) (concat "(" - (string-join (mapcar #'cape--debug-print (if full obj (take 5 obj))) " ") - (if (and (not full) (length> obj 5)) " ...)" ")"))) + (string-join + (mapcar #'cape--debug-print + (if full obj (take cape--debug-length obj))) + " ") + (if (and (not full) (length> obj cape--debug-length)) " ...)" ")"))) (t (let ((print-level 2)) (prin1-to-string obj) @@ -899,12 +905,13 @@ changed. The function `cape-company-to-capf' is experimental." (`(,beg ,end ,table . ,plist) (let* ((count 0) (cands (all-completions "" table - (lambda (&rest _) (< (cl-incf count) 5) + (lambda (&rest _) +(<= (cl-incf count) cape--debug-length) (message "%s() => beg=%s end=%s candidates=(%s%s)%s" name beg end (string-join (mapcar #'prin1-to-string cands) " ") - (and (> count 5) " ...") + (and (> count cape--debug-length) " ...") (if plist (format " plist=%s" (cape--debug-print plist t)) ""))) `(,beg ,end ,(cape--debug-table table name) . ,plist)) (result
[elpa] externals/cape 9bba4a80e2 5/8: cape-wrap-debug: Add optional NAME argument
branch: externals/cape commit 9bba4a80e2dc9177f461ceca9c0735e11ef45d9a Author: Daniel Mendler Commit: Daniel Mendler cape-wrap-debug: Add optional NAME argument --- cape.el | 51 +++ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/cape.el b/cape.el index 3d0ae014a7..535891d210 100644 --- a/cape.el +++ b/cape.el @@ -899,30 +899,33 @@ changed. The function `cape-company-to-capf' is experimental." (if interactive (cape-interactive capf) (funcall capf ;;;###autoload -(defun cape-wrap-debug (capf) - "Call CAPF and return a completion table which prints trace messages." - (let ((name (if (symbolp capf) (symbol-name capf) "capf"))) -(pcase (funcall capf) - (`(,beg ,end ,table . ,plist) - (let* (completion-ignore-case completion-regexp-list - (limit cape--debug-length) - (cands (all-completions - "" table - (lambda (&rest _) -(>= (cl-decf limit) 0) - (message - "%s() => input=%s:%s:%S table=(%s%s)%s" - name (+ beg 0) (+ end 0) (buffer-substring-no-properties beg end) - (string-join (mapcar #'prin1-to-string cands) " ") - (and (< limit 0) " ...") - (if plist (format " plist=%s" (cape--debug-print plist t)) ""))) - `(,beg ,end - ,(cape--debug-table table name - (copy-marker beg) (copy-marker end t)) - . ,plist)) - (result - (message "%s() => %s (No completion)" -name (cape--debug-print result)) +(defun cape-wrap-debug (capf &optional name) + "Call CAPF and return a completion table which prints trace messages. +If CAPF is an anonymous lambda, pass the Capf NAME explicitly for +meaningful debugging output." + (unless name +(setq name (if (symbolp capf) capf "capf"))) + (pcase (funcall capf) +(`(,beg ,end ,table . ,plist) + (let* (completion-ignore-case completion-regexp-list + (limit cape--debug-length) + (cands (all-completions + "" table + (lambda (&rest _) + (>= (cl-decf limit) 0) + (message +"%s() => input=%s:%s:%S table=(%s%s)%s" +name (+ beg 0) (+ end 0) (buffer-substring-no-properties beg end) +(string-join (mapcar #'prin1-to-string cands) " ") +(and (< limit 0) " ...") +(if plist (format " plist=%s" (cape--debug-print plist t)) ""))) + `(,beg ,end +,(cape--debug-table table name +(copy-marker beg) (copy-marker end t)) +. ,plist)) +(result + (message "%s() => %s (No completion)" + name (cape--debug-print result) ;;;###autoload (defun cape-wrap-buster (capf &optional valid)
[elpa] externals/cape 8a68ff3dc4 7/8: Improve cape-wrap-debug
branch: externals/cape commit 8a68ff3dc4c133fbdc6731bd77a813d7a7436e30 Author: Daniel Mendler Commit: Daniel Mendler Improve cape-wrap-debug --- cape.el | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/cape.el b/cape.el index 211f8bec75..ad4781d689 100644 --- a/cape.el +++ b/cape.el @@ -206,12 +206,17 @@ BODY is the wrapping expression." (defvar cape--debug-length 5 "Length of printed lists in `cape--debug-print'.") +(defun cape--debug-message (&rest msg) + "Print debug MSG." + (let ((inhibit-message t)) +(apply #'message msg))) + (defun cape--debug-print (obj &optional full) "Print OBJ as string, truncate lists if FULL is nil." (cond ((symbolp obj) (symbol-name obj)) ((functionp obj) "#") - ((and (consp obj) (ignore-errors (length obj))) + ((proper-list-p obj) (concat "(" (string-join @@ -230,7 +235,7 @@ NAME is the name of the Capf, BEG and END are the input markers." (let ((result (complete-with-action action table str pred))) (if (and (eq action 'completion--unquote) (functionp (cadr result))) (cl-callf cape--debug-table (cadr result) name beg end) -(message +(cape--debug-message "%s(action=%S input=%s:%s:%S prefix=%S ignore-case=%S%s%s) => %s" name (pcase action @@ -913,18 +918,26 @@ meaningful debugging output." (cands (all-completions "" table (lambda (&rest args) - (and (or (not pred) (apply pred args)) (>= (cl-decf limit) 0)) - (message + (and (or (not pred) (apply pred args)) (>= (cl-decf limit) 0) +(plist-str "") +(plist-elt plist)) + (while (cdr plist-elt) + (setq plist-str (format "%s %s=%s" plist-str + (substring (symbol-name (car plist-elt)) 1) + (cape--debug-print (cadr plist-elt))) + plist-elt (cddr plist-elt))) + (cape--debug-message "%s() => input=%s:%s:%S table=(%s%s)%s" name (+ beg 0) (+ end 0) (buffer-substring-no-properties beg end) (string-join (mapcar #'prin1-to-string cands) " ") (and (< limit 0) " ...") -(if plist (format " plist=%s" (cape--debug-print plist t)) ""))) +plist-str)) `(,beg ,end ,(cape--debug-table table name (copy-marker beg) (copy-marker end t)) . ,plist)) (result - (message "%s() => %s (No completion)" name (cape--debug-print result) + (cape--debug-message "%s() => %s (No completion)" + name (cape--debug-print result) ;;;###autoload (defun cape-wrap-buster (capf &optional valid)
[elpa] externals/cape be4379ba2c 4/8: cape-wrap-debug: Always print the current input
branch: externals/cape commit be4379ba2cf9177e116876e0d6d6391173a58e4c Author: Daniel Mendler Commit: Daniel Mendler cape-wrap-debug: Always print the current input --- cape.el | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/cape.el b/cape.el index 08d198802f..3d0ae014a7 100644 --- a/cape.el +++ b/cape.el @@ -222,22 +222,23 @@ BODY is the wrapping expression." (t (let ((print-level 2)) (prin1-to-string obj) -(defun cape--debug-table (table name) +(defun cape--debug-table (table name beg end) "Create completion TABLE with debug messages. -NAME is the name of the Capf." +NAME is the name of the Capf, BEG and END are the input markers." ;; TODO reuse `cape--wrapped-table' (lambda (str pred action) (let ((result (complete-with-action action table str pred))) (if (and (eq action 'completion--unquote) (functionp (cadr result))) - (cl-callf cape--debug-table (cadr result) name) + (cl-callf cape--debug-table (cadr result) name beg end) (message - "%s(action=%S prefix=%S ignore-case=%S%s%s) => %s" + "%s(action=%S input=%s:%s:%S prefix=%S ignore-case=%S%s%s) => %s" name (pcase action ('nil 'try) ('t 'all) ('lambda 'test) (_ action)) + (+ beg 0) (+ end 0) (buffer-substring-no-properties beg end) str completion-ignore-case (if completion-regexp-list (format " regexp=%s" (cape--debug-print completion-regexp-list t)) @@ -910,12 +911,15 @@ changed. The function `cape-company-to-capf' is experimental." (lambda (&rest _) (>= (cl-decf limit) 0) (message - "%s() => beg=%s end=%s table=(%s%s)%s" - name beg end + "%s() => input=%s:%s:%S table=(%s%s)%s" + name (+ beg 0) (+ end 0) (buffer-substring-no-properties beg end) (string-join (mapcar #'prin1-to-string cands) " ") (and (< limit 0) " ...") (if plist (format " plist=%s" (cape--debug-print plist t)) ""))) - `(,beg ,end ,(cape--debug-table table name) . ,plist)) + `(,beg ,end + ,(cape--debug-table table name + (copy-marker beg) (copy-marker end t)) + . ,plist)) (result (message "%s() => %s (No completion)" name (cape--debug-print result))
[elpa] externals/org-remark 98e9fe68a4: docs: style sheet
branch: externals/org-remark commit 98e9fe68a4e8d3c0c8f1d4a1a597aebcdbea3ff1 Author: Noboru Ota Commit: Noboru Ota docs: style sheet --- docs/resources/manual.css | 100 +++--- 1 file changed, 24 insertions(+), 76 deletions(-) diff --git a/docs/resources/manual.css b/docs/resources/manual.css index 88e7520229..944336e8aa 100644 --- a/docs/resources/manual.css +++ b/docs/resources/manual.css @@ -1,76 +1,24 @@ -/** Based on Org-roam's css -https://github.com/org-roam/org-roam/blob/master/doc/assets/page.css - **/ -:root { - --border: #526980; - --code: #007; -} - -body { -margin: 5ex auto; -max-width: 850px; -line-height: 1.5; -font-family: sans-serif; -font-size: 18px; -} - -h1, h2, h3 { -font-weight: normal; -} - -.settitle { -display: none; -} - -pre, code { -font-family: x, monospace; -} - -pre { -padding: 1ex; -background: #eee; -border: solid 1px #ddd; -min-width: 0; -font-size: 80%; -overflow: auto; -} - -code { -color: var(--code); -} - -img { -max-width: 100%; -} - -table { - border-collapse: collapse; - width: 100%; -} - -pre.menu-comment { - background: none; - border: none; - font-family: sans-serif; - padding: 0; - margin: 0; - font-size: 100%; -} - -thead { - border-bottom: 1px solid var(--border); -} - -tfoot { - border-top: 1px solid var(--border); -} - -blockquote { - margin-left: 1rem; - font-style: italic; - font-family: serif; - border-left: 3px solid; - border-left-color: currentcolor; - border-color: var(--text-color); - padding-left: 1em; -} +/* Style-sheet to use for Emacs manuals */ + +/* Copyright (C) 2013-2022 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. +*/ + +@import url('style.css'); + +/* makeinfo convert @deffn and similar functions to something inside + . style.css uses italic for blockquote. This looks poor + in the Emacs manuals, which make extensive use of @defun (etc). + In particular, references to function arguments appear as + inside . Since is also italic, it makes it + impossible to distinguish variables. We could change to + e.g. bold-italic, or normal, or a different color, but that does + not look as good IMO. So we just override blockquote to be non-italic. + */ +blockquote { font-style: normal; } + +var { font-style: italic; }
[nongnu] elpa/helm updated (497f479ec1 -> cc462522ba)
elpasync pushed a change to branch elpa/helm. from 497f479ec1 Bump to 3.9.4 new 3221dc30a7 Add new isolate packages action to helm-packages new 15c122419c Add a :find-file-target slot to all sources in helm-packages new cc462522ba Update issue template Summary of changes: .github/ISSUE_TEMPLATE/bug-report.yml | 8 -- helm-packages.el | 47 ++- 2 files changed, 52 insertions(+), 3 deletions(-)
[nongnu] elpa/helm 3221dc30a7 1/3: Add new isolate packages action to helm-packages
branch: elpa/helm commit 3221dc30a7f6fc59547dd1479fd35cb41e418820 Author: Thierry Volpiatto Commit: Thierry Volpiatto Add new isolate packages action to helm-packages --- helm-packages.el | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/helm-packages.el b/helm-packages.el index 03597d30d2..bf938f0cd7 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -108,6 +108,38 @@ as dependencies." (mapc #'package-install mkd) (error "%S:\n Please refresh package list before installing" err)) +(defun helm-packages-isolate-1 (packages) +"Start an Emacs with only PACKAGES loaded. +Arg PACKAGES is a list of strings." +(let* ((name (concat "package-isolate-" (mapconcat #'identity packages "_"))) + (deps (cl-loop for p in packages + for sym = (intern p) + nconc (package--dependencies sym + (apply #'start-process name nil + (list (expand-file-name invocation-name invocation-directory) + "-Q" "--debug-init" + (format "--eval=%S" + `(progn + (require 'package) + (setq package-load-list +',(append (mapcar (lambda (p) (list (intern p) t)) + packages) + (mapcar (lambda (p) (list p t)) deps))) + (package-initialize))) + +(defun helm-packages-isolate (_candidate) + "Start a new Emacs with only marked packages loaded." + (let* ((mkd (helm-marked-candidates)) + (pkg-names (mapcar #'symbol-name mkd)) + (isolate (if (fboundp 'package-isolate) + #'package-isolate +#'helm-packages-isolate-1))) +(with-helm-display-marked-candidates + helm-marked-buffer-name + pkg-names + (when (y-or-n-p "Start a new Emacs with only package(s)? ") +(funcall isolate pkg-names) + ;;; Transformer ;; ;; @@ -194,7 +226,8 @@ packages no more availables." ("Visit homepage" . helm-packages-visit-homepage) ("Reinstall package(s)" . helm-packages-package-reinstall) ("Recompile package(s)" . helm-packages-recompile) -("Uninstall package(s)" . helm-packages-uninstall))) +("Uninstall package(s)" . helm-packages-uninstall) +("Isolate package(s)" . helm-packages-isolate))) (helm-build-in-buffer-source "Available external packages" :data (cl-loop for p in package-archive-contents for sym = (car p)
[nongnu] elpa/helm-core updated (497f479ec1 -> cc462522ba)
elpasync pushed a change to branch elpa/helm-core. from 497f479ec1 Bump to 3.9.4 adds 3221dc30a7 Add new isolate packages action to helm-packages adds 15c122419c Add a :find-file-target slot to all sources in helm-packages adds cc462522ba Update issue template No new revisions were added by this update. Summary of changes: .github/ISSUE_TEMPLATE/bug-report.yml | 8 -- helm-packages.el | 47 ++- 2 files changed, 52 insertions(+), 3 deletions(-)
[nongnu] elpa/helm 15c122419c 2/3: Add a :find-file-target slot to all sources in helm-packages
branch: elpa/helm commit 15c122419c55dcfc7cfbf1629937bcaa46906b1d Author: Thierry Volpiatto Commit: Thierry Volpiatto Add a :find-file-target slot to all sources in helm-packages --- helm-packages.el | 12 1 file changed, 12 insertions(+) diff --git a/helm-packages.el b/helm-packages.el index bf938f0cd7..7daaefb82f 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -178,6 +178,13 @@ Arg PACKAGES is a list of strings." "")) collect (cons disp c))) +(defun helm-packages-quit-an-find-file (source) + (let* ((sel (helm-get-selection nil nil source)) + (pkg (package-get-descriptor (intern sel +(if (and pkg (package-installed-p pkg)) +(expand-file-name (package-desc-dir pkg)) + package-user-dir))) + ;;;###autoload (defun helm-packages (&optional arg) "Helm interface to manage packages. @@ -195,6 +202,7 @@ packages no more availables." (helm :sources (list (helm-build-sync-source "Availables for upgrade" :candidates upgrades + :find-file-target #'helm-packages-quit-an-find-file :filtered-candidate-transformer (lambda (candidates _source) (cl-loop for c in candidates @@ -207,6 +215,7 @@ packages no more availables." (helm-build-sync-source "Packages to delete" :candidates removables :coerce #'helm-symbolify + :find-file-target #'helm-packages-quit-an-find-file :filtered-candidate-transformer (lambda (candidates _source) (cl-loop for c in candidates @@ -218,6 +227,7 @@ packages no more availables." (helm-build-in-buffer-source "Installed packages" :data (mapcar #'car package-alist) :coerce #'helm-symbolify + :find-file-target #'helm-packages-quit-an-find-file :filtered-candidate-transformer '(helm-packages-transformer (lambda (candidates _source) @@ -239,6 +249,7 @@ packages no more availables." (and id (assoc sym package--builtins))) nconc (list (car p))) :coerce #'helm-symbolify + :find-file-target #'helm-packages-quit-an-find-file :filtered-candidate-transformer '(helm-packages-transformer (lambda (candidates _source) @@ -255,6 +266,7 @@ packages no more availables." when (package-desc-p (package-get-descriptor (car p))) collect (car p)) :coerce #'helm-symbolify + :find-file-target #'helm-packages-quit-an-find-file :filtered-candidate-transformer '(helm-packages-transformer (lambda (candidates _source)
[nongnu] elpa/helm cc462522ba 3/3: Update issue template
branch: elpa/helm commit cc462522badbde39a3f84589d468d36c4527dabd Author: Thierry Volpiatto Commit: Thierry Volpiatto Update issue template --- .github/ISSUE_TEMPLATE/bug-report.yml | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 3b044bece4..413cb3f9a4 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -43,7 +43,11 @@ body: - Emacs-26.3 - Emacs-27.1 - Emacs-27.2 -- Emacs-28/29 +- Emacs-28.1 +- Emacs-28.2 +- Emacs-28.3 +- Emacs-29.1 +- Emacs-30+ validations: required: true - type: dropdown @@ -70,7 +74,7 @@ body: id: terms attributes: label: Minimal configuration - description: You are using either emacs-helm.sh or a minimal configuration from emacs -Q to reproduce your bug (i.e. No Spacemacs, Doom etc...) + description: You are using emacs -Q with only Helm package loaded to reproduce your bug (i.e. No Spacemacs, Doom etc...), use either emacs-helm.sh or the Isolate packages action from helm-packages. options: - label: I agree using a minimal configuration required: true
[nongnu] elpa/xah-fly-keys 44d6fd79f1: xah-close-current-buffer fixed a bug when closing a non file buffer.
branch: elpa/xah-fly-keys commit 44d6fd79f1be1f15d8f76a3845dbc51aec4464e1 Author: Xah Lee Commit: Xah Lee xah-close-current-buffer fixed a bug when closing a non file buffer. --- xah-fly-keys.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xah-fly-keys.el b/xah-fly-keys.el index ee831cddfc..98daa7e7ed 100644 --- a/xah-fly-keys.el +++ b/xah-fly-keys.el @@ -4,7 +4,7 @@ ;; Author: Xah Lee ( http://xahlee.info/ ) ;; Maintainer: Xah Lee -;; Version: 24.6.20230815153238 +;; Version: 24.6.20230818103059 ;; Created: 10 Sep 2013 ;; Package-Requires: ((emacs "24.1")) ;; Keywords: convenience, emulations, vim, ergoemacs @@ -2338,7 +2338,7 @@ If the buffer a file and modified, make the modified version into a backup in th If the buffer is a file, add the path to the list `xah-recently-closed-buffers'. URL `http://xahlee.info/emacs/emacs/elisp_close_buffer_open_last_closed.html' -Version: 2016-06-19 2022-10-18 2023-08-15" +Version: 2016-06-19 2023-08-15 2023-08-17" (interactive) (cond ((active-minibuffer-window) @@ -2367,7 +2367,7 @@ call xah-open-last-closed twice to open." xnewName)) (format-time-string "%Y%m%d_%H%M%S") (random #xf (write-region (point-min) (point-max) xnewName) - (xah-add-to-recently-closed (buffer-name) buffer-file-name) + (xah-add-to-recently-closed (buffer-name) xnewName) (kill-buffer))) (t (kill-buffer
[elpa] externals/cape d70c088631 2/2: cape-wrap-debug: Add debug message for exit function
branch: externals/cape commit d70c0886314253b216b04e43cddea29a44c441ac Author: Daniel Mendler Commit: Daniel Mendler cape-wrap-debug: Add debug message for exit function --- cape.el | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cape.el b/cape.el index c9540fdbda..4aa51bd3df 100644 --- a/cape.el +++ b/cape.el @@ -933,6 +933,12 @@ meaningful debugging output." plist-str)) `(,beg ,end ,(cape--debug-table table name (copy-marker beg) (copy-marker end t)) + ,@(when-let ((exit (plist-get plist :exit-function))) + (list :exit-function + (lambda (cand status) + (cape--debug-message "%s:exit(candidate=%S status=%s)" +name cand status) + (funcall exit cand status . ,plist)) (result (cape--debug-message "%s() => %s (No completion)"
[elpa] externals/cape 00e8a07423 1/2: Remove comment
branch: externals/cape commit 00e8a074233ebae9a5a7f0553d9267676f06fca8 Author: Daniel Mendler Commit: Daniel Mendler Remove comment --- cape.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cape.el b/cape.el index 76b4f6c43a..c9540fdbda 100644 --- a/cape.el +++ b/cape.el @@ -230,10 +230,10 @@ BODY is the wrapping expression." (defun cape--debug-table (table name beg end) "Create completion TABLE with debug messages. NAME is the name of the Capf, BEG and END are the input markers." - ;; TODO reuse `cape--wrapped-table' (lambda (str pred action) (let ((result (complete-with-action action table str pred))) (if (and (eq action 'completion--unquote) (functionp (cadr result))) + ;; See `cape--wrapped-table' (cl-callf cape--debug-table (cadr result) name beg end) (cape--debug-message "%s(action=%S input=%s:%s:%S prefix=%S ignore-case=%S%s%s) => %s"
[elpa] externals/cape updated (5914a87844 -> d70c088631)
elpasync pushed a change to branch externals/cape. from 5914a87844 cape-wrap-debug: Simplify new 00e8a07423 Remove comment new d70c088631 cape-wrap-debug: Add debug message for exit function Summary of changes: cape.el | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-)
[elpa] externals/cape df831c35aa: cape-wrap-debug: Keep track of completion table id
branch: externals/cape commit df831c35aa0eb73d238ef8297b9273b0e7b69b80 Author: Daniel Mendler Commit: Daniel Mendler cape-wrap-debug: Keep track of completion table id --- cape.el | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cape.el b/cape.el index 4aa51bd3df..94fd91ec55 100644 --- a/cape.el +++ b/cape.el @@ -206,6 +206,9 @@ BODY is the wrapping expression." (defvar cape--debug-length 5 "Length of printed lists in `cape--debug-print'.") +(defvar cape--debug-id 0 + "Completion table identifier.") + (defun cape--debug-message (&rest msg) "Print debug MSG." (let ((inhibit-message t)) @@ -910,6 +913,7 @@ If CAPF is an anonymous lambda, pass the Capf NAME explicitly for meaningful debugging output." (unless name (setq name (if (symbolp capf) capf "capf"))) + (setq name (format "%s@%s" name (cl-incf cape--debug-id))) (pcase (funcall capf) (`(,beg ,end ,table . ,plist) (let* (completion-ignore-case completion-regexp-list @@ -927,7 +931,7 @@ meaningful debugging output." (cape--debug-print (cadr plist-elt))) plist-elt (cddr plist-elt))) (cape--debug-message -"%s() => input=%s:%s:%S table=%s%s" +"%s => input=%s:%s:%S table=%s%s" name (+ beg 0) (+ end 0) (buffer-substring-no-properties beg end) (cape--debug-print cands) plist-str))
[nongnu] elpa/swift-mode 609471e9e2: Update for Emacs 29
branch: elpa/swift-mode commit 609471e9e242261de1d80231c58a469df7530be3 Author: taku0 Commit: taku0 Update for Emacs 29 - Update CI - Update indentations --- .github/workflows/run-test.yml | 17 - scripts/lint_in_docker.sh| 3 ++- scripts/test_in_docker.sh| 4 ++-- swift-mode-beginning-of-defun.el | 12 ++-- swift-mode-indent.el | 2 +- swift-mode-repl.el | 12 ++-- swift-mode.el| 4 ++-- 7 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 7cf5b5c5e6..b9f15bc781 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -16,7 +16,20 @@ jobs: # '25.1' fails for some reason even though `make lint_in_docker` succeeds. # swift-mode-beginning-of-defun.el:1081: All variables and subroutines might as well have a documentation string # swift-mode-beginning-of-defun.el:1135: All variables and subroutines might as well have a documentation string -version: ['24.4', '24.5', '25.2', '25.3', '26.1', '26.2', '26.3', '27.1', '27.2', '28.1', 'snapshot'] +version: + - '29.1' + - '28.2' + - '28.1' + - '27.2' + - '27.1' + - '26.3' + - '26.2' + - '26.1' + - '25.3' + - '25.2' + - '24.5' + - '24.4' + - 'snapshot' env: ELDEV_DIR: .eldev @@ -33,6 +46,8 @@ jobs: curl -fsSL https://raw.github.com/doublep/eldev/master/bin/eldev > $ELDEV_DIR/bin/eldev chmod a+x $ELDEV_DIR/bin/eldev - name: Run linters + # Indentation rules changed since 29. + if: ${{ startsWith(matrix.version, '29.') }} run: find ./*.el test/*.el '!' -name '*autoloads.el' -exec ${ELDEV} lint '{}' '+' - name: Run tests run: ./scripts/run_test.sh diff --git a/scripts/lint_in_docker.sh b/scripts/lint_in_docker.sh index c5aeab96bf..e80e6523b2 100755 --- a/scripts/lint_in_docker.sh +++ b/scripts/lint_in_docker.sh @@ -2,7 +2,8 @@ # Run linter in Docker. Used in Makefile. -for version in 28 27 26 25 24 +# Indentation rules changed since 29. +for version in 29 # 28 27 26 25 24 do docker \ run \ diff --git a/scripts/test_in_docker.sh b/scripts/test_in_docker.sh index 4bd2155379..fd3b927de4 100755 --- a/scripts/test_in_docker.sh +++ b/scripts/test_in_docker.sh @@ -2,7 +2,7 @@ # Run tests in Docker. Used in Makefile. -for version in 28 27 26 25 24 +for version in 29 28 27 26 25 24 do rm -f *.elc test/*.elc rm -f *-autoloads.el @@ -14,7 +14,7 @@ do --workdir="/src" \ --env=ELDEV_DIR=/src/.eldev \ --env=HOME=/tmp \ -silex/emacs:${version} \ +silex/emacs:${version}-ci \ bash -c "/src/scripts/run_test.sh" \ || exit 1 done diff --git a/swift-mode-beginning-of-defun.el b/swift-mode-beginning-of-defun.el index 11fb3e2a3f..399d4f24e9 100644 --- a/swift-mode-beginning-of-defun.el +++ b/swift-mode-beginning-of-defun.el @@ -167,12 +167,12 @@ Otherwise, return nil. The cursor must be at the beginning of a statement." (let ((token (swift-mode:forward-token-or-list)) (defun-keywords - '("import" "typealias" "associatedtype" -"enum" "struct" "actor" "protocol" "extension" -"func" "init" "deinit" "subscript" "get" "set" "willSet" "didSet" -"prefix" "postfix" "infix" "precedencegroup" -"var" "let" -"case")) + '("import" "typealias" "associatedtype" + "enum" "struct" "actor" "protocol" "extension" + "func" "init" "deinit" "subscript" "get" "set" "willSet" "didSet" + "prefix" "postfix" "infix" "precedencegroup" + "var" "let" + "case")) (stop-tokens '(\; implicit-\; {} { } \( \) \[ \] anonymous-function-parameter-in outside-of-buffer)) (class-token nil)) diff --git a/swift-mode-indent.el b/swift-mode-indent.el index 9dc259d322..1db26a69aa 100644 --- a/swift-mode-indent.el +++ b/swift-mode-indent.el @@ -1485,7 +1485,7 @@ When this function returns, the cursor is at the start of the token. If there is no open curly braces, return `outside-of-buffer' token. -This is optimized version of (swift-mode:backward-sexps-until '({}))." +This is optimized version of (swift-mode:backward-sexps-until \\='({}))." (let* ((parent-position (nth 1 (syntax-ppss (while (and parent-position (and (goto-char parent-position) diff --git a/swift-mode-repl.el b/swift-mode-repl.el index cb94b5c969..fb59655e08 100644 --- a/swift-mode-repl.el +++ b/swift-mode-repl.el @@ -571,9 +571,9 @@ SCHEME is the name of the project scheme in Xcode. If it is nil or omitted, the value of `swift-mode:ios-project-scheme' is used." (interactive (let* ((default-project-di