[nongnu] elpa/dirvish e02395c40b 4/5: refactor: improve `dirvish-find-entry-hook` (closes #324)
branch: elpa/dirvish commit e02395c40bd5439ece54989229760bde1e9ea4c1 Author: Alex Lu Commit: Alex Lu refactor: improve `dirvish-find-entry-hook` (closes #324) --- dirvish.el | 14 -- docs/CUSTOMIZING.org | 45 - 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/dirvish.el b/dirvish.el index b2eea1c7e4..5d47ef9080 100644 --- a/dirvish.el +++ b/dirvish.el @@ -250,7 +250,14 @@ input for `dirvish-redisplay-debounce' seconds." :group 'dirvish :type 'hook) (defcustom dirvish-find-entry-hook nil - "Functions called before a Dired buffer is displayed." + "Functions to be called before opening a directory or file. +Each function is called with the file's FILENAME and FIND-FN until one +returns a non-nil value. When a Dired buffer is created for the first +time, FIND-FN is `dired', and the function is called with that Dired +buffer as `current-buffer'; Otherwise, it is one of `find-file', +`find-alternate-file', or `find-file-other-window'. A non-nil return +value terminates `dirvish--find-entry', allowing interception of file +opening and customized handling of specific file types." :group 'dirvish :type 'hook) (defcustom dirvish-preview-setup-hook nil @@ -574,6 +581,9 @@ filename or a string with format of `dirvish-fd-bufname'." (setq find-fn (prog1 'dirvish-fd (require 'dirvish-fd nil t))) (pcase-let ((`(,re ,dir ,_) (split-string (substring entry 1) "📁"))) (cl-return-from dirvish--find-entry (funcall find-fn dir re +(and (run-hook-with-args-until-success + 'dirvish-find-entry-hook entry find-fn) + (cl-return-from dirvish--find-entry)) ;; forward requests from `find-dired' (unless dv (cl-return-from dirvish--find-entry (funcall find-fn entry))) (and (dv-curr-layout dv) (eq find-fn 'find-file-other-window) @@ -1460,7 +1470,7 @@ With optional NOSELECT just find files but do not select them." (setf (dv-index dv) (cons key buffer)) (let ((key (if (string-prefix-p "🔍" key) (buffer-name buffer) key))) (setq dirvish--history (seq-take (push key dirvish--history) 200))) - (run-hook-with-args 'dirvish-find-entry-hook key buffer) + (run-hook-with-args 'dirvish-find-entry-hook key 'dired) buffer))) Commands diff --git a/docs/CUSTOMIZING.org b/docs/CUSTOMIZING.org index aced181da8..ae84e32322 100644 --- a/docs/CUSTOMIZING.org +++ b/docs/CUSTOMIZING.org @@ -105,14 +105,49 @@ See: [[https://github.com/alexluigit/dirvish/discussions/102#discussioncomment-3 Apart from the hooks provided by Dired, Dirvish got some additions. - * ~dirvish-setup-hook~: Functions called when directory data for the root buffer - is ready. +*** ~dirvish-setup-hook~ - * ~dirvish-after-revert-hook~: Functions called after running =revert-buffer= command. +Functions called when directory data for the root buffer is ready. - * ~dirvish-find-entry-hook~: Functions called before a Dired buffer is displayed. +*** ~dirvish-after-revert-hook~: - * ~dirvish-preview-setup-hook~: Functions called in the regular preview buffer. +Functions called after running =revert-buffer= command. + +*** ~dirvish-find-entry-hook~ + +Functions to be called before opening a directory or file. + +Each function is called with the file's FILENAME and FIND-FN until one returns a +non-nil value. When a Dired buffer is created for the first time, FIND-FN is +=dired=, and the function is called with that Dired buffer as =current-buffer=; +Otherwise, it is one of =find-file=, =find-alternate-file=, or +=find-file-other-window=. A non-nil return value from +=run-hook-with-args-until-succuss= terminates =dirvish--find-entry=, allowing +interception of file opening and customized handling of specific file types. + +The code below configures ~dired-find-file*~ commands to automatically detect +binary files based on their extensions and open them externally. + +#+begin_src emacs-lisp +(defun dirvish-open-binaries-externally (file fn) + "When FN is not `dired', open binary FILE externally." + (when-let* (((not (eq fn 'dired))) + ((file-exists-p file)) + ((not (file-directory-p file))) + ((member (downcase (or (file-name-extension file) "")) + dirvish-binary-exts))) +;; return t to terminate `dirvish--find-entry'. +(prog1 t (dired-do-open + +(add-hook 'dirvish-find-entry-hook #'dirvish-open-binaries-externally) +#+end_src + +In practical applications, you might register multiple functions to handle +different file types, assigning specific handlers for each. + +*** ~dirvish-preview-setup-hook~ + +Functions called in the regular preview buffer. ** =find-dired= integration
[elpa] externals/dape updated (7b6734d770 -> cf3db1fe0c)
elpasync pushed a change to branch externals/dape. from 7b6734d770 Skip writing breakpoints file if nothing has changed new cc304734ba Fix dape-history-add when using shell-like + default values new 4647de58c3 Improve repl warn for non commandp dape-commands new d51ec13608 Fix disassembly window selecting when invoking from info buffers new cf3db1fe0c Various formatting fixups Summary of changes: dape.el | 184 +++- 1 file changed, 89 insertions(+), 95 deletions(-)
[elpa] externals/dape cc304734ba 1/4: Fix dape-history-add when using shell-like + default values
branch: externals/dape commit cc304734ba14792bd95c17d73ee51cf0d2608f8f Author: Daniel Pettersson Commit: Daniel Pettersson Fix dape-history-add when using shell-like + default values --- dape.el | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/dape.el b/dape.el index 5267d323e4..484dfb8b62 100644 --- a/dape.el +++ b/dape.el @@ -735,17 +735,17 @@ See `dape-minibuffer-hint'." (defcustom dape-history-add 'input "How to push configuration options onto `dape-history'. -- input: Store input as is read from minibuffer. -- evaled: Input is evaluated then checked against base configuration - in `dape-configs'. Each options that differ from base are stored. -- evaled-dash-form: Like evaled but stores options in dash form if - possible. With dash form characters after - are interpret in sh - like format with ENV PROGRAM ARGS. This is useful for adapters - which accepts :env, :program and :args as launch options. - Example: \"launch - ENV=value program arg1 arg2\"" +- input: Store input as it is read from the minibuffer. +- expanded: Each key in the input is evaluated, and only options that + differ from the base configuration in `dape-configs' are stored. +- shell-like: Like expanded, but stores options in a shell-like + format. Characters after - are interpreted in a shell-style format, + with ENV, PROGRAM, and ARGS. Useful for adapters that accept :env, + :program, and :args as launch options. + Example: \"launch - ENV=value program arg1 arg2\"." :type '(choice (const :tag "Input" input) -(const :tag "Evaluated input" evaled) -(const :tag "Evaluated input in dash form" evaled-dash-form))) +(const :tag "After evaluation of each key" expanded) +(const :tag "Shell like with - separator" shell-like))) (defcustom dape-ui-debounce-time 0.1 "Number of seconds to debounce `revert-buffer' for UI buffers." @@ -5203,20 +5203,19 @@ Where ALIST-KEY exists in `dape-configs'." value))) append (list key value -(defun dape--config-to-string (key post-eval-config) - "Create string from KEY and POST-EVAL-CONFIG." - (pcase-let* ((config-diff (dape--config-diff key post-eval-config)) - ((map :env :program :args) config-diff) - (zap-form-p (and (eq dape-history-add 'evaled-dash-form) +(defun dape--config-to-string (key expanded-config) + "Create string from KEY and EXPANDED-CONFIG." + (pcase-let* ((diff (dape--config-diff key expanded-config)) + ((map :env :program :args) expanded-config) + (zap-form-p (and (eq dape-history-add 'shell-like) (or (stringp program) (and (consp env) (keywordp (car env)) (not args)) (when zap-form-p (cl-loop for key in '(:program :env :args) do - (setq config-diff (map-delete config-diff key + (setq diff (map-delete diff key (concat (when key (format "%s" key)) -(when-let* ((config-diff) -(config-str (prin1-to-string config-diff))) +(when-let* (diff (config-str (prin1-to-string diff))) (format " %s" (substring config-str 1 (1- (length config-str) (when zap-form-p (concat " -"
[elpa] externals/dape 4647de58c3 2/4: Improve repl warn for non commandp dape-commands
branch: externals/dape commit 4647de58c371d71686fa983b1fd95342d864b261 Author: Daniel Pettersson Commit: Daniel Pettersson Improve repl warn for non commandp dape-commands --- dape.el | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dape.el b/dape.el index 484dfb8b62..19cff3a4ac 100644 --- a/dape.el +++ b/dape.el @@ -4610,7 +4610,8 @@ Called by `comint-input-sender' in `dape-repl-mode'." (dape--repl-input-sender dummy-process last))) ;; Run command from `dape-named-commands' ((pcase-let* ((`(,cmd . ,args) - (string-split input split-string-default-separators)) + (string-split (substring-no-properties input) +split-string-default-separators)) (fn (or (alist-get cmd dape-repl-commands nil nil 'equal) (and dape-repl-use-shorthand (cdr (assoc cmd (dape--repl-shorthand-alist))) @@ -4625,7 +4626,9 @@ Called by `comint-input-sender' in `dape-repl-mode'." t) (fn (dape--repl-insert-prompt) - (apply fn args) + (condition-case-unless-debug err + (apply fn args) + (error (dape--warn "%s" (car err t ;; Evaluate expression (t
[elpa] externals/dape d51ec13608 3/4: Fix disassembly window selecting when invoking from info buffers
branch: externals/dape commit d51ec13608e2a747204e85d85d14c581cef4b7af Author: Daniel Pettersson Commit: Daniel Pettersson Fix disassembly window selecting when invoking from info buffers --- dape.el | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dape.el b/dape.el index 19cff3a4ac..0164392066 100644 --- a/dape.el +++ b/dape.el @@ -2945,11 +2945,10 @@ of memory read." 'dape--disassemble-instruction instruction))) (setq-local revert-buffer-function (lambda (&rest _) (dape-disassemble address))) - (with-selected-window (display-buffer (current-buffer)) -(goto-char - (or (marker-position dape--disassemble-overlay-arrow) - (point-min))) -(run-hooks 'dape-display-source-hook))) + (select-window (display-buffer (current-buffer))) + (goto-char (or (marker-position dape--disassemble-overlay-arrow) + (point-min))) + (run-hooks 'dape-display-source-hook)) ;;; Breakpoints
[elpa] externals/minuet 8b9ea6ff1c 08/97: fix: use idle timer and fix buffer changing check for auto-suggestion.
branch: externals/minuet commit 8b9ea6ff1cb05840bee7daf31a95d4a3ad105537 Author: Milan Glacier Commit: Milan Glacier fix: use idle timer and fix buffer changing check for auto-suggestion. --- minuet.el | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/minuet.el b/minuet.el index 9d6e79a0f9..79253c578d 100644 --- a/minuet.el +++ b/minuet.el @@ -988,16 +988,17 @@ to be called when completion items arrive." (when minuet--debounce-timer (cancel-timer minuet--debounce-timer)) (setq minuet--debounce-timer - (run-with-timer - minuet-auto-suggestion-debounce-delay nil - (lambda () - (when (and (eq (window-buffer (selected-window)) (current-buffer)) - (or (null minuet--auto-last-point) - (not (eq minuet--auto-last-point (point - (not (run-hook-with-args-until-success 'minuet-auto-suggestion-block-functions))) - (setq minuet--last-auto-suggestion-time (current-time) - minuet--auto-last-point (point)) - (minuet-show-suggestion))) + (let ((buffer (current-buffer))) + (run-with-idle-timer + minuet-auto-suggestion-debounce-delay nil + (lambda () + (when (and (eq buffer (current-buffer)) + (or (null minuet--auto-last-point) + (not (eq minuet--auto-last-point (point + (not (run-hook-with-args-until-success 'minuet-auto-suggestion-block-functions))) + (setq minuet--last-auto-suggestion-time (current-time) + minuet--auto-last-point (point)) + (minuet-show-suggestion (defun minuet--cleanup-auto-suggestion () "Clean up auto-suggestion timers and hooks."
[nongnu] elpa/emacsql 475943f6ed 1/7: emacsql-sqlite-builtin.el: Fix function declarations
branch: elpa/emacsql commit 475943f6edcb24c317ce4468b7384424b9bd04a1 Author: Basil L. Contovounesios Commit: Jonas Bernoulli emacsql-sqlite-builtin.el: Fix function declarations All three sqlite-* functions used are defined in src/sqlite.c, not lisp/sqlite.el, which defines only the macro with-sqlite-transaction. --- emacsql-sqlite-builtin.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emacsql-sqlite-builtin.el b/emacsql-sqlite-builtin.el index 15c6020e53..9a85d77ad9 100644 --- a/emacsql-sqlite-builtin.el +++ b/emacsql-sqlite-builtin.el @@ -17,9 +17,9 @@ (require 'emacsql-sqlite) (require 'sqlite nil t) -(declare-function sqlite-open "sqlite") -(declare-function sqlite-select "sqlite") -(declare-function sqlite-close "sqlite") +(declare-function sqlite-open "sqlite.c") +(declare-function sqlite-select "sqlite.c") +(declare-function sqlite-close "sqlite.c") (emacsql-register-reserved emacsql-sqlite-reserved)
[elpa] externals/dape cf3db1fe0c 4/4: Various formatting fixups
branch: externals/dape commit cf3db1fe0cd7117a4991b1e4316dec02a4a5f9b2 Author: Daniel Pettersson Commit: Daniel Pettersson Various formatting fixups --- dape.el | 133 ++-- 1 file changed, 63 insertions(+), 70 deletions(-) diff --git a/dape.el b/dape.el index 0164392066..c16fec9dcc 100644 --- a/dape.el +++ b/dape.el @@ -849,11 +849,12 @@ See `cl-destructuring-bind' for bind forms." (let ((old-buffer (make-symbol "old-buffer"))) `(let ((,old-buffer (current-buffer))) (,(car fn-args) ,@(cdr fn-args) -(cl-function (lambda ,vars - (with-current-buffer (if (buffer-live-p ,old-buffer) -,old-buffer - (current-buffer)) - ,@body))) +(cl-function + (lambda ,vars + (with-current-buffer (if (buffer-live-p ,old-buffer) +,old-buffer + (current-buffer)) + ,@body))) (defmacro dape--with-request (fn-args &rest body) "Call `dape-request' like FN with ARGS and execute BODY on callback. @@ -1738,41 +1739,35 @@ See `dape-request' for expected CB signature." See `dape-request' for expected CB signature." (let ((current-nof (length (plist-get thread :stackFrames))) (total-frames (plist-get thread :totalFrames)) +(value-formatting-p + (dape--capable-p conn :supportsValueFormattingOptions)) (delayed-stack-trace-p (dape--capable-p conn :supportsDelayedStackTraceLoading))) -(cond - ((or (not (equal (plist-get thread :status) 'stopped)) - (not (integerp (plist-get thread :id))) - (eql current-nof total-frames) - (and delayed-stack-trace-p (<= nof current-nof)) - (and (not delayed-stack-trace-p) (> current-nof 0))) - (dape--request-continue cb)) - ((dape--with-request-bind +(if (or (not (equal (plist-get thread :status) 'stopped)) +(not (integerp (plist-get thread :id))) +(eql current-nof total-frames) +(and delayed-stack-trace-p (<= nof current-nof)) +(and (not delayed-stack-trace-p) (> current-nof 0))) +(dape--request-continue cb) + (dape--with-request-bind ((&key stackFrames totalFrames &allow-other-keys) error) - (dape-request conn -"stackTrace" -`(:threadId - ,(plist-get thread :id) - ,@(when delayed-stack-trace-p - (list - :startFrame current-nof - :levels (- nof current-nof))) - ,@(when (and dape-info-stack-buffer-modules - (dape--capable-p conn :supportsValueFormattingOptions)) - `(:format (:module t) -(cond - ((not delayed-stack-trace-p) - (plist-put thread :stackFrames - (append stackFrames nil))) - ;; Sanity check delayed stack trace - ((length= (plist-get thread :stackFrames) current-nof) - (plist-put thread :stackFrames - (append (plist-get thread :stackFrames) - stackFrames - nil -(plist-put thread :totalFrames - (and (numberp totalFrames) totalFrames)) -(dape--request-continue cb error)) + (dape-request + conn "stackTrace" + `( :threadId ,(plist-get thread :id) + ,@(when delayed-stack-trace-p + `( :startFrame ,current-nof + :levels ,(- nof current-nof))) + ,@(when (and dape-info-stack-buffer-modules value-formatting-p) + `(:format (:module t) +(cond ((not delayed-stack-trace-p) + (plist-put thread :stackFrames (append stackFrames nil))) + ;; Sanity check delayed stack trace + ((length= (plist-get thread :stackFrames) current-nof) + (plist-put thread :stackFrames + (append (plist-get thread :stackFrames) stackFrames + nil +(plist-put thread :totalFrames (and (numberp totalFrames) totalFrames)) +(dape--request-continue cb error) (defun dape--variables (conn object cb) "Update OBJECTs variables by adapter CONN. @@ -1800,25 +1795,23 @@ See `dape-request' for expected CB signature." Get variable data from CONN and put result on OBJECT until PRED is nil. PRED is called with PATH and OBJECT. See `dape-request' for expected CB signature." - (let ((objects - (cl-loop for variable in (or (plist-get object :scopes) - (plist-get objec
[nongnu] elpa/dirvish 2d63995d32 2/2: feat: add `dirvish-peek-key` user option (closes #191)
branch: elpa/dirvish commit 2d63995d3296c259cef90830cf0433602429ecec Author: Alex Lu Commit: Alex Lu feat: add `dirvish-peek-key` user option (closes #191) --- dirvish.el | 9 ++--- docs/CUSTOMIZING.org | 28 +-- docs/EXTENSIONS.org| 18 - extensions/dirvish-peek.el | 48 +++--- extensions/dirvish-side.el | 2 +- 5 files changed, 78 insertions(+), 27 deletions(-) diff --git a/dirvish.el b/dirvish.el index 641c8b58b4..de9e96e841 100644 --- a/dirvish.el +++ b/dirvish.el @@ -6,7 +6,7 @@ ;; Keywords: files, convenience ;; Homepage: https://github.com/alexluigit/dirvish ;; SPDX-License-Identifier: GPL-3.0-or-later -;; Package-Requires: ((emacs "28.1")) +;; Package-Requires: ((emacs "28.1") (compat "30")) ;; This file is not part of GNU Emacs. @@ -22,7 +22,7 @@ ;;; Code: (require 'dired) -(require 'cl-lib) +(require 'compat) User Options @@ -336,7 +336,10 @@ Set the PROP with BODY if given." `val))) (defun dirvish-run-with-delay (action fun &optional debounce throttle record) - "DV ACTION FUN DEBOUNCE THROTTLE RECORD." + "Run function FUN accroding to ACTION with delay. +DEBOUNCE defaults to `dirvish-input-debounce'. +THROTTLE defaults to `dirvish-input-throttle'. +RECORD defaults to `dirvish--delay-timer'." (declare (indent defun)) (setq record (or record dirvish--delay-timer) debounce (or debounce dirvish-input-debounce) diff --git a/docs/CUSTOMIZING.org b/docs/CUSTOMIZING.org index 7baae28b57..8635f059d2 100644 --- a/docs/CUSTOMIZING.org +++ b/docs/CUSTOMIZING.org @@ -494,26 +494,24 @@ you don't have to require them explicitly if you installed dirvish from MELPA or '(vc-state nerd-icons collapse file-size)) :bind ; Bind `dirvish-fd|dirvish-side|dirvish-dwim' as you see fit (("C-c f" . dirvish) - :map dirvish-mode-map ; Dirvish inherits `dired-mode-map' - ;; (";" . dired-up-directory) ; So you can adjust dired bindings here - ("?" . dirvish-dispatch) ; contains most of sub-menus in dirvish extensions - ("f" . dirvish-history-go-forward) - ("b" . dirvish-history-go-backward) + :map dirvish-mode-map ; Dirvish inherits `dired-mode-map' + (";" . dired-up-directory); So you can adjust `dired' bindings here + ("?" . dirvish-dispatch) ; [?] a helpful cheatsheet + ("a" . dirvish-setup-menu); [a]ttributes settings: press `a' + `t' toggles mtime, etc. + ("f" . dirvish-file-info-menu); [f]ile info + ("o" . dirvish-quick-access) ; [o]pen `dirvish-quick-access-entries' + ("s" . dirvish-quicksort) ; [s]ort flie list + ("r" . dirvish-history-jump) ; [r]ecent visited + ("l" . dirvish-ls-switches-menu) ; [l]s command flags + ("*" . dirvish-mark-menu) ("y" . dirvish-yank-menu) ("N" . dirvish-narrow) ("^" . dirvish-history-last) - ("s" . dirvish-setup-menu) ; `sf' toggles fullframe, `st' toggles mtime, etc. - ("h" . dirvish-history-jump) ; remapped `describe-mode' - ("r" . dirvish-quicksort); remapped `dired-sort-toggle-or-edit' - ("v" . dirvish-vc-menu) ; remapped `dired-view-file' ("TAB" . dirvish-subtree-toggle) - ("M-a" . dirvish-quick-access) - ("M-f" . dirvish-file-info-menu) - ("M-l" . dirvish-ls-switches-menu) - ("M-m" . dirvish-mark-menu) + ("M-f" . dirvish-history-go-forward) + ("M-b" . dirvish-history-go-backward) ("M-t" . dirvish-layout-toggle) - ("M-e" . dirvish-emerge-menu) - ("M-j" . dirvish-fd-jump))) + ("M-e" . dirvish-emerge-menu))) #+end_src ** Mouse settings diff --git a/docs/EXTENSIONS.org b/docs/EXTENSIONS.org index e8ab56331a..b8557144bb 100644 --- a/docs/EXTENSIONS.org +++ b/docs/EXTENSIONS.org @@ -117,16 +117,24 @@ a directory, add ~dirvish-emerge-mode~ to ~dirvish-setup-hook~. This extension introduces =dirvish-peek-mode=, a minor mode that enables file previews within the minibuffer as you narrow down candidates. By leveraging =dirvish.el= for its core functionality, it delivers a seamless and consistent -preview experience. +preview experience. It currently supports =vertico=, =ivy= and =icomplete=. https://user-images.githubusercontent.com/16313743/158052790-22e6cf49-e18e-435c-908e-f5d91ba316a6.mp4 *Figure 1.* A demo of ~find-library~ and ~find-file~ commands after ~dirvish-peek-mode~ enabled. -The ~dirvish-peek-display-alist~ option allows you to control the window placement -of the peek window. - -~dirvish-peek-mode~ currently supports =vertico=, =selectrum=, =ivy= and =icomplete[-vertical]=. +=dirvish-peek-mode= enables previews by default. You can disable them by adjusting +the =dirvish-peek-key= variable (adopted from ~consult-preview-key~). Furthermore +it is possible to specify keybindings which trigger the preview manually. The +default setting of =dirvish-peek-key= is =any= whi
[nongnu] elpa/dirvish updated (5a3cf2b0a6 -> 2d63995d32)
elpasync pushed a change to branch elpa/dirvish. from 5a3cf2b0a6 refactor: set `window-size-fixed` during redisplay (#317 #329) new 99bf595606 github: update issue template new 2d63995d32 feat: add `dirvish-peek-key` user option (closes #191) Summary of changes: .github/ISSUE_TEMPLATE/bug_report.yml | 7 + .github/ISSUE_TEMPLATE/feature_request.md | 4 +-- dirvish.el| 9 -- docs/CUSTOMIZING.org | 28 +- docs/EXTENSIONS.org | 18 extensions/dirvish-peek.el| 48 +-- extensions/dirvish-side.el| 2 +- 7 files changed, 87 insertions(+), 29 deletions(-)
[nongnu] elpa/dirvish 99bf595606 1/2: github: update issue template
branch: elpa/dirvish commit 99bf59560695083c865060cfaa8b7f6055ff7867 Author: Alex Lu Commit: Alex Lu github: update issue template --- .github/ISSUE_TEMPLATE/bug_report.yml | 7 +++ .github/ISSUE_TEMPLATE/feature_request.md | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3ac05ed857..19f425df1d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -3,6 +3,13 @@ description: Create a report to help us improve title: "[Bug] " labels: "bug" body: +- type: checkboxes + id: updated-dirvish + attributes: +label: Please update dirvish first -- errors are often fixed by the time they're reported. +options: + - label: I have updated dirvish to the latest commit and tested that the issue still exists +required: true - type: checkboxes id: requirements attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 36e6310071..2fa2711e37 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,8 +1,8 @@ --- name: Feature request about: Suggest an idea for this project -title: '[Feature Request] ' -labels: 'enhancement' +title: '' +labels: enhancement --- **Is your feature request related to a problem? Please describe.**
[elpa] externals/dape 0dee0cfd97: Using future history for dape-info-variable-edit
branch: externals/dape commit 0dee0cfd977cf30acead893bbba3a22c1919b202 Author: Daniel Pettersson Commit: Daniel Pettersson Using future history for dape-info-variable-edit --- dape.el | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/dape.el b/dape.el index c16fec9dcc..7cdf2df541 100644 --- a/dape.el +++ b/dape.el @@ -4160,18 +4160,15 @@ current buffer with CONN config." (dape--buffer-map dape-info-variable-name-map dape-info-scope-watch-dwim) -(dape--command-at-line dape-info-variable-edit - (dape--info-ref dape--info-variable) +(dape--command-at-line dape-info-variable-edit (dape--info-ref dape--info-variable) "Edit variable value at line in dape info buffer." - (dape--set-variable (dape--live-connection 'stopped) - dape--info-ref - dape--info-variable - (read-string - (format "Set value of %s `%s' = " - (plist-get dape--info-variable :type) - (plist-get dape--info-variable :name)) - (or (plist-get dape--info-variable :value) - (plist-get dape--info-variable :result) + (dape--set-variable + (dape--live-connection 'stopped) dape--info-ref dape--info-variable + (read-string (format "Set value of %s `%s' = " +(plist-get dape--info-variable :type) +(plist-get dape--info-variable :name)) +nil nil (or (plist-get dape--info-variable :value) +(plist-get dape--info-variable :result) (dape--buffer-map dape-info-variable-value-map dape-info-variable-edit)
[elpa] externals/org adfee5eed8: Capitalize JavaScript correctly
branch: externals/org commit adfee5eed88d950548963f4700387442a8111d0f Author: Rudolf Adamkovič Commit: Ihor Radchenko Capitalize JavaScript correctly * doc/org-manual.org (Exporting to minimal HTML): * etc/ORG-NEWS (Add ~:session~ support of ob-js for js-comint): * lisp/ob-js.el (org-babel-js-function-wrapper): (org-babel-execute:js): (org-babel-variable-assignments:js): (org-babel-js-initiate-session): * lisp/ox-html.el (org-html-style-default): (org-html-klipse-selection-script): Re-capitalize "Javascript" to JavaScript or add a SIC comment if not possible. --- doc/org-manual.org | 2 +- etc/ORG-NEWS | 3 +++ lisp/ob-js.el | 9 + lisp/ox-html.el| 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 1f4fe5a6f7..7561c0d628 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -13554,7 +13554,7 @@ name, and date. *** Exporting to minimal HTML :PROPERTIES: -:DESCRIPTION: Exporting HTML without CSS, Javascript, etc. +:DESCRIPTION: Exporting HTML without CSS, JavaScript, etc. :ALT_TITLE: Bare HTML :END: diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 05280f3de5..919dea33d2 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -4769,10 +4769,13 @@ wget -c "https://ben.akrin.com/crackzor/crackzor_1.0.c.gz"; #+end_example *** Add ~:session~ support of ob-js for js-comint + #+begin_src js :session "*Javascript REPL*" console.log("stardiviner") #+end_src +# SIC, JavaScript miscapitalized in `js-comint.el'. + *** Add ~:session~ support of ob-js for Indium #+begin_src js :session "*JS REPL*" console.log("stardiviner") diff --git a/lisp/ob-js.el b/lisp/ob-js.el index 309f049293..816aa972ed 100644 --- a/lisp/ob-js.el +++ b/lisp/ob-js.el @@ -1,4 +1,4 @@ -;;; ob-js.el --- Babel Functions for Javascript -*- lexical-binding: t; -*- +;;; ob-js.el --- Babel Functions for JavaScript -*- lexical-binding: t; -*- ;; Copyright (C) 2010-2025 Free Software Foundation, Inc. @@ -73,10 +73,10 @@ ;; parenthesis are not shadowed if the last line of the body is a ;; line comment. "require('process').stdout.write(require('util').inspect(function(){%s\n}()));" - "Javascript code to print value of body.") + "JavaScript code to print value of body.") (defun org-babel-execute:js (body params) - "Execute Javascript BODY according to PARAMS. + "Execute JavaScript BODY according to PARAMS. This function is called by `org-babel-execute-src-block'." (let* ((org-babel-js-cmd (or (cdr (assq :cmd params)) org-babel-js-cmd)) (session (cdr (assq :session params))) @@ -158,7 +158,7 @@ specifying a variable of the same value." session)) (defun org-babel-variable-assignments:js (params) - "Return list of Javascript statements assigning the block's variables. + "Return list of JavaScript statements assigning the block's variables. The variables are defined in PARAMS." (mapcar (lambda (pair) (format "var %s=%s;" @@ -183,6 +183,7 @@ Return the initialized session." (run-skewer) (skewer-repl) session-buffer))) + ;; SIC, JavaScript miscapitalized in `js-comint.el'. ((string= "*Javascript REPL*" session) (org-require-package 'js-comint) (let ((session-buffer "*Javascript REPL*")) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 321f263cd3..2f4ec12e28 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -332,7 +332,7 @@ This affects IDs that are determined from the ID property.") pre.src-haskell:before { content: 'Haskell'; } pre.src-hledger:before { content: 'hledger'; } pre.src-java:before { content: 'Java'; } - pre.src-js:before { content: 'Javascript'; } + pre.src-js:before { content: 'JavaScript'; } pre.src-latex:before { content: 'LaTeX'; } pre.src-ledger:before { content: 'Ledger'; } pre.src-lisp:before { content: 'Lisp'; } @@ -1651,7 +1651,7 @@ https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag"; selector_eval_scheme: '.src-scheme', selector: '.src-clojure', selector_eval_ruby: '.src-ruby'};" - "Javascript snippet to activate klipse." + "JavaScript snippet to activate klipse." :group 'org-export-html :package-version '(Org . "9.1") :type 'string)
[elpa] externals-release/org 5df3785473: lisp/org.el (org-paste-special): Fix a typo
branch: externals-release/org commit 5df37854739baa67006dc1cda70fab6a42977880 Author: Rudolf Adamkovič Commit: Ihor Radchenko lisp/org.el (org-paste-special): Fix a typo --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 122e57a90b..20ce5c8c8a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18068,7 +18068,7 @@ context. See the individual commands for more information." (if (org-at-table-p) #'org-table-cut-region #'org-cut-subtree))) (defun org-paste-special (arg) - "Paste rectangular region into table, or past subtree relative to level. + "Paste rectangular region into table, or paste subtree relative to level. Calls `org-table-paste-rectangle' or `org-paste-subtree', depending on context. See the individual commands for more information." (interactive "P")
[nongnu] elpa/aidermacs 304543cbd7: Relax aidermacs-extra-args requirement
branch: elpa/aidermacs commit 304543cbd756e0c343b8e096dac14faf0920d9cc Author: Mingde (Matthew) Zeng Commit: Mingde (Matthew) Zeng Relax aidermacs-extra-args requirement Tries to address #97 Signed-off-by: Mingde (Matthew) Zeng --- aidermacs.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aidermacs.el b/aidermacs.el index 4927edf972..851625280e 100644 --- a/aidermacs.el +++ b/aidermacs.el @@ -270,7 +270,7 @@ This function sets up the appropriate arguments and launches the process." (aidermacs-setup-minor-mode) (let* ((buffer-name (aidermacs-get-buffer-name)) - ;; Process extra args: split each string on whitespace. + ;; Split each string on whitespace for member comparison later (flat-extra-args (cl-mapcan (lambda (s) (if (stringp s) @@ -321,7 +321,8 @@ This function sets up the appropriate arguments and launches the process." (list "--weak-model" aidermacs-weak-model)) (when aidermacs-subtree-only '("--subtree-only") - (final-args (append backend-args flat-extra-args))) + ;; Take the original aidermacs-extra-args instead of the flat ones + (final-args (append backend-args aidermacs-extra-args))) (if (and (get-buffer buffer-name) (process-live-p (get-buffer-process buffer-name))) (aidermacs-switch-to-buffer buffer-name)
[elpa] externals/denote e41fd8ebc7: Make file prompt of the "... or create" commands more informative
branch: externals/denote commit e41fd8ebc7143d11000f635227d4569e4d361b3f Author: Protesilaos Stavrou Commit: Protesilaos Stavrou Make file prompt of the "... or create" commands more informative --- denote.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/denote.el b/denote.el index 73da4f172d..6cf052d23a 100644 --- a/denote.el +++ b/denote.el @@ -3380,7 +3380,7 @@ saved or killed at the end of `denote-region'." If file does not exist, invoke `denote' to create a file. In that case, use the last input at the file prompt as the default value of the title prompt." - (interactive (list (denote-file-prompt nil nil :no-require-match))) + (interactive (list (denote-file-prompt nil "Select file (RET on no match to create it)" :no-require-match))) (if (and target (file-exists-p target)) (find-file target) (denote--command-with-features #'denote :use-last-input-as-def-title nil nil nil))) @@ -3390,7 +3390,7 @@ prompt." "Like `denote-open-or-create' but use one of the `denote-commands-for-new-notes'." (declare (interactive-only t)) (interactive) - (let ((target (denote-file-prompt nil nil :no-require-match))) + (let ((target (denote-file-prompt nil "Select file (RET on no match to create it)" :no-require-match))) (if (and target (file-exists-p target)) (find-file target) (denote--command-with-features (denote-command-prompt) :use-file-prompt-as-def-title nil nil nil @@ -5084,7 +5084,7 @@ With optional ID-ONLY as a prefix argument create a link that consists of just the identifier. Else try to also include the file's title. This has the same meaning as in `denote-link'." (interactive - (let* ((target (denote-file-prompt nil nil :no-require-match))) + (let* ((target (denote-file-prompt nil "Select file (RET on no match to create it)" :no-require-match))) (unless (and target (file-exists-p target)) (setq target (denote--command-with-features #'denote :use-file-prompt-as-def-title :ignore-region :save :in-background))) (list target current-prefix-arg)))
[nongnu] scratch/logview 4dfa974856 4/5: (logview-filter-edit--do): Hoist `setf` out of `if`
branch: scratch/logview commit 4dfa974856278e15f933e75b907e1646eeb2e57c Author: Stefan Monnier Commit: Stefan Monnier (logview-filter-edit--do): Hoist `setf` out of `if` --- logview.el | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/logview.el b/logview.el index 4ebb1a4310..0c328a9cd8 100644 --- a/logview.el +++ b/logview.el @@ -4352,13 +4352,14 @@ only edits after it get discarded." (let ((new-views (save-excursion (goto-char (point-min)) (logview--parse-view-definitions t -(if logview-filter-edit--editing-views-for-submode -(let ((combined-views (nreverse new-views))) - (dolist (view (logview--views)) -(unless (equal (plist-get view :submode) logview-filter-edit--editing-views-for-submode) - (push view combined-views))) - (setf logview--views (nreverse combined-views))) - (setf logview--views new-views)) +(setf logview--views + (if logview-filter-edit--editing-views-for-submode + (let ((combined-views (nreverse new-views))) +(dolist (view (logview--views)) + (unless (equal (plist-get view :submode) logview-filter-edit--editing-views-for-submode) +(push view combined-views))) +(nreverse combined-views)) +new-views)) (setf logview--views-need-saving t) (logview--after-updating-view-definitions) (with-current-buffer parent
[nongnu] scratch/logview 0a4ea17646 1/5: Remove redundant `:group` arguments
branch: scratch/logview commit 0a4ea17646158e42886fb4dab750b1b2ee61f6e0 Author: Stefan Monnier Commit: Stefan Monnier Remove redundant `:group` arguments --- logview.el | 65 -- 1 file changed, 16 insertions(+), 49 deletions(-) diff --git a/logview.el b/logview.el index e861c80547..5157f090fe 100644 --- a/logview.el +++ b/logview.el @@ -264,7 +264,6 @@ aliases [optional] Submode can have any number of optional aliases, which work just as the name." - :group 'logview :type logview--additional-submodes-type :set #'logview--set-submode-affecting-variable :set-after '(logview-additional-timestamp-formats logview-additional-level-mappings)) @@ -318,7 +317,6 @@ map to the levels of the mode. This is the case with RFC 5424: Mapping can have any number of optional aliases, which work just as the name." - :group 'logview :type '(repeat (cons (string :tag "Name") (list :tag "Definition" (cons :tag "" (const :tag "Error levels:" error) (repeat string)) @@ -357,7 +355,6 @@ also specified. Timestamp format can have any number of optional aliases, which work just as the name." - :group 'logview :type '(repeat (cons (string :tag "Name") (list :tag "Definition" (set :inline t @@ -376,7 +373,6 @@ not even looked at. If several lines look like log entry starts, but still cannot be matched against known submodes, the rest is skipped, see variable `logview-max-promising-lines'. However, setting this to a ridiculously large number can still be slow." - :group 'logview :type 'integer) (defcustom logview-max-promising-lines 3 @@ -389,7 +385,6 @@ avoiding very long unsuccessful guessing times even when Setting this to zero makes the mode match against all `logview-guess-lines'." - :group 'logview :type 'integer) (defcustom logview-auto-revert-mode nil @@ -405,7 +400,6 @@ to it. To temporarily activate or deactivate Auto-Revert (Tail) mode in a Logview buffer type `[auto-revert-mode]' or `[auto-revert-tail-mode]'." - :group 'logview :type '(choice (const :tag "Off" nil) (const :tag "Auto-Revert mode" auto-revert-mode) (const :tag "Auto-Revert Tail mode" auto-revert-tail-mode))) @@ -417,7 +411,6 @@ to compare part of the file on disk with part of the buffer to make sure (even if not with 100% guarantee) that the buffer really represents beginning of its backing file. The command will refuse to complete operation unless this check succeeds." - :group 'logview :type 'integer) @@ -425,7 +418,6 @@ will refuse to complete operation unless this check succeeds." "Default target gap length for `[logview-next-timestamp-gap]' and similar commands. This must be a non-negative number of seconds. Can be changed temporarily for a single buffer with `[logview-change-target-gap-length]'." - :group 'logview :type 'number) (defcustom logview-copy-visible-text-only t @@ -434,7 +426,6 @@ Standard Emacs behavior is to copy even invisible text, but that typically doesn't make much sense with filtering. To temporarily change this on per-buffer basis type `[logview-toggle-copy-visible-text-only]'." - :group 'logview :type 'boolean) (defcustom logview-search-only-in-messages nil @@ -444,7 +435,6 @@ anywhere. However, it is sometimes useful to ignore other parts of log entries, e.g. timestamp when searching for numbers. To temporarily change this on per-buffer basis type `[logview-toggle-search-only-in-messages]'." - :group 'logview :type 'boolean) (defcustom logview-preview-filter-changes t @@ -453,19 +443,16 @@ This preview is activated whenever you change the filters in the buffer popped up by `[logview-edit-filters]' or `[logview-edit-thread-narrowing-filters]'. To temporarily change this on per-buffer basis type `[logview-toggle-filter-preview]'." - :group 'logview :type 'boolean) (defcustom logview-show-ellipses t "Whether to show ellipses to indicate hidden log entries. To temporarily change this on per-buffer basis type `[logview-toggle-show-ellipses]'." - :group 'logview :type 'boolean) (defcustom logview-highlighted-entry-part 'whole "Which parts of an entry get highlighted with `[logview-highlight-view-entries]'." - :group 'logview :type '(choice (const :tag "The whole entry" whole) (const :tag "Entry header (date, level, etc.)" header) (const :tag "Entry message"message)) @@ -475,7 +462,6 @@ To temporarily change this on per-buffer basis type `[logv (defcustom logview-pulse-entries '(section-movement navigation-view timestamp-gap) "When to briefly highlight the current entry. You can also
[nongnu] scratch/logview 7bcfd6b103 3/5: (logview--do-append-log-file-tail): Use `bufferpos-to-filepos`
branch: scratch/logview commit 7bcfd6b1033b20fcb279473782268e84660b0ccb Author: Stefan Monnier Commit: Stefan Monnier (logview--do-append-log-file-tail): Use `bufferpos-to-filepos` --- logview.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/logview.el b/logview.el index 3f9f62f5bd..4ebb1a4310 100644 --- a/logview.el +++ b/logview.el @@ -2955,9 +2955,7 @@ returns non-nil." (size (1+ (buffer-size))) (reassurance-chars (min (max logview-reassurance-chars 0) (1- size))) (compare-from (- size reassurance-chars)) - ;; 'position-bytes' appears to count from 1, yet we need - ;; zero-based offset. - (compare-from-bytes (1- (position-bytes compare-from + (compare-from-bytes (bufferpos-to-filepos compare-from))) (with-temp-buffer ;; As of Emacs 30 this fails when trying to read past the end of the file (in earlier Emacs versions it ;; works, but doesn't insert anything). Don't care to report anything to Emacs-devel (maybe it's even
[nongnu] branch scratch/logview created (now 94e63fc6dd)
monnier pushed a change to branch scratch/logview. at 94e63fc6dd (logview-filter-edit-mode): Use font-lock This branch includes the following new commits: new 0a4ea17646 Remove redundant `:group` arguments new 88133bd2fa Use `point-min` rather than 1 new 7bcfd6b103 (logview--do-append-log-file-tail): Use `bufferpos-to-filepos` new 4dfa974856 (logview-filter-edit--do): Hoist `setf` out of `if` new 94e63fc6dd (logview-filter-edit-mode): Use font-lock
[nongnu] scratch/logview 88133bd2fa 2/5: Use `point-min` rather than 1
branch: scratch/logview commit 88133bd2fa8de21a375e3a51775811448783d19b Author: Stefan Monnier Commit: Stefan Monnier Use `point-min` rather than 1 --- logview.el | 59 --- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/logview.el b/logview.el index 5157f090fe..3f9f62f5bd 100644 --- a/logview.el +++ b/logview.el @@ -919,7 +919,7 @@ macro `logview--std-temporarily-widening' instead." ;; code can irreversibly freeze Emacs, but this is of course "not a bug": ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57804. They care about responsiveness ;; with long lines, but not here, right. - (unless (and (= (point-min) 1) (= (point-max) (1+ (buffer-size + (unless (= (- (point-max) (point-min)) (buffer-size)) (error "Logview is incompatible with locked narrowing; see https://github.com/doublep/logview#locked-narrowing";))) (defmacro logview--std-temporarily-widening (&rest body) @@ -1015,9 +1015,9 @@ two functions (available since the first call) further." "Return end of previous line. This function assumes POSITION is at the beginning of a line. If this is the first line, don't change POSITION." - (if (> position 1) + (if (> position (point-min)) (1- position) -1)) +(point-min))) (defsubst logview--character-back (position) "Return end of previous line assumin non-first line. @@ -2812,7 +2812,7 @@ These are: (insert " " (logview--help-format-keys entry "[1-5]" keys-width) " " (logview--help-substitute-keys (car (last entry))) "\n") (insert "\n " (replace-regexp-in-string "\n" "\n " (logview--help-substitute-keys entry)) "\n"))) -(goto-char 1) +(goto-char (point-min)) (help-mode) (let ((map (make-sparse-keymap))) (set-keymap-parent map help-mode-map) @@ -2924,14 +2924,21 @@ restrictions most likely wouldn't make any sense with new text." (interactive) (let* ((narrowed (buffer-narrowed-p)) (reassurance-chars(max logview-reassurance-chars 1)) - (first-characters (when narrowed (logview--temporarily-widening (buffer-substring-no-properties 1 (min (point-max) reassurance-chars) + (first-characters (when narrowed + (logview--temporarily-widening + (buffer-substring-no-properties + (point-min) + (min (point-max) reassurance-chars) (revert-without-query (when buffer-file-name (list (regexp-quote buffer-file-name (was-read-onlybuffer-read-only)) (revert-buffer nil nil t) ;; Apparently 'revert-buffer' resets this. (read-only-mode (if was-read-only 1 0)) (if narrowed -(let ((same-contents (string= (logview--temporarily-widening (buffer-substring-no-properties 1 (min (point-max) reassurance-chars))) first-characters))) +(let ((same-contents (logview--temporarily-widening + (string= (buffer-substring-no-properties +(point-min) (min (point-max) reassurance-chars)) + first-characters (if same-contents (message "Reverted the buffer; kept the narrowing as the start contents is the same") (logview-widen) @@ -2959,7 +2966,8 @@ returns non-nil." (let ((temporary (current-buffer)) (temporary-size (buffer-size))) (if (and (>= temporary-size reassurance-chars) - (string= (buffer-substring-no-properties 1 (1+ reassurance-chars)) + (string= (buffer-substring-no-properties + (point-min) (1+ reassurance-chars)) (with-current-buffer buffer (logview--std-temporarily-widening (buffer-substring-no-properties compare-from size) @@ -3006,7 +3014,7 @@ returns non-nil." (push (cdr format) standard-timestamps)) (setq standard-timestamps (nreverse standard-timestamps)) (catch 'success - (goto-char 1) + (goto-char (point-min)) (while (and (< line-number (max logview-guess-lines 1)) (> remaining-attemps 0) (not (eobp))) (let ((line (buffer-substring-no-properties (point) (progn (end-of-line) (point) (let (promising) @@ -3382,10 +3390,12 @@ something similar first." (progn (logview--find-region-entries entry-at (+ entry-at logview--lazy-region-size)) (get-text-property entry-at 'logview-entry) (if entry -(when (and (> entry-at 1) (eq (get-text-property (1- entry-at) 'logview-entry) entry)) - (setq entry-at (or (previous-single-proper
[nongnu] scratch/logview 94e63fc6dd 5/5: (logview-filter-edit-mode): Use font-lock
branch: scratch/logview commit 94e63fc6dd150456884a54ca834e9ced7ac443e5 Author: Stefan Monnier Commit: Stefan Monnier (logview-filter-edit-mode): Use font-lock (logview-filter-edit-font-lock-keywords): New var. (logview-filter-edit--font-lock-region): Adjust calling convention. --- logview.el | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/logview.el b/logview.el index 0c328a9cd8..6217dcd231 100644 --- a/logview.el +++ b/logview.el @@ -4305,12 +4305,12 @@ This list is preserved across Emacs session in (define-key map (kbd (car binding)) (cadr binding))) map)) +(defvar logview-filter-edit-font-lock-keywords + '(logview-filter-edit--font-lock-region)) + (define-derived-mode logview-filter-edit-mode nil "Logview Filters" "Major mode for editing filters of a Logview buffer." - (logview-filter-edit--font-lock-region (point-min) (point-max)) - ;; FIXME: Use `font-lock-defaults' as in the main buffer. Not very important, as filter - ;;buffers are usually not large. - (add-hook 'after-change-functions #'logview-filter-edit--font-lock-region t t) + (setq-local font-lock-defaults '(logview-filter-edit-font-lock-keywords t)) (add-hook 'after-change-functions #'logview-filter-edit--schedule-preview t t)) (defun logview-filter-edit-save () @@ -4400,13 +4400,12 @@ only edits after it get discarded." t))) (set-buffer-modified-p nil)) -(defun logview-filter-edit--font-lock-region (region-begin region-end &optional _old-length) +(defun logview-filter-edit--font-lock-region (region-end) (save-excursion (save-match-data ;; Not even in a Logview mode buffer, not using `std'. (logview--temporarily-widening (with-silent-modifications - (goto-char region-begin) (forward-line 0) ;; Never try to parse from the middle of a multiline filter. (while (and (not (bobp)) @@ -4467,7 +4466,9 @@ only edits after it get discarded." t t))) (put-text-property begin end 'face 'error)) - (< (point) region-end + (< (point) region-end))) + ;; Tell font-lock that it's not worth calling us back for "further matches". + nil) (defun logview-filter-edit--schedule-preview (&rest _ignored) (unless (or logview-filter-edit--preview-timer (eq logview-filter-edit--mode 'views))
[elpa] externals/modus-themes updated (f3cd4d6983 -> 55609222f9)
elpasync pushed a change to branch externals/modus-themes. from f3cd4d6983 Merge branch 'main' of github.com:protesilaos/modus-themes new 8535e3245a Change the accent mappings in modus-operandi-tinted for stylistic consistency new 55609222f9 Change the accent mappings in modus-vivendi-tinted for stylistic consistency Summary of changes: modus-operandi-tinted-theme.el | 8 modus-vivendi-tinted-theme.el | 8 2 files changed, 8 insertions(+), 8 deletions(-)
[elpa] externals/auctex 9cc8811ebf 1/2: ; * style/ninecolors.el: Remove wrong executable bit.
branch: externals/auctex commit 9cc8811ebfd408d4052e3e5809bf805ca8da19aa Author: Arash Esbati Commit: Arash Esbati ; * style/ninecolors.el: Remove wrong executable bit. --- style/ninecolors.el | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/style/ninecolors.el b/style/ninecolors.el old mode 100755 new mode 100644
[elpa] externals/auctex b47645123f 2/2: ; * style/langscibook.el: Remove wrong executable bit.
branch: externals/auctex commit b47645123f8156c184d1eb90a8684d90513a988e Author: Arash Esbati Commit: Arash Esbati ; * style/langscibook.el: Remove wrong executable bit. --- style/langscibook.el | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/style/langscibook.el b/style/langscibook.el old mode 100755 new mode 100644
[elpa] externals/modus-themes 55609222f9 2/2: Change the accent mappings in modus-vivendi-tinted for stylistic consistency
branch: externals/modus-themes commit 55609222f9817f7f76f5832d87e95ac11bba9a86 Author: Protesilaos Stavrou Commit: Protesilaos Stavrou Change the accent mappings in modus-vivendi-tinted for stylistic consistency --- modus-vivendi-tinted-theme.el | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modus-vivendi-tinted-theme.el b/modus-vivendi-tinted-theme.el index 2bbec8aa84..7c1d2bbad0 100644 --- a/modus-vivendi-tinted-theme.el +++ b/modus-vivendi-tinted-theme.el @@ -275,10 +275,10 @@ which corresponds to a minimum contrast in relative luminance of Accent mappings - (accent-0 blue-cooler) - (accent-1 magenta-warmer) - (accent-2 cyan-cooler) - (accent-3 yellow) + (accent-0 magenta-cooler) + (accent-1 cyan) + (accent-2 red-cooler) + (accent-3 yellow-warmer) Button mappings
[elpa] externals/modus-themes 8535e3245a 1/2: Change the accent mappings in modus-operandi-tinted for stylistic consistency
branch: externals/modus-themes commit 8535e3245a3f1354023aa5b3672b9cd72f64f642 Author: Protesilaos Stavrou Commit: Protesilaos Stavrou Change the accent mappings in modus-operandi-tinted for stylistic consistency --- modus-operandi-tinted-theme.el | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modus-operandi-tinted-theme.el b/modus-operandi-tinted-theme.el index a9be4374f8..8af6a802f2 100644 --- a/modus-operandi-tinted-theme.el +++ b/modus-operandi-tinted-theme.el @@ -275,10 +275,10 @@ which corresponds to a minimum contrast in relative luminance of Accent mappings - (accent-0 blue) - (accent-1 magenta-warmer) - (accent-2 cyan) - (accent-3 red) + (accent-0 red-cooler) + (accent-1 cyan) + (accent-2 magenta-cooler) + (accent-3 yellow-warmer) Button mappings
[elpa] externals/el-job d045f9a390 045/143: Switch most uses of time-convert to current-time
branch: externals/el-job commit d045f9a390d0f8e26f22ba39339a67c00d1f35b6 Author: Martin Edström Commit: Martin Edström Switch most uses of time-convert to current-time --- el-job-child.el | 15 +-- el-job.el | 8 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/el-job-child.el b/el-job-child.el index 58543040e4..c3c5611e00 100644 --- a/el-job-child.el +++ b/el-job-child.el @@ -21,12 +21,6 @@ ;;; Code: -;; We use `time-convert' instead of `current-time' because -;; 1. (TICKS . HZ) is fewer cons cells than (HIGH LOW USEC PSEC) -;; 2. (TICKS . HZ) will be future default -;; 3. If we used `current-time', we may have to inject `current-time-list' -;;to be sure about behavior - (defun el-job-child--zip (metalist1 metalist2) "Destructively zip two alists into one. Like the Dash expression \(-zip-with #\\='nconc list1 list2). @@ -71,21 +65,22 @@ add that information to the final return value." (while-let ((input (read-minibuffer ""))) (when (eq input 'die) (throw 'die nil)) - (let (item start output meta results) + (let ((current-time-list nil) ;; Fewer cons cells +item start output meta results) (if input (while input (setq item (pop input)) - (setq start (time-convert nil t)) + (setq start (current-time)) (setq output (funcall func item)) (push (time-since start) meta) - ;; May affect the durations erratically, so do this step after. + ;; May affect the durations erratically, so do this step now after benchmarks done. (setq results (el-job-child--zip output results))) (funcall func)) ;; Ensure durations are in same order that ITEMS came in, letting us ;; associate which with which just by index. (setq meta (nreverse meta)) ;; Timestamp the finish-time. Will be the very `car' of the metadata. -(push (time-convert nil t) meta) +(push (current-time) meta) (let ((print-length nil) (print-level nil) ;; Even though we had set :coding 'utf-8-emacs-unix in the diff --git a/el-job.el b/el-job.el index 5a6ecf03f7..3374f8103c 100644 --- a/el-job.el +++ b/el-job.el @@ -354,7 +354,7 @@ with one character of your choosing, such as a dot." (ready nil :documentation "Processes ready for input. Becomes nil permanently if METHOD is `reap'.") (busy nil :documentation "Processes that have not yet returned output.") stderr - (timestamps (list :accept-launch-request (time-convert nil t))) + (timestamps (list :accept-launch-request (current-time))) (poll-timer (timer-create)) (timeout (timer-create)) finish-times @@ -633,7 +633,7 @@ should trigger `el-job--receive'." (when (eq .method 'reap) (process-send-string proc "die\n")) (setf .queue nil) -(plist-put .timestamps :launched (time-convert nil t)) +(plist-put .timestamps :launched (current-time)) (setf .timeout (run-with-timer 30 nil #'el-job--timeout .id)) (when (eq .method 'poll) (cancel-timer .poll-timer) @@ -671,7 +671,7 @@ or check what is causing FUNCALL to never return. Processes killed: %S" (truncate (* 2 el-job--global-timeout)) procs) (mapc #'el-job--kill-quietly procs)) (setq delay (* delay 1.5)) - (timer-set-time timer (time-add delay (time-convert nil t))) + (timer-set-time timer (time-add delay (current-time))) (timer-set-function timer #'el-job--poll (list procs timer delay)) (timer-activate timer @@ -738,7 +738,7 @@ If nil, infer it from the buffer, if process is still alive." (car (last (sort .finish-times #'time-less-p ;; TODO: Rename this timestamp, I feel it's not intuitive. ;; Maybe :wrapup-begin? - (plist-put .timestamps :got-all-results (time-convert nil t)) + (plist-put .timestamps :got-all-results (current-time)) ;; Cleanup (cancel-timer .timeout) (when .anonymous
[elpa] externals/auctex updated (112517bb62 -> b47645123f)
elpasync pushed a change to branch externals/auctex. from 112517bb62 Add new style/needspace.el new 9cc8811ebf ; * style/ninecolors.el: Remove wrong executable bit. new b47645123f ; * style/langscibook.el: Remove wrong executable bit. Summary of changes: style/langscibook.el | 0 style/ninecolors.el | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 style/langscibook.el mode change 100755 => 100644 style/ninecolors.el
[elpa] externals/el-job ffb216b52d 093/143: Don't record cores-to-use in struct, always use max
branch: externals/el-job commit ffb216b52dfeb6ecaa826ec0affe4fac99edb4e1 Author: Martin Edström Commit: Martin Edström Don't record cores-to-use in struct, always use max --- el-job.el | 35 +++ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/el-job.el b/el-job.el index 9eef61696c..6bccf0f4ea 100644 --- a/el-job.el +++ b/el-job.el @@ -294,7 +294,6 @@ with one character of your choosing, such as a dot." (:copier nil) (:conc-name el-job:)) id - (cores-to-use 1) callback (ready nil :documentation "Processes ready for input.") (busy nil :documentation "Processes that have not yet returned output.") @@ -416,9 +415,7 @@ still at work. IF-BUSY may take on one of three symbols: (if (null id) (let* ((inputs (if (functionp inputs) (funcall inputs) inputs)) (anonymous-job - (el-job--make :cores-to-use (min (length inputs) - (max 1 (1- (num-processors -:callback callback + (el-job--make :callback callback :queued-inputs inputs))) (el-job--spawn-processes anonymous-job load-features @@ -429,11 +426,12 @@ still at work. IF-BUSY may take on one of three symbols: (puthash id (el-job--make :id id) el-jobs))) (do-respawn nil) (do-exec nil)) - (el-job--with job ( .queued-inputs .busy .ready .cores-to-use + (el-job--with job ( .queued-inputs .busy .ready .spawn-args .callback .timestamps ) (unless (and .busy (eq if-busy 'noop)) (plist-put .timestamps :launched (current-time)) ;; TODO: Can we somehow defer this to even later? + ;; Maybe if 'wait, don't funcall. (when (functionp inputs) (setq inputs (funcall inputs))) (if .busy @@ -446,38 +444,27 @@ still at work. IF-BUSY may take on one of three symbols: (setq do-exec t)) (when do-exec (setf .callback callback) -(setf .cores-to-use - ;; FIXME: What if length of inputs has shrunk? - ;; what happens when it list of 3 inputs is split by 7 cores? - ;; If we decide we dont need to remember the N of cores from before, - ;; taking the N of ready processes as good so long as it's not less than inputs, - ;; then we could remove the .cores-to-use field. - (min (max .cores-to-use (length .queued-inputs)) - (max 1 (1- (num-processors) -(unless (and (= .cores-to-use (+ (length .busy) (length .ready))) - (seq-every-p #'process-live-p .ready) - (seq-every-p #'process-live-p .busy)) ; uhh +(unless (seq-every-p #'process-live-p .ready) (setq do-respawn t)) (let ((new-spawn-args (list job load-features inject-vars funcall-per-input))) - (unless (eq (sxhash (cdr .spawn-args)) - (sxhash (cdr new-spawn-args))) + (unless (= (sxhash (cdr .spawn-args)) + (sxhash (cdr new-spawn-args))) (setf .spawn-args new-spawn-args) (el-job--dbg 2 "New arguments, resetting processes for %s" id) (setq do-respawn t))) (when do-respawn (el-job--disable job) (apply #'el-job--spawn-processes .spawn-args)) -(el-job--exec-pending-workload job) -t)) +(el-job--exec-pending-workload job))) (defvar-local el-job-here nil) (defun el-job--spawn-processes (job load-features inject-vars funcall-per-input) "Spin up processes for JOB, standing by for input. For the rest of the arguments, see `el-job-launch'." - (el-job--with job (.stderr .id .cores-to-use .ready .spawn-args) + (el-job--with job (.stderr .id .ready .spawn-args) (let* ((print-length nil) (print-level nil) (print-circle t) @@ -508,7 +495,7 @@ For the rest of the arguments, see `el-job-launch'." (erase-buffer) (current-buffer))) (condition-case err - (dotimes (i .cores-to-use) + (dotimes (i (max 1 (1- (num-processors (let ((proc (make-process :name (format "el-job:%s:%d" ident i) :noquery t @@ -541,14 +528,14 @@ This puts them to work. Each successful child will print output \(even nil output) to its associated process buffer, whereupon something should trigger `el-job--handle-output'." (el-job--with job - ( .ready .busy .input-set