[elpa] externals/pyim 1208a9dcbc: * pyim-cloudim.el (pyim-cloudim:google): Kill buffer.
branch: externals/pyim commit 1208a9dcbc029865bbd75621e9035c8f44def15f Author: Feng Shu Commit: Feng Shu * pyim-cloudim.el (pyim-cloudim:google): Kill buffer. --- pyim-cloudim.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyim-cloudim.el b/pyim-cloudim.el index 703f0b9650..3e05f723dc 100644 --- a/pyim-cloudim.el +++ b/pyim-cloudim.el @@ -142,7 +142,8 @@ t nil 0.2))) (when (bufferp buffer) (with-current-buffer buffer - (pyim-cloudim-parse-google-buffer)) + (prog1 (pyim-cloudim-parse-google-buffer) +(kill-buffer))) (defun pyim-cloudim-parse-google-buffer () "解析 `pyim-cloudim-url-retrieve-sync' 返回的 google buffer."
[nongnu] elpa/helm updated (0f7d7acf57 -> 96fc4587aa)
elpasync pushed a change to branch elpa/helm. from 0f7d7acf57 Merge pull request #2508 from danielnemenyi/master new 8aca822d18 Use a :diacritics slot both in in-buffer and sync sources new 60456a52f6 Fix default match function insertion in matchfns new 454b1bd4f7 Add diacritics slot to helm-comp-read new 6c2874b055 Cleanup helm-cr-default-transformer new 96fc4587aa Fix fuzzy matching score Summary of changes: helm-core.el | 5 +++- helm-mode.el | 75 ++ helm-source.el | 43 - 3 files changed, 58 insertions(+), 65 deletions(-)
[nongnu] elpa/helm 454b1bd4f7 3/5: Add diacritics slot to helm-comp-read
branch: elpa/helm commit 454b1bd4f7a06b0055dac2d41c896d9e75e31982 Author: Thierry Volpiatto Commit: Thierry Volpiatto Add diacritics slot to helm-comp-read --- helm-mode.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helm-mode.el b/helm-mode.el index e1226c9bbd..14ddcc5a16 100644 --- a/helm-mode.el +++ b/helm-mode.el @@ -586,6 +586,7 @@ If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." (name "Helm Completions") header-name candidates-in-buffer +diacritics match-part match-dynamic exec-when-only-one @@ -819,6 +820,7 @@ that use `helm-comp-read'. See `helm-M-x' for example." :persistent-action persistent-action :persistent-help persistent-help :fuzzy-match fuzzy + :diacritics diacritics :keymap keymap :must-match must-match :group group @@ -839,6 +841,7 @@ that use `helm-comp-read'. See `helm-M-x' for example." :requires-pattern requires-pattern :persistent-action persistent-action :fuzzy-match fuzzy +:diacritics diacritics :keymap keymap :must-match must-match :group group
[nongnu] elpa/helm-core updated (0f7d7acf57 -> 96fc4587aa)
elpasync pushed a change to branch elpa/helm-core. from 0f7d7acf57 Merge pull request #2508 from danielnemenyi/master adds 8aca822d18 Use a :diacritics slot both in in-buffer and sync sources adds 60456a52f6 Fix default match function insertion in matchfns adds 454b1bd4f7 Add diacritics slot to helm-comp-read adds 6c2874b055 Cleanup helm-cr-default-transformer adds 96fc4587aa Fix fuzzy matching score No new revisions were added by this update. Summary of changes: helm-core.el | 5 +++- helm-mode.el | 75 ++ helm-source.el | 43 - 3 files changed, 58 insertions(+), 65 deletions(-)
[nongnu] elpa/helm 8aca822d18 1/5: Use a :diacritics slot both in in-buffer and sync sources
branch: elpa/helm commit 8aca822d1864c7c03dda01f0f0ac3c6e96e47091 Author: Thierry Volpiatto Commit: Thierry Volpiatto Use a :diacritics slot both in in-buffer and sync sources for consistency. Thus having an unbound symbol in :match slot create problems when using both fuzzy and diacritics confusing the helm--setup-source method. --- helm-source.el | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/helm-source.el b/helm-source.el index cbface93d0..e56b1efcd9 100644 --- a/helm-source.el +++ b/helm-source.el @@ -470,15 +470,19 @@ in the list of results and then results from the other functions, respectively. - If the special symbol `diacritics' is given as value helm will ignore - diacritics when matching candidates. - This attribute has no effect for asynchronous sources (see attribute `candidates'), and sources using `match-dynamic' since they perform pattern matching themselves. Note that FUZZY-MATCH slot will overhide value of this slot.") + (diacritics +:initarg :diacritics +:initform nil +:custom boolean +:documentation +" Ignore diacritics when searching.") + (match-on-real :initarg :match-on-real :initform nil @@ -822,14 +826,7 @@ inherit from `helm-source'.") (match :initform '(identity)) - - (diacritics -:initarg :diacritics -:initform nil -:custom boolean -:documentation -" Ignore diacritics when searching.") - + (get-line :initarg :get-line :initform 'buffer-substring-no-properties @@ -988,11 +985,9 @@ Arguments ARGS are keyword value pairs as defined in CLASS." "Prepare match or search functions for class SOURCE. Argument METHOD is the matching method used by SOURCE either `match' or `search'." - (let* ((diacritics (cl-case method - (match (eq (slot-value source 'match) 'diacritics)) - (search (slot-value source 'diacritics + (let* ((diacritics (slot-value source 'diacritics)) (defmatch (helm-aif (slot-value source 'match) - (unless diacritics (helm-mklist it + (helm-mklist it))) (defmatch-strict (helm-aif (and (eq method 'match) (slot-value source 'match-strict)) (helm-mklist it)))
[nongnu] elpa/helm 96fc4587aa 5/5: Fix fuzzy matching score
branch: elpa/helm commit 96fc4587aa73757f56550b9def7499fcb5b1a51f Author: Thierry Volpiatto Commit: Thierry Volpiatto Fix fuzzy matching score Unknown candidates from helm-mode should always go on top. --- helm-core.el | 5 - helm-mode.el | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/helm-core.el b/helm-core.el index acd4b56738..b536f2fd05 100644 --- a/helm-core.el +++ b/helm-core.el @@ -4325,7 +4325,10 @@ This function is used with sources built with `helm-source-sync'." (defvar helm-fuzzy-default-score-fn #'helm-fuzzy-flex-style-score) (defun helm-score-candidate-for-pattern (candidate pattern) "Assign score to CANDIDATE according to PATTERN." - (funcall helm-fuzzy-default-score-fn candidate pattern)) + ;; Unknown candidates always go on top. + (if (equal (get-text-property 0 'display candidate) "[?]") + 200.00 +(funcall helm-fuzzy-default-score-fn candidate pattern))) ;; The flex scoring needs a regexp whereas the fuzzy scoring works ;; directly with helm-pattern, so cache the needed regexp for flex diff --git a/helm-mode.el b/helm-mode.el index bcb4f2ad63..eb717d98de 100644 --- a/helm-mode.el +++ b/helm-mode.el @@ -515,7 +515,9 @@ If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." ;; Unquote helm-pattern when it is added as candidate ;; (Bug#2015). (let ((pat (replace-regexp-in-string "\\s\\" "" helm-pattern))) - (if (or (string= pat "") (helm-cr--pattern-in-candidates-p lst pat)) + (if (or (string= pat "") + (eq must-match t) + (helm-cr--pattern-in-candidates-p lst pat)) lst (append (list (cons (concat (propertize " " 'display
[nongnu] elpa/helm 60456a52f6 2/5: Fix default match function insertion in matchfns
branch: elpa/helm commit 60456a52f6793472599bcda98a3727d323d0224c Author: Thierry Volpiatto Commit: Thierry Volpiatto Fix default match function insertion in matchfns Otherwise we may miss the default function. --- helm-source.el | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/helm-source.el b/helm-source.el index e56b1efcd9..36f92fcd0b 100644 --- a/helm-source.el +++ b/helm-source.el @@ -1007,11 +1007,12 @@ or `search'." (migemo (append helm-mm-default-match-functions defmatch '(helm-mm-3-migemo-match))) - ((and defmatch (not diacritics)) -(append helm-mm-default-match-functions defmatch)) (diacritics -(append (list 'helm-mm-exact-match - 'helm-mm-3-match-on-diacritics))) +(delq nil + `(helm-mm-exact-match +,@defmatch helm-mm-3-match-on-diacritics))) + (defmatch +(append helm-mm-default-match-functions defmatch)) (t helm-mm-default-match-functions))) (search (cond (defsearch-strict) ((and migemo diacritics) @@ -1022,11 +1023,12 @@ or `search'." (migemo (append helm-mm-default-search-functions defsearch '(helm-mm-3-migemo-search))) -((and defsearch (not diacritics)) - (append helm-mm-default-search-functions defsearch)) (diacritics - `(helm-mm-exact-search - ,@defsearch helm-mm-3-search-on-diacritics)) + (delq nil + `(helm-mm-exact-search + ,@defsearch helm-mm-3-search-on-diacritics))) +(defsearch + (append helm-mm-default-search-functions defsearch)) (t helm-mm-default-search-functions))
[nongnu] elpa/helm 6c2874b055 4/5: Cleanup helm-cr-default-transformer
branch: elpa/helm commit 6c2874b055c07e74f4468739f5df2e29e404b534 Author: Thierry Volpiatto Commit: Thierry Volpiatto Cleanup helm-cr-default-transformer --- helm-mode.el | 70 +--- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/helm-mode.el b/helm-mode.el index 14ddcc5a16..bcb4f2ad63 100644 --- a/helm-mode.el +++ b/helm-mode.el @@ -492,51 +492,39 @@ If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." (t (all-completions input collection test) (if sort-fn (sort cands sort-fn) cands -(defun helm-cr--pattern-in-candidates-p (candidates) - (or (assoc helm-pattern candidates) - (assq (intern helm-pattern) candidates) - (member helm-pattern candidates) - (member (downcase helm-pattern) candidates) - (member (upcase helm-pattern) candidates))) +(cl-defun helm-cr--pattern-in-candidates-p (candidates &optional (pattern helm-pattern)) + (or (assoc pattern candidates) + (assq (intern pattern) candidates) + (member pattern candidates) + (member (downcase pattern) candidates) + (member (upcase pattern) candidates))) (defun helm-cr-default-transformer (candidates source) "Default filter candidate function for `helm-comp-read'." - (let ((must-match (helm-get-attr 'must-match source)) -unknown-pattern) -(unless (or (eq must-match t) -(string= helm-pattern "") -;; Check if pattern is already member of candidates. -(helm-cr--pattern-in-candidates-p candidates)) - (setq candidates (append (list -;; Unquote helm-pattern -;; when it is added -;; as candidate: Why? (Bug#2015) -;; (replace-regexp-in-string -;; "\\s\\" "" helm-pattern) -helm-pattern) - candidates)) - ;; Notify pattern have been added to candidates. - (setq unknown-pattern t)) + (let ((must-match (helm-get-attr 'must-match source))) (cl-loop for c in candidates - for cand = (if (stringp c) -(replace-regexp-in-string "\\s\\" "" c) - c) - for pat = (replace-regexp-in-string "\\s\\" "" helm-pattern) - if (and (or (equal c pat) (equal c helm-pattern)) - unknown-pattern) - collect - (cons (concat (propertize -" " 'display -(propertize "[?]" 'face 'helm-ff-prefix)) - c) - c) - into lst - else collect (if (and (stringp cand) - (string-match "\n" cand)) - (cons (replace-regexp-in-string "\n" "->" c) c) -c) - into lst - finally return (helm-fast-remove-dups lst :test 'equal + for cand = (let ((elm (if (stringp c) + (replace-regexp-in-string "\\s\\" "" c) + c))) + (cond ((and (stringp elm) + (string-match "\n" elm)) + (cons (replace-regexp-in-string "\n" "->" elm) c)) +(t c))) + collect cand into lst + finally return + ;; Unquote helm-pattern when it is added as candidate + ;; (Bug#2015). + (let ((pat (replace-regexp-in-string "\\s\\" "" helm-pattern))) + (if (or (string= pat "") (helm-cr--pattern-in-candidates-p lst pat)) + lst + (append (list (cons (concat (propertize + " " 'display + (propertize "[?]" + 'face 'helm-ff-prefix + 'unknown t)) + pat) + pat)) + lst)) (defun helm-comp-read--move-to-first-real-candidate () (helm-aif (helm-get-selection nil 'withprop)
[nongnu] elpa/helm-core updated (96fc4587aa -> 4387d7a002)
elpasync pushed a change to branch elpa/helm-core. from 96fc4587aa Fix fuzzy matching score adds 4387d7a002 Remove obsolete helm-mode-fuzzy-match and add new user var for diacritics in helm-mode No new revisions were added by this update. Summary of changes: helm-mode.el | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-)
[elpa] externals/eglot d5e335f299: Per #954: Improve README.md
branch: externals/eglot commit d5e335f299216bdf3fe4b0d71fb6e24596a35a6a Author: João Távora Commit: João Távora Per #954: Improve README.md * README.md (Obligatory animated gif section): Rework. --- README.md | 44 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 010ab30dcf..18d895943f 100644 --- a/README.md +++ b/README.md @@ -399,25 +399,44 @@ snippets. ## Diagnostics  -Eglot relays the diagnostics information received from the server to -[flymake][flymake]. Command `display-local-help` (bound to `C-h .`) -shows the diagnostic message under point, but flymake provides other -convenient ways to handle diagnostic errors. +Eglot relays the diagnostics information received from the LSP server +to Emacs's [Flymake][flymake], which annotates/underlines the +problematic parts of the buffer. The information is shared with the +[ElDoc][eldoc] system, meaning that the commands `eldoc` and +`eldoc-doc-buffer` (the latter bound to `C-h-.` for convenience) show +diagnostics along with other documentation under point. -When Eglot manages a buffer, it disables other flymake backends. See -variable `eglot-stay-out-of` to change that. +[Flymake][flymake] provides other convenient ways to view and manage +diagnostic errors. These are described in its [manual][flymake]. + +When Eglot manages a buffer, it disables pre-existing Flymake +backends. See variable `eglot-stay-out-of` to change that. ## Code Actions  -The server may provide code actions, for example, to fix a diagnostic -error or to suggest refactoring edits. Command `eglot-code-actions` -queries the server for possible code actions at point. See variable -`eglot-confirm-server-initiated-edits` to customize its behavior. +The LSP server may provide code actions, for example, to fix a +diagnostic error or to suggest refactoring edits. The commands are +frequently associating with Flymake diagnostic annotations, so that +left-clicking them shows a menu. Additionally, the command +`eglot-code-actions` asks the server for any code spanning a given +region. + +Sometimes, these code actions are initiated by the server. See +`eglot-confirm-server-initiated-edits` to control that behaviour. -## Hover on symbol +## Hover on symbol /function signature  +Here, too, the LSP server's view of a given symbol or function +signature is relayed to the [ElDoc][eldoc] system. The commands +`eldoc` and `eldoc-doc-buffer` commands access that information. + +There are customization variables to help adjust [ElDoc][eldoc]'s +liberal use of the lower "echo area", among other options. If you +still find the solicitous nature of this LSP feature too distracing, +you can use `eglot-ignored-server-capabilities` to turn it off. + ## Rename  @@ -432,7 +451,7 @@ To jump to the definition of a symbol, use the built-in ## Find references  -Eglot here relies on emacs' built-in functionality as well. +Eglot here relies on Emacs' built-in functionality as well. `xref-find-references` is bound to `M-?`. Additionally, Eglot provides the following similar commands: `eglot-find-declaration`, `eglot-find-implementation`, `eglot-find-typeDefinition`. @@ -552,6 +571,7 @@ for the request form, and we'll send it to you. [windows-subprocess-hang]: https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/Subprocess-hang.html [company]: https://elpa.gnu.org/packages/company.html [flymake]: https://www.gnu.org/software/emacs/manual/html_node/flymake/index.html#Top +[eldoc]: https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/eldoc.el [yasnippet]: https://elpa.gnu.org/packages/yasnippet.html [markdown]: https://github.com/defunkt/markdown-mode [gospb]: https://opensource.googleblog.com/2020/10/announcing-latest-google-open-source.html
[nongnu] elpa/helm 4387d7a002: Remove obsolete helm-mode-fuzzy-match and add new user var for diacritics in helm-mode
branch: elpa/helm commit 4387d7a002e4e7a1896f9676176aeb2f7a3b4c38 Author: Thierry Volpiatto Commit: Thierry Volpiatto Remove obsolete helm-mode-fuzzy-match and add new user var for diacritics in helm-mode --- helm-mode.el | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/helm-mode.el b/helm-mode.el index eb717d98de..4f1e39c10a 100644 --- a/helm-mode.el +++ b/helm-mode.el @@ -190,16 +190,10 @@ will be used." :group 'helm-mode :type 'function) -(defcustom helm-mode-fuzzy-match nil - "Enable fuzzy matching in `helm-mode' globally. - -This is deprecated, use instead helm-fuzzy as `helm-completion-style' or -even better 'emacs as `helm-completion-style' and add 'flex to -`completion-styles' (emacs-27) or 'helm-flex if 'flex is not available -in `completion-styles-alist' (emacs-26)." +(defcustom helm-mode-use-diacritics nil + "Ignore diacritics in completing-read." :group 'helm-mode :type 'boolean) -(make-obsolete-variable 'helm-mode-fuzzy-match 'helm-completion-style "3.6.0") (defcustom helm-completion-mark-suffix t "Push mark at end of suffix when non nil." @@ -913,7 +907,7 @@ that use `helm-comp-read'. See `helm-M-x' for example." (or (car-safe default) default))) :filtered-candidate-transformer 'helm-apropos-default-sort-fn :help-message #'helm-comp-read-help-message - :fuzzy-match helm-mode-fuzzy-match + :fuzzy-match (eq helm-completion-style 'helm-fuzzy) :persistent-action (lambda (candidate) (helm-lisp-completion-persistent-action @@ -953,6 +947,7 @@ It should be used when candidate list doesn't need to be rebuilt dynamically." :input-history history :must-match require-match :alistp nil + :diacritics helm-mode-use-diacritics :help-message #'helm-comp-read-help-message :name name :requires-pattern (if (and (stringp default) @@ -965,7 +960,7 @@ It should be used when candidate list doesn't need to be rebuilt dynamically." :nomark (null helm-comp-read-use-marked) :candidates-in-buffer cands-in-buffer :exec-when-only-one exec-when-only-one - :fuzzy helm-mode-fuzzy-match + :fuzzy (eq helm-completion-style 'helm-fuzzy) :buffer buffer ;; If DEF is not provided, fallback to empty string ;; to avoid `thing-at-point' to be appended on top of list @@ -1071,6 +1066,7 @@ This handler uses dynamic matching which allows honouring `completion-styles'." (and helm-completion-in-region-default-sort-fn (list helm-completion-in-region-default-sort-fn))) :match-dynamic (eq helm-completion-style 'emacs) + :diacritics helm-mode-use-diacritics :fuzzy (eq helm-completion-style 'helm-fuzzy) :exec-when-only-one exec-when-only-one :quit-when-no-cand (eq require-match t) @@ -1119,8 +1115,7 @@ This handler uses dynamic matching which allows honouring `completion-styles'." (standard (and (memq helm-completion-style '(helm helm-fuzzy)) t)) (fn (if standard #'helm-completing-read-default-1 - #'helm-completing-read-default-2)) - (helm-mode-fuzzy-match (eq helm-completion-style 'helm-fuzzy))) + #'helm-completing-read-default-2))) (funcall fn prompt collection test require-match init hist default inherit-input-method name buffer
[elpa] externals/corfu dc4623b459: Version 0.24
branch: externals/corfu commit dc4623b45947dc4fa270a9fcf8ba998e70b36c1b Author: Daniel Mendler Commit: Daniel Mendler Version 0.24 --- corfu.el| 2 +- extensions/corfu-history.el | 2 +- extensions/corfu-indexed.el | 2 +- extensions/corfu-info.el| 2 +- extensions/corfu-quick.el | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/corfu.el b/corfu.el index 87aef110f9..f41e025337 100644 --- a/corfu.el +++ b/corfu.el @@ -5,7 +5,7 @@ ;; Author: Daniel Mendler ;; Maintainer: Daniel Mendler ;; Created: 2021 -;; Version: 0.23 +;; Version: 0.24 ;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://github.com/minad/corfu diff --git a/extensions/corfu-history.el b/extensions/corfu-history.el index 0aec3dd23c..3a2cd7758a 100644 --- a/extensions/corfu-history.el +++ b/extensions/corfu-history.el @@ -6,7 +6,7 @@ ;; Maintainer: Daniel Mendler ;; Created: 2022 ;; Version: 0.1 -;; Package-Requires: ((emacs "27.1") (corfu "0.23")) +;; Package-Requires: ((emacs "27.1") (corfu "0.24")) ;; Homepage: https://github.com/minad/corfu ;; This file is part of GNU Emacs. diff --git a/extensions/corfu-indexed.el b/extensions/corfu-indexed.el index 5b980a17ca..5b817cde38 100644 --- a/extensions/corfu-indexed.el +++ b/extensions/corfu-indexed.el @@ -6,7 +6,7 @@ ;; Maintainer: Daniel Mendler ;; Created: 2022 ;; Version: 0.1 -;; Package-Requires: ((emacs "27.1") (corfu "0.23")) +;; Package-Requires: ((emacs "27.1") (corfu "0.24")) ;; Homepage: https://github.com/minad/corfu ;; This file is part of GNU Emacs. diff --git a/extensions/corfu-info.el b/extensions/corfu-info.el index ed5e511522..14003500a9 100644 --- a/extensions/corfu-info.el +++ b/extensions/corfu-info.el @@ -6,7 +6,7 @@ ;; Maintainer: Daniel Mendler ;; Created: 2022 ;; Version: 0.1 -;; Package-Requires: ((emacs "27.1") (corfu "0.23")) +;; Package-Requires: ((emacs "27.1") (corfu "0.24")) ;; Homepage: https://github.com/minad/corfu ;; This file is part of GNU Emacs. diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el index ddbce0a65b..df02eccda7 100644 --- a/extensions/corfu-quick.el +++ b/extensions/corfu-quick.el @@ -6,7 +6,7 @@ ;; Maintainer: Daniel Mendler ;; Created: 2022 ;; Version: 0.1 -;; Package-Requires: ((emacs "27.1") (corfu "0.23")) +;; Package-Requires: ((emacs "27.1") (corfu "0.24")) ;; Homepage: https://github.com/minad/corfu ;; This file is part of GNU Emacs.
[elpa] externals-release/org 4fe59b688f: org-babel-load-file: Fix loading with non-nil COMPILE argument
branch: externals-release/org commit 4fe59b688f09baed819a508dc18f0e41be05aa77 Author: Ihor Radchenko Commit: Ihor Radchenko org-babel-load-file: Fix loading with non-nil COMPILE argument * lisp/org.el (org-babel-load-file): Use correct file name to load compiled file. Fixes https://orgmode.org/list/t5j75h$dbo$1...@ciao.gmane.io --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index e0144605b0..253581cb07 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -247,7 +247,7 @@ byte-compiled before it is loaded." (if compile (progn (byte-compile-file tangled-file) - (load tangled-file) + (load (byte-compile-dest-file tangled-file)) (message "Compiled and loaded %s" tangled-file)) (load-file tangled-file) (message "Loaded %s" tangled-file
[elpa] externals/org c508ff41e4: Merge branch 'bugfix'
branch: externals/org commit c508ff41e44c45626e71bab6324a5b03b98d8803 Merge: 5766ddd758 4fe59b688f Author: Ihor Radchenko Commit: Ihor Radchenko Merge branch 'bugfix' --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 48d992d9ed..47a16e94b0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -264,7 +264,7 @@ byte-compiled before it is loaded." (if compile (progn (byte-compile-file tangled-file) - (load tangled-file) + (load (byte-compile-dest-file tangled-file)) (message "Compiled and loaded %s" tangled-file)) (load-file tangled-file) (message "Loaded %s" tangled-file
[elpa] externals/org updated (5766ddd758 -> c508ff41e4)
elpasync pushed a change to branch externals/org. from 5766ddd758 ox-latex: Prefix lst: to source block labels new 4fe59b688f org-babel-load-file: Fix loading with non-nil COMPILE argument new c508ff41e4 Merge branch 'bugfix' Summary of changes: lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[elpa] externals/osm 563d9646b1: Version 0.8
branch: externals/osm commit 563d9646b1f8df37cefcec5d51d20249eba407da Author: Daniel Mendler Commit: Daniel Mendler Version 0.8 --- osm.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm.el b/osm.el index a7a1f87e85..b96ac59e15 100644 --- a/osm.el +++ b/osm.el @@ -5,7 +5,7 @@ ;; Author: Daniel Mendler ;; Maintainer: Daniel Mendler ;; Created: 2022 -;; Version: 0.7 +;; Version: 0.8 ;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://github.com/minad/osm
[nongnu] elpa/helm-core updated (4387d7a002 -> 70c9e00470)
elpasync pushed a change to branch elpa/helm-core. from 4387d7a002 Remove obsolete helm-mode-fuzzy-match and add new user var for diacritics in helm-mode adds 70c9e00470 Rename helm-mode-use-diacritics to helm-mode-ignore-diacritics No new revisions were added by this update. Summary of changes: helm-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
[nongnu] elpa/helm 70c9e00470: Rename helm-mode-use-diacritics to helm-mode-ignore-diacritics
branch: elpa/helm commit 70c9e00470d0b53a47dde93d050076582d596bd1 Author: Thierry Volpiatto Commit: Thierry Volpiatto Rename helm-mode-use-diacritics to helm-mode-ignore-diacritics --- helm-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-mode.el b/helm-mode.el index 4f1e39c10a..83637d0889 100644 --- a/helm-mode.el +++ b/helm-mode.el @@ -190,7 +190,7 @@ will be used." :group 'helm-mode :type 'function) -(defcustom helm-mode-use-diacritics nil +(defcustom helm-mode-ignore-diacritics nil "Ignore diacritics in completing-read." :group 'helm-mode :type 'boolean) @@ -947,7 +947,7 @@ It should be used when candidate list doesn't need to be rebuilt dynamically." :input-history history :must-match require-match :alistp nil - :diacritics helm-mode-use-diacritics + :diacritics helm-mode-ignore-diacritics :help-message #'helm-comp-read-help-message :name name :requires-pattern (if (and (stringp default) @@ -1066,7 +1066,7 @@ This handler uses dynamic matching which allows honouring `completion-styles'." (and helm-completion-in-region-default-sort-fn (list helm-completion-in-region-default-sort-fn))) :match-dynamic (eq helm-completion-style 'emacs) - :diacritics helm-mode-use-diacritics + :diacritics helm-mode-ignore-diacritics :fuzzy (eq helm-completion-style 'helm-fuzzy) :exec-when-only-one exec-when-only-one :quit-when-no-cand (eq require-match t)
[nongnu] elpa/evil-matchit updated (b47931128c -> ec7a8479fe)
elpasync pushed a change to branch elpa/evil-matchit. from b47931128c fixed doc new 415f485049 upgrade test suite new ec7a8479fe fixed broken flex lexer since emacs 28.1 Summary of changes: Makefile| 4 +- evil-matchit-sdk.el | 137 +++- tests/evil-matchit-tests.el | 2 +- 3 files changed, 138 insertions(+), 5 deletions(-)
[nongnu] elpa/evil-matchit ec7a8479fe 2/2: fixed broken flex lexer since emacs 28.1
branch: elpa/evil-matchit commit ec7a8479fec4c9249b52be9fd8e201bb0f3206f2 Author: Chen Bin Commit: Chen Bin fixed broken flex lexer since emacs 28.1 --- evil-matchit-sdk.el | 137 +++- tests/evil-matchit-tests.el | 2 +- 2 files changed, 136 insertions(+), 3 deletions(-) diff --git a/evil-matchit-sdk.el b/evil-matchit-sdk.el index 9f5830c216..14bc6a1635 100644 --- a/evil-matchit-sdk.el +++ b/evil-matchit-sdk.el @@ -537,15 +537,148 @@ after calling this function." (setq start (match-end 0))) count)) +(defun evilmi-semantic-flex (start end &optional depth length) + "Using the syntax table, do something roughly equivalent to flex. +Semantically check between START and END. Optional argument DEPTH +indicates at what level to scan over entire lists. +The return value is a token stream. Each element is a list, such of +the form (symbol start-expression . end-expression) where SYMBOL +denotes the token type. +END does not mark the end of the text scanned, only the end of the +beginning of text scanned. Thus, if a string extends past END, the +end of the return token will be larger than END. To truly restrict +scanning, use `narrow-to-region'. +The last argument, LENGTH specifies that only LENGTH tokens are returned." + (if (not semantic-flex-keywords-obarray) + (setq semantic-flex-keywords-obarray [ nil ])) + (let ((ts nil) +(pos (point)) +(ep nil) +(curdepth 0) +(cs (if comment-start-skip +(concat "\\(\\s<\\|" comment-start-skip "\\)") + (concat "\\(\\s<\\)"))) +(number-expression "\\(\\<[0-9]+[.][0-9]+\\([eE][-+]?[0-9]+\\)?[fFdD]?\\>\\|\\<[0-9]+[.][eE][-+]?[0-9]+[fFdD]?\\>\\|\\<[0-9]+[.][fFdD]\\>\\|\\<[0-9]+[.]\\|[.][0-9]+\\([eE][-+]?[0-9]+\\)?[fFdD]?\\>\\|\\<[0-9]+[eE][-+]?[0-9]+[fFdD]?\\>\\|\\<0[xX][[:xdigit:]]+[lL]?\\>\\|\\<[0-9]+[lLfFdD]?\\>\\)") +;; Use the default depth if it is not specified. +(depth (or depth 0))) + +(goto-char start) +(while (and (< (point) end) (or (not length) (<= (length ts) length))) + (cond + ;; skip newlines + ((looking-at "\\s-*\\(\n\\|\\s>\\)")) + + ;; skip whitespace + ((looking-at "\\s-+")) + + ;; numbers + ((looking-at number-expression) +(setq ts (cons (cons 'number + (cons (match-beginning 0) + (match-end 0))) + ts))) + ;; symbols + ((looking-at "\\(\\sw\\|\\s_\\)+") +(setq ts (cons (cons +;; Get info on if this is a keyword or not +(or (semantic-lex-keyword-p (match-string 0)) +'symbol) +(cons (match-beginning 0) (match-end 0))) + ts))) + + ;; Character quoting characters (ie, \n as newline) + ((looking-at "\\s\\+") +(setq ts (cons (cons 'charquote + (cons (match-beginning 0) (match-end 0))) + ts))) + + ;; Open parens, or semantic-lists. + ((looking-at "\\s(") +(if (or (not depth) (< curdepth depth)) +(progn + (setq curdepth (1+ curdepth)) + (setq ts (cons (cons 'open-paren + (cons (match-beginning 0) (match-end 0))) + ts))) + (setq ts (cons +(cons 'semantic-list + (cons (match-beginning 0) +(save-excursion + (condition-case nil + (forward-list 1) +;; This case makes flex robust +;; to broken lists. +(error + (goto-char end))) + (setq ep (point) +ts + ;; Close parens + ((looking-at "\\s)") +(setq ts (cons (cons 'close-paren + (cons (match-beginning 0) (match-end 0))) + ts)) +(setq curdepth (1- curdepth))) + + ;; String initiators + ((looking-at "\\s\"") +;; Zing to the end of this string. +(setq ts (cons (cons 'string + (cons (match-beginning 0) + (save-excursion + (condition-case nil + (forward-sexp 1) + ;; This case makes flex + ;; robust to broken strings. + (error +(goto-char end))) + (setq ep (point) + ts))) + + ;; comments
[nongnu] elpa/evil-matchit 415f485049 1/2: upgrade test suite
branch: elpa/evil-matchit commit 415f485049f10d93b1033c59482b1811063d3660 Author: Chen Bin Commit: Chen Bin upgrade test suite --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 83a03c168f..66f37fb7ae 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ clean: .PHONY: deps deps: @mkdir -p deps; - @if [ ! -f deps/evil-1.14.0/evil.el ]; then curl -L https://stable.melpa.org/packages/evil-1.14.0.tar | tar x -C deps/; fi; + @if [ ! -f deps/evil-1.14.2/evil.el ]; then curl -L https://stable.melpa.org/packages/evil-1.14.2.tar | tar x -C deps/; fi; @if [ ! -f deps/lua-mode.el ]; then curl -L https://stable.melpa.org/packages/lua-mode-20210802.el > deps/lua-mode.el; fi; @if [ ! -f deps/markdown-mode.el ]; then curl -L https://stable.melpa.org/packages/markdown-mode-2.5.el > deps/markdown-mode.el; fi; @if [ ! -f deps/tuareg-2.2.0/tuareg.el ]; then curl -L https://stable.melpa.org/packages/tuareg-2.2.0.tar | tar x -C deps/; fi; @@ -19,4 +19,4 @@ deps: .PHONY: test test: deps clean - @$(EMACS) -batch -Q -L . -L deps/evil-1.14.0 -l deps/yaml-mode.el -l deps/lua-mode.el -l deps/markdown-mode.el -L deps/tuareg-2.2.0 -l evil-matchit.el -l tests/evil-matchit-tests.el + @$(EMACS) -batch -Q -L . -L deps/evil-1.14.2 -l deps/yaml-mode.el -l deps/lua-mode.el -l deps/markdown-mode.el -L deps/tuareg-2.2.0 -l evil-matchit.el -l tests/evil-matchit-tests.el
[elpa] main 1adbc186da: * copyright_exceptions (parser-generator-ll-export.el): Add entry
branch: main commit 1adbc186da3fbf59ee9dc73e774fa8bcbbbaad1a Author: Stefan Monnier Commit: Stefan Monnier * copyright_exceptions (parser-generator-ll-export.el): Add entry --- copyright_exceptions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/copyright_exceptions b/copyright_exceptions index 9ae061220b..26b39a7f3d 100644 --- a/copyright_exceptions +++ b/copyright_exceptions @@ -34,16 +34,17 @@ auctex/style/scrreprt.el auctex/style/slovak.el auctex/style/swedish.el auctex/style/virtex.el -capf-autosuggest/capf-autosuggest.el:;; package is stored in GNU ELPA, non-trivial patches require copyright capf-autosuggest/capf-autosuggest.el:;; assignment to the FSF, see info node "(emacs) Copyright Assignment". -coterm/coterm.el:;; package is stored in GNU ELPA, non-trivial patches require copyright +capf-autosuggest/capf-autosuggest.el:;; package is stored in GNU ELPA, non-trivial patches require copyright coterm/coterm.el:;; assignment to the FSF, see info node "(emacs) Copyright Assignment". +coterm/coterm.el:;; package is stored in GNU ELPA, non-trivial patches require copyright excorporate/excorporate-calfw.el:;; copyright assignment papers on file with the FSF. hyperbole/hib-doc-id.el:;; Copyright: hyperbole/kotl/kotl-autoloads.el mmm-mode/mmm-noweb.el:;; Copyright 1995 by Thorsten.Ohl @ Physik.TH-Darmstadt.de mmm-mode/mmm-noweb.el:;; Copyright 2003, 2004 Joe Kelsey mmm-mode/mmm-rpm.el:;; Copyright (C) 2000 by Marcus Harnisch +parser-generator/parser-generator-ll-export.el: ;; Optional copyright parser-generator/parser-generator-lr-export.el: ;; Optional copyright python/python.el: ;; copyright, license, credits, quit and exit are added by the site realgud/realgud-recursive-autoloads.el
[nongnu] elpa/git-commit 670dad14b5 2/5: git-rebase-mode-show-keybindings: Cosmetics
branch: elpa/git-commit commit 670dad14b55627a6a97fc369587639a543b5db59 Author: Jonas Bernoulli Commit: Jonas Bernoulli git-rebase-mode-show-keybindings: Cosmetics --- lisp/git-rebase.el | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el index 897a00c416..941c7962e6 100644 --- a/lisp/git-rebase.el +++ b/lisp/git-rebase.el @@ -793,15 +793,17 @@ By default, this is the same except for the \"pick\" command." nil t) (let ((cmd (intern (concat "git-rebase-" (match-string 3) (if (not (fboundp cmd)) -(delete-region (line-beginning-position) (1+ (line-end-position))) +(delete-region (line-beginning-position) + (1+ (line-end-position))) (replace-match " " t t nil 1) (replace-match - (format "%-8s" - (mapconcat #'key-description - (--remove (eq (elt it 0) 'menu-bar) -(reverse (where-is-internal - cmd git-rebase-mode-map))) - ", ")) + (format +"%-8s" +(mapconcat #'key-description + (cl-remove-if (lambda (key) (eq (elt key 0) 'menu-bar)) + (reverse (where-is-internal + cmd git-rebase-mode-map))) + ", ")) t t nil 2 (add-hook 'git-rebase-mode-hook #'git-rebase-mode-show-keybindings t)
[nongnu] elpa/git-commit 5ddf251823 3/5: git-rebase-mode-show-keybindings: Propertize all keys
branch: elpa/git-commit commit 5ddf251823227cbe64ddf406201d5fb1a7c3fc02 Author: Jonas Bernoulli Commit: Jonas Bernoulli git-rebase-mode-show-keybindings: Propertize all keys Do not propertize their padding. --- lisp/git-rebase.el | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el index 941c7962e6..345fab239e 100644 --- a/lisp/git-rebase.el +++ b/lisp/git-rebase.el @@ -783,9 +783,10 @@ By default, this is the same except for the \"pick\" command." nil t)) (goto-char (line-beginning-position)) (pcase-dolist (`(,cmd . ,desc) git-rebase-command-descriptions) - (insert (format "%s %-8s %s\n" + (insert (format "%s %s %s\n" comment-start - (substitute-command-keys (format "\\[%s]" cmd)) + (string-pad + (substitute-command-keys (format "\\[%s]" cmd)) 8) desc))) (while (re-search-forward (concat git-rebase-comment-re "\\( ?\\)\\([^\n,],\\) " @@ -797,13 +798,16 @@ By default, this is the same except for the \"pick\" command." (1+ (line-end-position))) (replace-match " " t t nil 1) (replace-match - (format -"%-8s" -(mapconcat #'key-description + (string-pad +(mapconcat (lambda (key) + (save-match-data + (substitute-command-keys +(format "\\`%s'" (key-description key) (cl-remove-if (lambda (key) (eq (elt key 0) 'menu-bar)) (reverse (where-is-internal cmd git-rebase-mode-map))) - ", ")) + ", ") +8) t t nil 2 (add-hook 'git-rebase-mode-hook #'git-rebase-mode-show-keybindings t)
[nongnu] elpa/magit updated (12272c825d -> aff4180479)
elpasync pushed a change to branch elpa/magit. from 12272c825d Don't declare functions that usually are not available adds 85dfb25b15 git-rebase-mode-map: Cosmetics adds 670dad14b5 git-rebase-mode-show-keybindings: Cosmetics adds 5ddf251823 git-rebase-mode-show-keybindings: Propertize all keys adds 5cc1e06aec git-rebase-mode-show-keybindings: Align Git's continued help text adds aff4180479 git-rebase-mode-show-keybindings: Preserve comment face No new revisions were added by this update. Summary of changes: lisp/git-rebase.el | 53 + 1 file changed, 33 insertions(+), 20 deletions(-)
[nongnu] elpa/git-commit 85dfb25b15 1/5: git-rebase-mode-map: Cosmetics
branch: elpa/git-commit commit 85dfb25b15606ff7ff2ea6b76a5cc0d6d667fb49 Author: Jonas Bernoulli Commit: Jonas Bernoulli git-rebase-mode-map: Cosmetics --- lisp/git-rebase.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el index 0feb9d0d59..897a00c416 100644 --- a/lisp/git-rebase.el +++ b/lisp/git-rebase.el @@ -157,8 +157,8 @@ (define-key map (kbd "b") #'git-rebase-break) (define-key map (kbd "e") #'git-rebase-edit) (define-key map (kbd "l") #'git-rebase-label) -(define-key map (kbd "MM") #'git-rebase-merge) -(define-key map (kbd "Mt") #'git-rebase-merge-toggle-editmsg) +(define-key map (kbd "M M") #'git-rebase-merge) +(define-key map (kbd "M t") #'git-rebase-merge-toggle-editmsg) (define-key map (kbd "m") #'git-rebase-edit) (define-key map (kbd "f") #'git-rebase-fixup) (define-key map (kbd "q") #'undefined)
[nongnu] elpa/magit-section updated (12272c825d -> aff4180479)
elpasync pushed a change to branch elpa/magit-section. from 12272c825d Don't declare functions that usually are not available adds 85dfb25b15 git-rebase-mode-map: Cosmetics adds 670dad14b5 git-rebase-mode-show-keybindings: Cosmetics adds 5ddf251823 git-rebase-mode-show-keybindings: Propertize all keys adds 5cc1e06aec git-rebase-mode-show-keybindings: Align Git's continued help text adds aff4180479 git-rebase-mode-show-keybindings: Preserve comment face No new revisions were added by this update. Summary of changes: lisp/git-rebase.el | 53 + 1 file changed, 33 insertions(+), 20 deletions(-)
[nongnu] elpa/git-commit aff4180479 5/5: git-rebase-mode-show-keybindings: Preserve comment face
branch: elpa/git-commit commit aff4180479092b38fae0401f043b119bb2ea7d9f Author: Jonas Bernoulli Commit: Jonas Bernoulli git-rebase-mode-show-keybindings: Preserve comment face --- lisp/git-rebase.el | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el index a6410d17f9..17f1d267e3 100644 --- a/lisp/git-rebase.el +++ b/lisp/git-rebase.el @@ -783,7 +783,8 @@ By default, this is the same except for the \"pick\" command." nil t)) (goto-char (line-beginning-position)) (pcase-dolist (`(,cmd . ,desc) git-rebase-command-descriptions) - (insert (format "%s %s %s\n" + (insert (format (propertize "%s %s %s\n" + 'font-lock-face 'font-lock-comment-face) comment-start (string-pad (substitute-command-keys (format "\\[%s]" cmd)) 8) @@ -799,6 +800,9 @@ By default, this is the same except for the \"pick\" command." (if (not (fboundp cmd)) (delete-region (line-beginning-position) (1+ (line-end-position))) +(add-text-properties (line-beginning-position) + (1+ (line-end-position)) + '(font-lock-face font-lock-comment-face)) (replace-match " " t t nil 2) (replace-match (string-pad
[nongnu] elpa/git-commit 5cc1e06aec 4/5: git-rebase-mode-show-keybindings: Align Git's continued help text
branch: elpa/git-commit commit 5cc1e06aec43959b4789564b887c178ff5ec0507 Author: Jonas Bernoulli Commit: Jonas Bernoulli git-rebase-mode-show-keybindings: Align Git's continued help text --- lisp/git-rebase.el | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el index 345fab239e..a6410d17f9 100644 --- a/lisp/git-rebase.el +++ b/lisp/git-rebase.el @@ -788,27 +788,30 @@ By default, this is the same except for the \"pick\" command." (string-pad (substitute-command-keys (format "\\[%s]" cmd)) 8) desc))) -(while (re-search-forward (concat git-rebase-comment-re - "\\( ?\\)\\([^\n,],\\) " - "\\([^\n ]+\\) ") - nil t) - (let ((cmd (intern (concat "git-rebase-" (match-string 3) -(if (not (fboundp cmd)) -(delete-region (line-beginning-position) - (1+ (line-end-position))) - (replace-match " " t t nil 1) - (replace-match - (string-pad -(mapconcat (lambda (key) - (save-match-data - (substitute-command-keys -(format "\\`%s'" (key-description key) - (cl-remove-if (lambda (key) (eq (elt key 0) 'menu-bar)) - (reverse (where-is-internal - cmd git-rebase-mode-map))) - ", ") -8) - t t nil 2 +(while (re-search-forward +(concat git-rebase-comment-re "\\(?:" +"\\( \\.? *\\)\\|" +"\\( +\\)\\([^\n,],\\) \\([^\n ]+\\) \\)") +nil t) + (if (match-string 1) + (replace-match (make-string 10 ?\s) t t nil 1) +(let ((cmd (intern (concat "git-rebase-" (match-string 4) + (if (not (fboundp cmd)) + (delete-region (line-beginning-position) + (1+ (line-end-position))) +(replace-match " " t t nil 2) +(replace-match + (string-pad + (mapconcat (lambda (key) + (save-match-data + (substitute-command-keys + (format "\\`%s'" (key-description key) + (cl-remove-if (lambda (key) (eq (elt key 0) 'menu-bar)) + (reverse (where-is-internal + cmd git-rebase-mode-map))) + ", ") + 8) + t t nil 3) (add-hook 'git-rebase-mode-hook #'git-rebase-mode-show-keybindings t)
[nongnu] elpa/git-commit updated (12272c825d -> aff4180479)
elpasync pushed a change to branch elpa/git-commit. from 12272c825d Don't declare functions that usually are not available new 85dfb25b15 git-rebase-mode-map: Cosmetics new 670dad14b5 git-rebase-mode-show-keybindings: Cosmetics new 5ddf251823 git-rebase-mode-show-keybindings: Propertize all keys new 5cc1e06aec git-rebase-mode-show-keybindings: Align Git's continued help text new aff4180479 git-rebase-mode-show-keybindings: Preserve comment face Summary of changes: lisp/git-rebase.el | 53 + 1 file changed, 33 insertions(+), 20 deletions(-)
[nongnu] elpa/git-commit 466bf542b0 02/12: Remove unnecessary declare-function
branch: elpa/git-commit commit 466bf542b08a245d915c9bf1767d3428b3462844 Author: Jonas Bernoulli Commit: Jonas Bernoulli Remove unnecessary declare-function --- lisp/magit-mode.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index e72e425faa..246b7a6489 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -37,8 +37,6 @@ ;; For `magit-display-buffer-fullcolumn-most-v1' from `git-commit' (defvar git-commit-mode) -;; For `magit-refresh' and `magit-refresh-all' -(declare-function magit-auto-revert-buffers "magit-autorevert" ()) ;; For `magit-refresh-buffer' (declare-function magit-process-unset-mode-line-error-status "magit-process" ()) ;; For `magit-refresh-get-relative-position'
[nongnu] elpa/git-commit 208dbd5689 06/12: magit-section-goto-successor: Define as generic function
branch: elpa/git-commit commit 208dbd56898d1054fcbad6dbd585250d8f57d3a7 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit-section-goto-successor: Define as generic function --- lisp/magit-diff.el| 48 +++ lisp/magit-section.el | 52 ++- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index ffcece0b89..c4d4d49ca4 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -2877,30 +2877,30 @@ It the SECTION has a different type, then do nothing." beg (line-end-position (t t -(defun magit-hunk-goto-successor (section arg) - (and (magit-hunk-section-p section) - (and-let* ((parent (magit-get-section - (magit-section-ident -(oref section parent) - (let* ((children (oref parent children)) -(siblings (magit-section-siblings section 'prev)) -(previous (nth (length siblings) children))) - (if (not arg) - (--when-let (or previous (car (last children))) - (magit-section-goto it) - t) - (when previous - (magit-section-goto previous)) - (if (and (stringp arg) - (re-search-forward arg (oref parent end) t)) - (goto-char (match-beginning 0)) - (goto-char (oref (car (last children)) end)) - (forward-line -1) - (while (looking-at "^ ")(forward-line -1)) - (while (looking-at "^[-+]") (forward-line -1)) - (forward-line))) - -(add-hook 'magit-section-goto-successor-hook #'magit-hunk-goto-successor) +(cl-defmethod magit-section-goto-successor ((section magit-hunk-section) +line char arg) + (or (magit-section-goto-successor--same section line char) + (and-let* ((parent (magit-get-section + (magit-section-ident + (oref section parent) +(let* ((children (oref parent children)) + (siblings (magit-section-siblings section 'prev)) + (previous (nth (length siblings) children))) + (if (not arg) + (--when-let (or previous (car (last children))) +(magit-section-goto it) +t) +(when previous + (magit-section-goto previous)) +(if (and (stringp arg) + (re-search-forward arg (oref parent end) t)) +(goto-char (match-beginning 0)) + (goto-char (oref (car (last children)) end)) + (forward-line -1) + (while (looking-at "^ ")(forward-line -1)) + (while (looking-at "^[-+]") (forward-line -1)) + (forward-line) + (magit-section-goto-successor--related section))) ;;; Diff Sections diff --git a/lisp/magit-section.el b/lisp/magit-section.el index f1ace71f31..186fac3e15 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -81,11 +81,6 @@ value should be `show', `hide' or nil. If no function returns non-nil, determine the visibility as usual, i.e. use the hardcoded section specific default (see `magit-insert-section').") -(defvar magit-section-goto-successor-hook nil - "Hook used to go to the same section as was current before a refresh. -This is only used if the standard mechanism for doing so did not -succeed.") - ;;; Options (defgroup magit-section nil @@ -1701,26 +1696,33 @@ invisible." (line-number-at-pos start)) (- point (line-beginning-position) -(defun magit-section-goto-successor (section line char &optional arg) +(cl-defgeneric magit-section-goto-successor ()) + +(cl-defmethod magit-section-goto-successor ((section magit-section) +line char &optional _arg) + (or (magit-section-goto-successor--same section line char) + (magit-section-goto-successor--related section))) + +(defun magit-section-goto-successor--same (section line char) (let ((ident (magit-section-ident section))) -(--if-let (magit-get-section ident) -(let ((start (oref it start))) - (goto-char start) - (unless (eq it magit-root-section) -(ignore-errors - (forward-line line) - (forward-char char)) -(unless (eq (magit-current-section) it) - (goto-char start - (or (run-hook-with-args-until-success - 'magit-section-goto-successor-hook section arg) - (goto-char (--if-let (magit-section-goto-successor-1 section) - (if (eq (oref it type) 'button) - (point-min) - (oref it start)) -
[nongnu] elpa/git-commit 91e6698435 10/12: Avoid loading bookmark upfront
branch: elpa/git-commit commit 91e6698435b9aadb89620d443444d2ec34a5efce Author: Jonas Bernoulli Commit: Jonas Bernoulli Avoid loading bookmark upfront --- lisp/magit-mode.el | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 132ea615f6..7956e8565a 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -31,7 +31,6 @@ (require 'magit-base) (require 'magit-git) -(require 'bookmark) (require 'format-spec) (require 'help-mode) (require 'transient) @@ -1480,11 +1479,18 @@ mentioned caches completely." ;;; Bookmark support +(declare-function bookmark-get-filename "bookmark" (bookmark-name-or-record)) +(declare-function bookmark-make-record-default "bookmark" + (&optional no-file no-context posn)) +(declare-function bookmark-prop-get "bookmark" (bookmark-name-or-record prop)) +(declare-function bookmark-prop-set "bookmark" (bookmark-name-or-record prop val)) + (defun magit--make-bookmark () "Create a bookmark for the current Magit buffer. Input values are the major-mode's `magit-bookmark-name' method, and the buffer-local values of the variables referenced in its `magit-bookmark-variables' property." + (require 'bookmark) (if (plist-member (symbol-plist major-mode) 'magit-bookmark-variables) ;; `bookmark-make-record-default's return value does not match ;; (NAME . ALIST), even though it is used as the default value
[nongnu] elpa/git-commit c42b09f987 04/12: magit-section-get-relative-position: Rename and move
branch: elpa/git-commit commit c42b09f9879bc16fbba4e83bb2a4e985a797ee54 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit-section-get-relative-position: Rename and move Its value is consumed by `magit-section-goto-successor', which is also defined in magit-mode.el. --- lisp/magit-mode.el| 26 +- lisp/magit-section.el | 25 + 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index f0344ada74..9634819362 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -37,8 +37,6 @@ ;; For `magit-refresh-buffer' (declare-function magit-process-unset-mode-line-error-status "magit-process" ()) -;; For `magit-refresh-get-relative-position' -(declare-function magit-hunk-section-p "magit-diff" (section) t) ;; For `magit-mode' (defvar bookmark-make-record-function) (declare-function magit--make-bookmark "magit-bookmark" ()) @@ -1086,7 +1084,7 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (and-let* ((section (magit-section-at))) `(( ,window ,section - ,@(magit-refresh-get-relative-position))) + ,@(magit-section-get-relative-position))) ;; If it qualifies, then the selected window ;; comes first, but we want to handle it last ;; so that its `magit-section-movement-hook' @@ -1118,28 +1116,6 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (float-time (time-subtract (current-time) magit-refresh-start-time))) -(defun magit-refresh-get-relative-position () - (and-let* ((section (magit-current-section)) - (start (oref section start)) - (point (magit-point))) -(list (- (line-number-at-pos point) - (line-number-at-pos start)) - (- point (line-beginning-position)) - (and (magit-hunk-section-p section) - (region-active-p) - (progn (goto-char (line-beginning-position)) - (when (looking-at "^[-+]") (forward-line)) - (while (looking-at "^[ @]") (forward-line)) - (let ((beg (point))) -(cond ((looking-at "^[-+]") - (forward-line) - (while (looking-at "^[-+]") (forward-line)) - (while (looking-at "^ ")(forward-line)) - (forward-line -1) - (regexp-quote (buffer-substring-no-properties - beg (line-end-position - (t t - ;;; Save File-Visiting Buffers (defvar magit--disable-save-buffers nil) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index 318a774301..490e995e2c 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -50,6 +50,9 @@ (eval-when-compile (require 'benchmark)) +;; For `magit-section-get-relative-position' +(declare-function magit-hunk-section-p "magit-diff" (section) t) + ;;; Hooks (defvar magit-section-movement-hook nil @@ -1689,6 +1692,28 @@ invisible." (push ov magit-section-highlight-overlays) ov)) +(defun magit-section-get-relative-position () + (and-let* ((section (magit-current-section)) + (start (oref section start)) + (point (magit-point))) +(list (- (line-number-at-pos point) + (line-number-at-pos start)) + (- point (line-beginning-position)) + (and (magit-hunk-section-p section) + (region-active-p) + (progn (goto-char (line-beginning-position)) + (when (looking-at "^[-+]") (forward-line)) + (while (looking-at "^[ @]") (forward-line)) + (let ((beg (point))) +(cond ((looking-at "^[-+]") + (forward-line) + (while (looking-at "^[-+]") (forward-line)) + (while (looking-at "^ ")(forward-line)) + (forward-line -1) + (regexp-quote (buffer-substring-no-properties + beg (line-end-position + (t t + (defun magit-section-goto-successor (section line char arg) (let ((ident (magit-section-ident section))) (--if-let (magit-get-section ident)
[nongnu] elpa/git-commit 2276f6bcce 09/12: Move core bookmark support to magit-mode.el
branch: elpa/git-commit commit 2276f6bcce501d99bfa571fe19377a82151148aa Author: Jonas Bernoulli Commit: Jonas Bernoulli Move core bookmark support to magit-mode.el This helps avoiding circular dependencies. I am undecided what to do with the boilerplate code that implements support for individual derived modes. For now I am not spreading that across files, but I might change my mind about that. --- lisp/magit-bookmark.el | 74 -- lisp/magit-mode.el | 79 ++ 2 files changed, 73 insertions(+), 80 deletions(-) diff --git a/lisp/magit-bookmark.el b/lisp/magit-bookmark.el index 0a42741b83..c8780e9754 100644 --- a/lisp/magit-bookmark.el +++ b/lisp/magit-bookmark.el @@ -29,80 +29,6 @@ ;;; Code: (require 'magit) -(require 'bookmark) - -;;; Core - -(defun magit--make-bookmark () - "Create a bookmark for the current Magit buffer. -Input values are the major-mode's `magit-bookmark-name' method, -and the buffer-local values of the variables referenced in its -`magit-bookmark-variables' property." - (if (plist-member (symbol-plist major-mode) 'magit-bookmark-variables) - ;; `bookmark-make-record-default's return value does not match - ;; (NAME . ALIST), even though it is used as the default value - ;; of `bookmark-make-record-function', which states that such - ;; functions must do that. See #4356. - (let ((bookmark (cons nil (bookmark-make-record-default 'no-file -(bookmark-prop-set bookmark 'handler #'magit--handle-bookmark) -(bookmark-prop-set bookmark 'mode major-mode) -(bookmark-prop-set bookmark 'filename (magit-toplevel)) -(bookmark-prop-set bookmark 'defaults (list (magit-bookmark-name))) -(dolist (var (get major-mode 'magit-bookmark-variables)) - (bookmark-prop-set bookmark var (symbol-value var))) -(bookmark-prop-set - bookmark 'magit-hidden-sections - (--keep (and (oref it hidden) - (cons (oref it type) -(if (derived-mode-p 'magit-stash-mode) -(string-replace magit-buffer-revision -magit-buffer-revision-hash -(oref it value)) - (oref it value - (oref magit-root-section children))) -bookmark) -(user-error "Bookmarking is not implemented for %s buffers" major-mode))) - -;;;###autoload -(defun magit--handle-bookmark (bookmark) - "Open a bookmark created by `magit--make-bookmark'. -Call the `magit-*-setup-buffer' function of the the major-mode -with the variables' values as arguments, which were recorded by -`magit--make-bookmark'. Ignore `magit-display-buffer-function'." - (let ((buffer (let ((default-directory (bookmark-get-filename bookmark)) - (mode (bookmark-prop-get bookmark 'mode)) - (magit-display-buffer-function #'identity) - (magit-display-buffer-noselect t)) - (apply (intern (format "%s-setup-buffer" - (substring (symbol-name mode) 0 -5))) - (--map (bookmark-prop-get bookmark it) -(get mode 'magit-bookmark-variables)) -(set-buffer buffer) ; That is the interface we have to adhere to. -(when-let ((hidden (bookmark-prop-get bookmark 'magit-hidden-sections))) - (with-current-buffer buffer -(dolist (child (oref magit-root-section children)) - (if (member (cons (oref child type) -(oref child value)) - hidden) - (magit-section-hide child) -(magit-section-show child) -;; Compatibility with `bookmark+' package. See #4356. -(when (bound-and-true-p bmkp-jump-display-function) - (funcall bmkp-jump-display-function (current-buffer))) -nil)) - -(cl-defgeneric magit-bookmark-name () - "Return name for bookmark to current buffer." - (format "%s%s" - (substring (symbol-name major-mode) 0 -5) - (if-let ((vars (get major-mode 'magit-bookmark-variables))) - (cl-mapcan (lambda (var) - (let ((val (symbol-value var))) - (if (and val (atom val)) - (list val) - val))) - vars) -""))) ;;; Diff Diff diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index b0ac4671c5..132ea615f6 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -31,16 +31,11 @@ (require 'magit-base) (require 'magit-git) +(require 'bookmark) (require 'format-spec) (require 'help-mode) (require 'transient) -;; For `magit-refresh-buffer' -(declare-function magit-process-unset-
[nongnu] elpa/git-commit 7c45ae83ac 08/12: Add magit-process-unset-mode-line-error-status to hook
branch: elpa/git-commit commit 7c45ae83aca366e858d30099a5779dbe844e2929 Author: Jonas Bernoulli Commit: Jonas Bernoulli Add magit-process-unset-mode-line-error-status to hook No longer hardcode it in `magit-refresh-buffer'. This helps avoiding circular dependencies. --- lisp/magit-mode.el| 1 - lisp/magit-process.el | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 8eb4bc83a8..b0ac4671c5 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -1097,7 +1097,6 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (setq magit-section-highlight-overlays nil) (setq magit-section-highlighted-sections nil) (setq magit-section-unhighlight-sections nil) -(magit-process-unset-mode-line-error-status) (let ((inhibit-read-only t)) (erase-buffer) (save-excursion diff --git a/lisp/magit-process.el b/lisp/magit-process.el index 38eacd43d0..6dd347a0c1 100644 --- a/lisp/magit-process.el +++ b/lisp/magit-process.el @@ -1043,6 +1043,9 @@ If STR is supplied, it replaces the `mode-line-process' text." 'magit-mode-line-process-error)) (magit-process-unset-mode-line +(add-hook 'magit-refresh-buffer-hook + #'magit-process-unset-mode-line-error-status) + (defun magit-process-unset-mode-line (&optional directory) "Remove the git command from the mode line." (let ((default-directory (or directory default-directory)))
[nongnu] elpa/magit updated (aff4180479 -> 8269af107f)
elpasync pushed a change to branch elpa/magit. from aff4180479 git-rebase-mode-show-keybindings: Preserve comment face adds ccb0de02ad magit--disable-save-buffers: Renamed variable adds 466bf542b0 Remove unnecessary declare-function adds 8ea1df1cd0 Wrap git-commit-mode with bound-and-true-p adds c42b09f987 magit-section-get-relative-position: Rename and move adds e733c8d1aa magit-section-get-relative-position: Define as generic function adds 208dbd5689 magit-section-goto-successor: Define as generic function adds 69327510e2 magit-section-goto-successor: Cosmetics adds 7c45ae83ac Add magit-process-unset-mode-line-error-status to hook adds 2276f6bcce Move core bookmark support to magit-mode.el adds 91e6698435 Avoid loading bookmark upfront adds 67352a64b5 magit--toplevel-safe: New function adds 8269af107f magit-generate-new-buffer: Determine appropriate default-directory No new revisions were added by this update. Summary of changes: lisp/git-rebase.el | 2 +- lisp/magit-bookmark.el | 74 - lisp/magit-diff.el | 70 ++-- lisp/magit-git.el | 12 +-- lisp/magit-mode.el | 208 +--- lisp/magit-process.el | 7 +- lisp/magit-section.el | 64 +-- lisp/magit-submodule.el | 3 +- 8 files changed, 222 insertions(+), 218 deletions(-)
[nongnu] elpa/magit-section updated (aff4180479 -> 8269af107f)
elpasync pushed a change to branch elpa/magit-section. from aff4180479 git-rebase-mode-show-keybindings: Preserve comment face adds ccb0de02ad magit--disable-save-buffers: Renamed variable adds 466bf542b0 Remove unnecessary declare-function adds 8ea1df1cd0 Wrap git-commit-mode with bound-and-true-p adds c42b09f987 magit-section-get-relative-position: Rename and move adds e733c8d1aa magit-section-get-relative-position: Define as generic function adds 208dbd5689 magit-section-goto-successor: Define as generic function adds 69327510e2 magit-section-goto-successor: Cosmetics adds 7c45ae83ac Add magit-process-unset-mode-line-error-status to hook adds 2276f6bcce Move core bookmark support to magit-mode.el adds 91e6698435 Avoid loading bookmark upfront adds 67352a64b5 magit--toplevel-safe: New function adds 8269af107f magit-generate-new-buffer: Determine appropriate default-directory No new revisions were added by this update. Summary of changes: lisp/git-rebase.el | 2 +- lisp/magit-bookmark.el | 74 - lisp/magit-diff.el | 70 ++-- lisp/magit-git.el | 12 +-- lisp/magit-mode.el | 208 +--- lisp/magit-process.el | 7 +- lisp/magit-section.el | 64 +-- lisp/magit-submodule.el | 3 +- 8 files changed, 222 insertions(+), 218 deletions(-)
[nongnu] elpa/git-commit ccb0de02ad 01/12: magit--disable-save-buffers: Renamed variable
branch: elpa/git-commit commit ccb0de02adf314c19bd76959d8c2d885639f0c99 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit--disable-save-buffers: Renamed variable --- lisp/git-rebase.el | 2 +- lisp/magit-mode.el | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el index 17f1d267e3..fa75c1903f 100644 --- a/lisp/git-rebase.el +++ b/lisp/git-rebase.el @@ -636,7 +636,7 @@ Like `undo' but works in read-only buffers." (undo arg))) (defun git-rebase--show-commit (&optional scroll) - (let ((disable-magit-save-buffers t)) + (let ((magit--disable-save-buffers t)) (save-excursion (goto-char (line-beginning-position)) (--if-let (with-slots (action-type target) (git-rebase-current-line) diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 935f0ee23d..e72e425faa 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -1146,10 +1146,10 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." ;;; Save File-Visiting Buffers -(defvar disable-magit-save-buffers nil) +(defvar magit--disable-save-buffers nil) (defun magit-pre-command-hook () - (setq disable-magit-save-buffers nil)) + (setq magit--disable-save-buffers nil)) (add-hook 'pre-command-hook #'magit-pre-command-hook) (defvar magit-after-save-refresh-buffers nil) @@ -1175,7 +1175,7 @@ Note that refreshing a Magit buffer is done by re-creating its contents from scratch, which can be slow in large repositories. If you are not satisfied with Magit's performance, then you should obviously not add this function to that hook." - (when (and (not disable-magit-save-buffers) + (when (and (not magit--disable-save-buffers) (magit-inside-worktree-p t)) (--when-let (ignore-errors (magit-get-mode-buffer 'magit-status-mode)) (add-to-list 'magit-after-save-refresh-buffers it) @@ -1187,8 +1187,8 @@ Do so if `magit-save-repository-buffers' is non-nil. You should not remove this from any hooks, instead set that variable to nil if you so desire." (when (and magit-save-repository-buffers - (not disable-magit-save-buffers)) -(setq disable-magit-save-buffers t) + (not magit--disable-save-buffers)) +(setq magit--disable-save-buffers t) (let ((msg (current-message))) (magit-save-repository-buffers (eq magit-save-repository-buffers 'dontask))
[nongnu] elpa/git-commit updated (aff4180479 -> 8269af107f)
elpasync pushed a change to branch elpa/git-commit. from aff4180479 git-rebase-mode-show-keybindings: Preserve comment face new ccb0de02ad magit--disable-save-buffers: Renamed variable new 466bf542b0 Remove unnecessary declare-function new 8ea1df1cd0 Wrap git-commit-mode with bound-and-true-p new c42b09f987 magit-section-get-relative-position: Rename and move new e733c8d1aa magit-section-get-relative-position: Define as generic function new 208dbd5689 magit-section-goto-successor: Define as generic function new 69327510e2 magit-section-goto-successor: Cosmetics new 7c45ae83ac Add magit-process-unset-mode-line-error-status to hook new 2276f6bcce Move core bookmark support to magit-mode.el new 91e6698435 Avoid loading bookmark upfront new 67352a64b5 magit--toplevel-safe: New function new 8269af107f magit-generate-new-buffer: Determine appropriate default-directory Summary of changes: lisp/git-rebase.el | 2 +- lisp/magit-bookmark.el | 74 - lisp/magit-diff.el | 70 ++-- lisp/magit-git.el | 12 +-- lisp/magit-mode.el | 208 +--- lisp/magit-process.el | 7 +- lisp/magit-section.el | 64 +-- lisp/magit-submodule.el | 3 +- 8 files changed, 222 insertions(+), 218 deletions(-)
[nongnu] elpa/git-commit 69327510e2 07/12: magit-section-goto-successor: Cosmetics
branch: elpa/git-commit commit 69327510e2a569a4d619236dc178638a8cb020b1 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit-section-goto-successor: Cosmetics --- lisp/magit-diff.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index c4d4d49ca4..f405022354 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -2887,8 +2887,8 @@ It the SECTION has a different type, then do nothing." (siblings (magit-section-siblings section 'prev)) (previous (nth (length siblings) children))) (if (not arg) - (--when-let (or previous (car (last children))) -(magit-section-goto it) + (when-let ((sibling (or previous (car (last children) +(magit-section-goto sibling) t) (when previous (magit-section-goto previous))
[nongnu] elpa/git-commit e733c8d1aa 05/12: magit-section-get-relative-position: Define as generic function
branch: elpa/git-commit commit e733c8d1aa022458a67af5db70796c3d81ae6fb2 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit-section-get-relative-position: Define as generic function --- lisp/magit-diff.el| 22 +- lisp/magit-mode.el| 3 ++- lisp/magit-section.el | 29 - 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index d59f9d6eb4..ffcece0b89 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -2849,7 +2849,7 @@ or a ref which is not a branch, then it inserts nothing." (cl-defmethod magit-buffer-value (&context (major-mode magit-merge-preview-mode)) magit-buffer-revision) -;;; Diff Sections +;;; Hunk Section (defun magit-hunk-set-window-start (section) "When SECTION is a `hunk', ensure that its beginning is visible. @@ -2859,6 +2859,24 @@ It the SECTION has a different type, then do nothing." (add-hook 'magit-section-movement-hook #'magit-hunk-set-window-start) +(cl-defmethod magit-section-get-relative-position ((_section magit-hunk-section)) + (nconc (cl-call-next-method) + (and (region-active-p) + (progn +(goto-char (line-beginning-position)) +(when (looking-at "^[-+]") (forward-line)) +(while (looking-at "^[ @]") (forward-line)) +(let ((beg (magit-point))) + (list (cond + ((looking-at "^[-+]") + (forward-line) + (while (looking-at "^[-+]") (forward-line)) + (while (looking-at "^ ")(forward-line)) + (forward-line -1) + (regexp-quote (buffer-substring-no-properties + beg (line-end-position + (t t + (defun magit-hunk-goto-successor (section arg) (and (magit-hunk-section-p section) (and-let* ((parent (magit-get-section @@ -2884,6 +2902,8 @@ It the SECTION has a different type, then do nothing." (add-hook 'magit-section-goto-successor-hook #'magit-hunk-goto-successor) +;;; Diff Sections + (defvar magit-unstaged-section-map (let ((map (make-sparse-keymap))) (magit-menu-set map [magit-visit-thing] #'magit-diff-unstaged "Visit diff") diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 9634819362..8eb4bc83a8 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -1084,7 +1084,8 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (and-let* ((section (magit-section-at))) `(( ,window ,section - ,@(magit-section-get-relative-position))) + ,@(magit-section-get-relative-position + section))) ;; If it qualifies, then the selected window ;; comes first, but we want to handle it last ;; so that its `magit-section-movement-hook' diff --git a/lisp/magit-section.el b/lisp/magit-section.el index 490e995e2c..f1ace71f31 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -1692,29 +1692,16 @@ invisible." (push ov magit-section-highlight-overlays) ov)) -(defun magit-section-get-relative-position () - (and-let* ((section (magit-current-section)) - (start (oref section start)) - (point (magit-point))) +(cl-defgeneric magit-section-get-relative-position (section)) + +(cl-defmethod magit-section-get-relative-position ((section magit-section)) + (let ((start (oref section start)) +(point (magit-point))) (list (- (line-number-at-pos point) (line-number-at-pos start)) - (- point (line-beginning-position)) - (and (magit-hunk-section-p section) - (region-active-p) - (progn (goto-char (line-beginning-position)) - (when (looking-at "^[-+]") (forward-line)) - (while (looking-at "^[ @]") (forward-line)) - (let ((beg (point))) -(cond ((looking-at "^[-+]") - (forward-line) - (while (looking-at "^[-+]") (forward-line)) - (while (looking-at "^ ")(forward-line)) - (forward-line -1) - (regexp-quote (buffer-substring-no-properties - beg (line-end-position - (t t - -(defun magit-section-goto-successor (section line char arg) + (- point (line-beginning-position) + +(defun magit-section-goto-successor (section line char &optional arg) (let ((ident (magit-section-ident section)))
[nongnu] elpa/git-commit 67352a64b5 11/12: magit--toplevel-safe: New function
branch: elpa/git-commit commit 67352a64b555a99e77fba8651487fa6449c88078 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit--toplevel-safe: New function --- lisp/magit-git.el | 12 +- lisp/magit-mode.el | 66 ++ 2 files changed, 38 insertions(+), 40 deletions(-) diff --git a/lisp/magit-git.el b/lisp/magit-git.el index 341167f3d1..bd1fee84d3 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -918,14 +918,14 @@ returning the truename." ;; Step outside the control directory to enter the working tree. (file-name-directory (directory-file-name gitdir))) +(defun magit--toplevel-safe () + (or (magit-toplevel) + (magit--not-inside-repository-error))) + (defmacro magit-with-toplevel (&rest body) (declare (indent defun) (debug (body))) - (let ((toplevel (cl-gensym "toplevel"))) -`(let ((,toplevel (magit-toplevel))) - (if ,toplevel - (let ((default-directory ,toplevel)) - ,@body) - (magit--not-inside-repository-error) + `(let ((default-directory (magit--toplevel-safe))) + ,@body)) (define-error 'magit-outside-git-repo "Not inside Git repository") (define-error 'magit-corrupt-git-config "Corrupt Git configuration") diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 7956e8565a..4cefd402de 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -849,45 +849,43 @@ If `visible', then only consider buffers on all visible frames. If `selected' or t, then only consider buffers on the selected frame. If a frame, then only consider buffers on that frame." - (if-let ((topdir (magit-toplevel))) - (cl-flet* ((b (buffer) - (with-current-buffer buffer - (and (eq major-mode mode) - (equal magit--default-directory topdir) - (if value - (and magit-buffer-locked-p - (equal (magit-buffer-value) value)) -(not magit-buffer-locked-p)) - buffer))) - (w (window) - (b (window-buffer window))) - (f (frame) - (seq-some #'w (window-list frame 'no-minibuf -(pcase-exhaustive frame - ('nil (seq-some #'b (buffer-list))) - ('all (seq-some #'f (frame-list))) - ('visible (seq-some #'f (visible-frame-list))) - ((or 'selected 't) (seq-some #'w (window-list (selected-frame - ((guard (framep frame)) (seq-some #'w (window-list frame) -(magit--not-inside-repository-error))) + (let ((topdir (magit--toplevel-safe))) +(cl-flet* ((b (buffer) + (with-current-buffer buffer + (and (eq major-mode mode) +(equal magit--default-directory topdir) +(if value +(and magit-buffer-locked-p + (equal (magit-buffer-value) value)) + (not magit-buffer-locked-p)) +buffer))) + (w (window) + (b (window-buffer window))) + (f (frame) + (seq-some #'w (window-list frame 'no-minibuf + (pcase-exhaustive frame +('nil (seq-some #'b (buffer-list))) +('all (seq-some #'f (frame-list))) +('visible (seq-some #'f (visible-frame-list))) +((or 'selected 't) (seq-some #'w (window-list (selected-frame +((guard (framep frame)) (seq-some #'w (window-list frame))) (defun magit-mode-get-buffer (mode &optional create frame value) (declare (obsolete magit-get-mode-buffer "Magit 3.0.0")) (when create (error "`magit-mode-get-buffer's CREATE argument is obsolete")) - (if-let ((topdir (magit-toplevel))) - (--first (with-current-buffer it - (and (eq major-mode mode) - (equal magit--default-directory topdir) - (if value - (and magit-buffer-locked-p - (equal (magit-buffer-value) value)) -(not magit-buffer-locked-p - (if frame - (mapcar #'window-buffer - (window-list (unless (eq frame t) frame))) - (buffer-list))) -(magit--not-inside-repository-error))) + (let ((topdir (magit--toplevel-safe))) +(--first (with-current-buffer it + (and (eq major-mode mode) +(equal magit--default-directory topdir) +(if value +(and magit-buffer-locked-p + (equal (magit-buffer-value) value)) + (not magit-buffer-lo
[nongnu] elpa/git-commit 8269af107f 12/12: magit-generate-new-buffer: Determine appropriate default-directory
branch: elpa/git-commit commit 8269af107f619e10c588ee0b8a81b9e3ec077a98 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit-generate-new-buffer: Determine appropriate default-directory --- lisp/magit-mode.el | 11 +-- lisp/magit-process.el | 4 ++-- lisp/magit-submodule.el | 3 +-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 4cefd402de..213c616816 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -604,8 +604,7 @@ your mode instead of adding an entry to this variable.") (section (and buffer (magit-current-section))) (created (not buffer))) (unless buffer - (setq buffer (magit-with-toplevel - (magit-generate-new-buffer mode value + (setq buffer (magit-generate-new-buffer mode value))) (with-current-buffer buffer (setq magit-previous-section section) (funcall mode) @@ -641,8 +640,7 @@ locked to its value, which is derived from MODE and ARGS." (section (and buffer (magit-current-section))) (created (not buffer))) (unless buffer - (setq buffer (magit-with-toplevel - (magit-generate-new-buffer mode value + (setq buffer (magit-generate-new-buffer mode value))) (with-current-buffer buffer (setq magit-previous-section section) (with-no-warnings @@ -887,8 +885,9 @@ If a frame, then only consider buffers on that frame." (window-list (unless (eq frame t) frame))) (buffer-list) -(defun magit-generate-new-buffer (mode &optional value) - (let* ((name (funcall magit-generate-buffer-name-function mode value)) +(defun magit-generate-new-buffer (mode &optional value directory) + (let* ((default-directory (or directory (magit--toplevel-safe))) + (name (funcall magit-generate-buffer-name-function mode value)) (buffer (generate-new-buffer name))) (with-current-buffer buffer (setq magit--default-directory default-directory) diff --git a/lisp/magit-process.el b/lisp/magit-process.el index 6dd347a0c1..65b7291180 100644 --- a/lisp/magit-process.el +++ b/lisp/magit-process.el @@ -300,8 +300,8 @@ optional NODISPLAY is non-nil also display it." (and (eq major-mode 'magit-process-mode) (equal default-directory topdir))) (buffer-list)) - (let ((default-directory topdir)) -(magit-generate-new-buffer 'magit-process-mode) + (magit-generate-new-buffer 'magit-process-mode + nil topdir (with-current-buffer buffer (if magit-root-section (when magit-process-log-max diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el index 2179fa10a2..0625e20d22 100644 --- a/lisp/magit-submodule.el +++ b/lisp/magit-submodule.el @@ -651,8 +651,7 @@ These sections can be expanded to show the respective commits." (defun magit-submodule-list-setup (columns &optional predicate) (magit-display-buffer (or (magit-get-mode-buffer 'magit-submodule-list-mode) - (magit-with-toplevel - (magit-generate-new-buffer 'magit-submodule-list-mode + (magit-generate-new-buffer 'magit-submodule-list-mode))) (magit-submodule-list-mode) (setq-local magit-repolist-columns columns) (setq-local magit-repolist-sort-key magit-submodule-list-sort-key)
[nongnu] elpa/git-commit 8ea1df1cd0 03/12: Wrap git-commit-mode with bound-and-true-p
branch: elpa/git-commit commit 8ea1df1cd03922262d928fe2abc12477ca1569bc Author: Jonas Bernoulli Commit: Jonas Bernoulli Wrap git-commit-mode with bound-and-true-p --- lisp/magit-mode.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 246b7a6489..f0344ada74 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -35,8 +35,6 @@ (require 'help-mode) (require 'transient) -;; For `magit-display-buffer-fullcolumn-most-v1' from `git-commit' -(defvar git-commit-mode) ;; For `magit-refresh-buffer' (declare-function magit-process-unset-mode-line-error-status "magit-process" ()) ;; For `magit-refresh-get-relative-position' @@ -798,7 +796,7 @@ the mode of the current buffer derives from `magit-log-mode' or `magit-cherry-mode'." (display-buffer buffer - (cond ((and (or git-commit-mode + (cond ((and (or (bound-and-true-p git-commit-mode) (derived-mode-p 'magit-log-mode 'magit-cherry-mode 'magit-reflog-mode))
[nongnu] elpa/markdown-mode b2e0348dd1 1/3: support newer version Eldoc ships with Emacs 28
branch: elpa/markdown-mode commit b2e0348dd107544bdd022ed5e2ff45652ee045b6 Author: Taiki Sugawara Commit: Taiki Sugawara support newer version Eldoc ships with Emacs 28 --- CHANGES.md | 1 + markdown-mode.el | 8 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index da1f7d795f..5232113e9f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ - `markdown` passes `buffer-file-name` as a parameter to `markdown-command` when `markdown-command-needs-filename` is `t` and `markdown-command` is a function. +- Support newer version Eldoc ships with Emacs 28. [gh-705]: https://github.com/jrblevin/markdown-mode/issues/705 diff --git a/markdown-mode.el b/markdown-mode.el index 3eca261e66..83d18b7466 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -9663,7 +9663,7 @@ rows and columns and the column alignment." ;;; ElDoc Support = -(defun markdown-eldoc-function () +(defun markdown-eldoc-function (&optional _callback &rest _args) "Return a helpful string when appropriate based on context. * Report URL when point is at a hidden URL. * Report language name when point is a code block with hidden markup." @@ -9803,8 +9803,10 @@ rows and columns and the column alignment." ;; Cause use of ellipses for invisible text. (add-to-invisibility-spec '(outline . t)) ;; ElDoc support - (add-function :before-until (local 'eldoc-documentation-function) -#'markdown-eldoc-function) + (if (boundp 'eldoc-documentation-functions) + (add-hook 'eldoc-documentation-functions #'markdown-eldoc-function nil t) +(add-function :before-until (local 'eldoc-documentation-function) + #'markdown-eldoc-function)) ;; Inhibiting line-breaking: ;; Separating out each condition into a separate function so that users can ;; override if desired (with remove-hook)
[nongnu] elpa/markdown-mode 1db4ea76d6 2/3: simplify function declaration
branch: elpa/markdown-mode commit 1db4ea76d61d3c93c7927cafdf99ac8745a41417 Author: Taiki Sugawara Commit: GitHub simplify function declaration Co-authored-by: Shohei YOSHIDA --- markdown-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown-mode.el b/markdown-mode.el index 83d18b7466..edd09a72cf 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -9663,7 +9663,7 @@ rows and columns and the column alignment." ;;; ElDoc Support = -(defun markdown-eldoc-function (&optional _callback &rest _args) +(defun markdown-eldoc-function (&rest _ignored) "Return a helpful string when appropriate based on context. * Report URL when point is at a hidden URL. * Report language name when point is a code block with hidden markup."
[nongnu] elpa/markdown-mode updated (5b6e660c13 -> 4477f381de)
elpasync pushed a change to branch elpa/markdown-mode. from 5b6e660c13 Merge pull request #706 from jrblevin/issue-705 new b2e0348dd1 support newer version Eldoc ships with Emacs 28 new 1db4ea76d6 simplify function declaration new 4477f381de Merge pull request #708 from buzztaiki/emacs28_eldoc Summary of changes: CHANGES.md | 1 + markdown-mode.el | 8 +--- 2 files changed, 6 insertions(+), 3 deletions(-)
[nongnu] elpa/markdown-mode 4477f381de 3/3: Merge pull request #708 from buzztaiki/emacs28_eldoc
branch: elpa/markdown-mode commit 4477f381de0068a04b55e198c32614793f67b38a Merge: 5b6e660c13 1db4ea76d6 Author: Shohei YOSHIDA Commit: GitHub Merge pull request #708 from buzztaiki/emacs28_eldoc Support newer version Eldoc ships with Emacs 28 --- CHANGES.md | 1 + markdown-mode.el | 8 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index da1f7d795f..5232113e9f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ - `markdown` passes `buffer-file-name` as a parameter to `markdown-command` when `markdown-command-needs-filename` is `t` and `markdown-command` is a function. +- Support newer version Eldoc ships with Emacs 28. [gh-705]: https://github.com/jrblevin/markdown-mode/issues/705 diff --git a/markdown-mode.el b/markdown-mode.el index 3eca261e66..edd09a72cf 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -9663,7 +9663,7 @@ rows and columns and the column alignment." ;;; ElDoc Support = -(defun markdown-eldoc-function () +(defun markdown-eldoc-function (&rest _ignored) "Return a helpful string when appropriate based on context. * Report URL when point is at a hidden URL. * Report language name when point is a code block with hidden markup." @@ -9803,8 +9803,10 @@ rows and columns and the column alignment." ;; Cause use of ellipses for invisible text. (add-to-invisibility-spec '(outline . t)) ;; ElDoc support - (add-function :before-until (local 'eldoc-documentation-function) -#'markdown-eldoc-function) + (if (boundp 'eldoc-documentation-functions) + (add-hook 'eldoc-documentation-functions #'markdown-eldoc-function nil t) +(add-function :before-until (local 'eldoc-documentation-function) + #'markdown-eldoc-function)) ;; Inhibiting line-breaking: ;; Separating out each condition into a separate function so that users can ;; override if desired (with remove-hook)
[elpa] externals/buffer-env updated (7b7e5c2a79 -> c76e282125)
elpasync pushed a change to branch externals/buffer-env. from 7b7e5c2a79 Add option to display script name in mode line new bc71c5014e Allow for buffer-env-script-name to be a list of files new 2e1f311ba0 Revert to original default value of buffer-env-script-name new c76e282125 Small refactoring Summary of changes: buffer-env.el | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-)
[elpa] externals/dtache 7f07d2ddd3 06/14: Add missing autoload cookie
branch: externals/dtache commit 7f07d2ddd399f1f2596e8a3f4365838690302104 Author: Niklas Eklund Commit: Niklas Eklund Add missing autoload cookie --- dtache-compile.el | 1 + 1 file changed, 1 insertion(+) diff --git a/dtache-compile.el b/dtache-compile.el index 27bd810a89..713805225e 100644 --- a/dtache-compile.el +++ b/dtache-compile.el @@ -73,6 +73,7 @@ Optionally EDIT-COMMAND." ; Functions +;;;###autoload (defun dtache-compile-attach (session) "Attach to SESSION with `compile'." (when (dtache-valid-session session)
[elpa] externals/dtache 2764a29989 08/14: Update dtache-env-mode
branch: externals/dtache commit 2764a299891e65f4c16704034a99fd85fdf59bcd Author: Niklas Eklund Commit: Niklas Eklund Update dtache-env-mode --- dtache-env | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/dtache-env b/dtache-env index 0ff7f879b5..2427d3a342 100755 --- a/dtache-env +++ b/dtache-env @@ -1,18 +1,28 @@ #!/usr/bin/env bash +# dtache-env is a script which purpose is to run a dtache command, and +# issue to stdout, based on the exit code. + mode="$1" shift dtache_command="$*" -if [ "$mode" = "dumb" ]; then +# dtache-env features two different modes: +# 1) Plain-text: where plain text data will be logged in the sessions output +# 2) Terminal-data: the script command is used to record the terminal +#data in raw format, this includes ansi escape sequences. The TERM +#environmental variable is set to eterm-color in order to enabled +#colored outputs from the dtache_command + +if [ "$mode" = "plain-text" ]; then if eval "$dtache_command"; then echo -e "\nDtache session finished" else echo -e "\nDtache session exited abnormally with code $?" fi -elif [ "$mode" = "smart" ]; then +elif [ "$mode" = "terminal-data" ]; then TERM="eterm-color" -if eval script --quiet -f -e -c "\"$dtache_command\"" /dev/null; then +if eval script --quiet --flush --return --command "\"$dtache_command\"" /dev/null; then echo -e "\nDtache session finished" else echo -e "\nDtache session exited abnormally with code $?"
[elpa] externals/dtache df25737444 13/14: Mention that users need to update dtache-env
branch: externals/dtache commit df257374441a9ea7f0d9d6ab7194828cfe1a4b3e Author: Niklas Eklund Commit: Niklas Eklund Mention that users need to update dtache-env --- CHANGELOG.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 2e1e0ac80d..ef5445e109 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -3,7 +3,7 @@ #+language: en * Development -- Improvements to =dtache-env=. The package will now control which mode =dtache-env= should be run in. The mode is either =plain-text= or =terminal-data=. The latter is enabled by default and allows =dtache= to capture control sequences for e.g. colored output. +- Improvements to =dtache-env=. The package will now control which mode =dtache-env= should be run in. The mode is either =plain-text= or =terminal-data=. The latter is enabled by default and allows =dtache= to capture control sequences for e.g. colored output. This update will require users to update their =dtache-env= scripts. - Add integration with =dired= through =dired-do-shell-command= - Add option to show a session's output when attaching to a it. This feature is enabled with =dtache-show-output-on-attach=.
[elpa] externals/buffer-env c76e282125 3/3: Small refactoring
branch: externals/buffer-env commit c76e282125779ea8de522dce899b974b5b343441 Author: Augusto Stoffel Commit: Augusto Stoffel Small refactoring --- buffer-env.el | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/buffer-env.el b/buffer-env.el index b0e9dc1d33..965a0187d8 100644 --- a/buffer-env.el +++ b/buffer-env.el @@ -141,19 +141,19 @@ Files marked as safe to execute are permanently stored in (defun buffer-env--locate-script () "Locate a dominating file named `buffer-env-script-name'." - (unless (file-remote-p default-directory) -(cond - ((listp buffer-env-script-name) - (seq-some - (lambda (script-name) -(and-let* ((dir (locate-dominating-file default-directory - script-name))) - (expand-file-name script-name dir))) - buffer-env-script-name)) - ((stringp buffer-env-script-name) - (when-let* ((dir (locate-dominating-file default-directory - buffer-env-script-name))) - (expand-file-name buffer-env-script-name dir)) + (cond + ((file-remote-p default-directory) nil) + ((listp buffer-env-script-name) +(seq-some + (lambda (script-name) + (and-let* ((dir (locate-dominating-file default-directory + script-name))) +(expand-file-name script-name dir))) + buffer-env-script-name)) + ((stringp buffer-env-script-name) +(when-let* ((dir (locate-dominating-file default-directory +buffer-env-script-name))) + (expand-file-name buffer-env-script-name dir) ;;;###autoload (defun buffer-env-update (&optional file)
[elpa] externals/dtache 80d019e595 05/14: Address suggestion from linter
branch: externals/dtache commit 80d019e5955dc5f2aeb50460ce906446f36e93d3 Author: Niklas Eklund Commit: Niklas Eklund Address suggestion from linter --- dtache-env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtache-env b/dtache-env index 18011e8f07..0ff7f879b5 100755 --- a/dtache-env +++ b/dtache-env @@ -2,7 +2,7 @@ mode="$1" shift -dtache_command="$@" +dtache_command="$*" if [ "$mode" = "dumb" ]; then if eval "$dtache_command"; then
[elpa] externals/dtache 7311bcaac8 09/14: Update dtache-env-mode implementation
branch: externals/dtache commit 7311bcaac88260745cb79766641a6155189e8cb3 Author: Niklas Eklund Commit: Niklas Eklund Update dtache-env-mode implementation --- README.md | 9 +++-- dtache.el | 21 +++-- test/dtache-test.el | 15 +++ 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 601d817174..06b782fde5 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,6 @@ Next add the annotation function to the `dtache-metadata-annotators-alist` toget To be able to both attach to a dtach session as well as logging its output `dtache` relies on the usage of `tee`. However it is possible that the user tries to run a command which involves a program that doesn't integrate well with tee. In those situations the output could be delayed until the session ends, which is not preferable. For these situations `dtache` provides the `dtache-nonattachable-commands` variable. This is a list of regular expressions. Any command that matches any of the strings will be getting the property `attachable` set to false. - ``` emacs-lisp (setq dtache-nonattachable-commands '("^ls")) ``` @@ -334,14 +333,12 @@ Here a command beginning with `ls` would from now on be considered nonattachable ## Colors in sessions -Many programs such as `git` or `grep` don't show colors in dtache unless they are forced to. This is because these commands only use colors and ansi sequences if they are being run in a terminal, as opposed to a pipe. This seting lets you get color output when you are running these programs interactively, while still getting readable output when you are piping them or redirecting them to a logfile. `Dtache` does not run programs in interactive terminal, though, so these commands turn off [...] - -*WARNING:* =Dtache= only supports a few basic escape sequences, so this fix /will/ mess up the output for some commands. +Dtache needs to use a trick to get programs programs such as `git` or `grep` to show color in their outputs. This is because these commands only use colors and ansi sequences if they are being run in a terminal, as opposed to a pipe. The `dtache-env` therefore has two different modes. The mode can be either `plain-text` or `terminal-data`, the latter is now the default. The `dtache-env` program then uses the `script` command to make programs run in `dtache` think they are inside of a ful [...] -First, put the following script into an executable file: +The drawback is that there can be commands which generates escape sequences that `dtache` supports and will therefore mess up the output for some commands. If you detect such an incompatible command you can add a regexp that matches that command to the list `dtache-env-plain-text-commands`. By doing so `dtache` will instruct `dtache-env` to run those commands in plain-text mode. ``` emacs-lisp -(setq dtache-env-smart-mode-block-list '(".*")) +(setq dtache-env-plain-text-commands '(".*")) ``` # Tips & Tricks diff --git a/dtache.el b/dtache.el index 236a95d14e..f4c0820d52 100644 --- a/dtache.el +++ b/dtache.el @@ -92,8 +92,8 @@ :type 'string :group 'dtache) -(defcustom dtache-env-smart-mode-block-list nil - "A list of regexps for commands that should be run in dumb mode in `dtache-env'." +(defcustom dtache-env-plain-text-commands nil + "A list of regexps for commands to run in plain-text mode." :type 'list :group 'dtache) @@ -181,7 +181,7 @@ Valid values are: create, new and attach") (defvar dtache-metadata-annotators-alist nil "An alist of annotators for metadata.") -(defconst dtache-session-version "0.6.0" +(defconst dtache-session-version "0.6.1" "The version of `dtache-session'. This version is encoded as [package-version].[revision].") @@ -282,6 +282,7 @@ This version is encoded as [package-version].[revision].") (metadata nil :read-only t) (host nil :read-only t) (attachable nil :read-only t) + (env-mode nil :read-only t) (action nil :read-only t) (time nil) (status nil) @@ -588,6 +589,7 @@ nil before closing." :size 0 :directory (if dtache-local-session dtache-session-directory (concat (file-remote-p default-directory) dtache-session-directory)) + :env-mode (dtache--env-mode command) :host (dtache--host) :metadata (dtache-metadata) :state 'unknown))) @@ -1131,19 +1133,18 @@ If SESSION is nonattachable fallback to a command that doesn't rely on tee." (env (if dtache-env dtache-env (format "%s -c" dtache-shell-program))) (command (if dtache-env - (concat (format "%s " (dtache--env-mode (dtache--session-command session))) + (concat (format "%s " (dtache--session-env
[elpa] externals/buffer-env 2e1f311ba0 2/3: Revert to original default value of buffer-env-script-name
branch: externals/buffer-env commit 2e1f311ba01a47cc71e2705ea09eaf5f751f1e21 Author: Augusto Stoffel Commit: Augusto Stoffel Revert to original default value of buffer-env-script-name --- buffer-env.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/buffer-env.el b/buffer-env.el index 75743f4954..b0e9dc1d33 100644 --- a/buffer-env.el +++ b/buffer-env.el @@ -57,9 +57,8 @@ "Buffer-local process environments." :group 'processes) -(defcustom buffer-env-script-name - '(".envrc" "manifest.scm" "guix.scm") - "File name or list of the scripts to produce environment variables." +(defcustom buffer-env-script-name ".envrc" + "File name of the scripts to produce environment variables, or a list of such." :type '(choice (repeat string) string)) (defcustom buffer-env-commands
[elpa] externals/buffer-env bc71c5014e 1/3: Allow for buffer-env-script-name to be a list of files
branch: externals/buffer-env commit bc71c5014ec79f9afbc699f48f794d03dd7ca64f Author: Philip Kaludercic Commit: Augusto Stoffel Allow for buffer-env-script-name to be a list of files --- buffer-env.el | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/buffer-env.el b/buffer-env.el index c29da45b8d..75743f4954 100644 --- a/buffer-env.el +++ b/buffer-env.el @@ -57,9 +57,10 @@ "Buffer-local process environments." :group 'processes) -(defcustom buffer-env-script-name ".envrc" - "File name of the script to produce environment variables." - :type 'string) +(defcustom buffer-env-script-name + '(".envrc" "manifest.scm" "guix.scm") + "File name or list of the scripts to produce environment variables." + :type '(choice (repeat string) string)) (defcustom buffer-env-commands '((".env" . "set -a && >&2 . \"$0\" && env -0") @@ -141,11 +142,19 @@ Files marked as safe to execute are permanently stored in (defun buffer-env--locate-script () "Locate a dominating file named `buffer-env-script-name'." - (when-let* ((dir (and (stringp buffer-env-script-name) -(not (file-remote-p default-directory)) -(locate-dominating-file default-directory -buffer-env-script-name -(expand-file-name buffer-env-script-name dir))) + (unless (file-remote-p default-directory) +(cond + ((listp buffer-env-script-name) + (seq-some + (lambda (script-name) +(and-let* ((dir (locate-dominating-file default-directory + script-name))) + (expand-file-name script-name dir))) + buffer-env-script-name)) + ((stringp buffer-env-script-name) + (when-let* ((dir (locate-dominating-file default-directory + buffer-env-script-name))) + (expand-file-name buffer-env-script-name dir)) ;;;###autoload (defun buffer-env-update (&optional file)
[elpa] externals/dtache 19f13e25d5 02/14: new-dtache-env
branch: externals/dtache commit 19f13e25d567861c386e9d33da3ff10539103834 Author: Niklas Eklund Commit: Niklas Eklund new-dtache-env --- dtache-env | 21 - dtache.el | 5 +++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/dtache-env b/dtache-env index 27726c2540..18011e8f07 100755 --- a/dtache-env +++ b/dtache-env @@ -1,9 +1,20 @@ #!/usr/bin/env bash -dtache_command="$*" +mode="$1" +shift +dtache_command="$@" -if eval "$dtache_command"; then -echo -e "\nDtache session finished" -else -echo -e "\nDtache session exited abnormally with code $?" +if [ "$mode" = "dumb" ]; then +if eval "$dtache_command"; then +echo -e "\nDtache session finished" +else +echo -e "\nDtache session exited abnormally with code $?" +fi +elif [ "$mode" = "smart" ]; then +TERM="eterm-color" +if eval script --quiet -f -e -c "\"$dtache_command\"" /dev/null; then +echo -e "\nDtache session finished" +else +echo -e "\nDtache session exited abnormally with code $?" +fi fi diff --git a/dtache.el b/dtache.el index 802eee6538..9483e7f424 100644 --- a/dtache.el +++ b/dtache.el @@ -1125,8 +1125,9 @@ If SESSION is nonattachable fallback to a command that doesn't rely on tee." (format "&> %s" log))) (env (if dtache-env dtache-env (format "%s -c" dtache-shell-program))) (command - (shell-quote-argument - (dtache--session-command session + (if dtache-env + (concat "smart " (shell-quote-argument (dtache--session-command session))) +(shell-quote-argument (dtache--session-command session) (format "%s %s %s; %s %s" begin-shell-group env command end-shell-group redirect))) (defun dtache--host ()
[elpa] externals/dtache 0f3dce2191 04/14: Fix tests
branch: externals/dtache commit 0f3dce21911371c1edac40c82b17ec53ee58e436 Author: Niklas Eklund Commit: Niklas Eklund Fix tests --- test/dtache-test.el | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/dtache-test.el b/test/dtache-test.el index 2cfb82b381..e752e2b65c 100644 --- a/test/dtache-test.el +++ b/test/dtache-test.el @@ -81,14 +81,14 @@ "-c" ,(dtache--session-file session 'socket t) "-z" ,dtache-shell-program "-c" -,(format "{ dtache-env ls\\ -la; } 2>&1 | tee %s" +,(format "{ dtache-env smart ls\\ -la; } 2>&1 | tee %s" (dtache--session-file session 'log t (expected-concat (format "%s -c %s -z %s -c %s" dtache-dtach-program (dtache--session-file session 'socket t) dtache-shell-program (shell-quote-argument - (format "{ dtache-env ls\\ -la; } 2>&1 | tee %s" + (format "{ dtache-env smart ls\\ -la; } 2>&1 | tee %s" (dtache--session-file session 'log t)) (should (equal expected (dtache-dtach-command session))) (should (equal expected-concat (dtache-dtach-command session t @@ -234,10 +234,13 @@ :id 'foo123))) ;; With dtache-env (let ((dtache-env "dtache-env")) - (should (string= "{ dtache-env ls\\ -la; } 2>&1 | tee /tmp/dtache/foo123.log" + (should (string= "{ dtache-env smart ls\\ -la; } 2>&1 | tee /tmp/dtache/foo123.log" (dtache--dtache-command attachable-session))) - (should (string= "{ dtache-env ls\\ -la; } &> /tmp/dtache/foo123.log" - (dtache--dtache-command nonattachable-session + (should (string= "{ dtache-env smart ls\\ -la; } &> /tmp/dtache/foo123.log" + (dtache--dtache-command nonattachable-session))) + (let ((dtache-env-smart-mode-block-list '("ls -la"))) +(should (string= "{ dtache-env dumb ls\\ -la; } 2>&1 | tee /tmp/dtache/foo123.log" + (dtache--dtache-command attachable-session) ;; Without dtache-env (let ((dtache-env nil)
[elpa] externals/dtache updated (5a39733299 -> 04f27090ae)
elpasync pushed a change to branch externals/dtache. from 5a39733299 Improve output when attaching new c1f3b629b8 Update README new 19f13e25d5 new-dtache-env new 60ec4c26d1 Add smart-mode-block-list new 0f3dce2191 Fix tests new 80d019e595 Address suggestion from linter new 7f07d2ddd3 Add missing autoload cookie new d0c5522c9e Update README.md new 2764a29989 Update dtache-env-mode new 7311bcaac8 Update dtache-env-mode implementation new d34c6cb023 Delete README.org new 12e3ec8f1e Make dtache-copy-session compatible with env mode new 5087f90120 Update CHANGELOG new df25737444 Mention that users need to update dtache-env new 04f27090ae Update contributor section in README Summary of changes: CHANGELOG.org | 1 + README.md | 13 +- README.org | 480 dtache-compile.el | 1 + dtache-env | 29 +++- dtache.el | 26 ++- test/dtache-test.el | 10 +- 7 files changed, 67 insertions(+), 493 deletions(-) delete mode 100644 README.org
[nongnu] elpa/git-commit 21e671ed76: ci: Test on Emacs 28.1
branch: elpa/git-commit commit 21e671ed7601b3ef4b02782bf515ca88dc8dcc8d Author: Jonas Bernoulli Commit: Jonas Bernoulli ci: Test on Emacs 28.1 --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eedc7af639..44ff2563d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: - 26.3 - 27.1 - 27.2 +- 28.1 - snapshot steps: - name: Configure git
[elpa] externals/dtache c1f3b629b8 01/14: Update README
branch: externals/dtache commit c1f3b629b8d55a5ef3f69fed498c702d0485fa03 Author: Rose Osterheld Commit: Niklas Eklund Update README Document a hack to make programs assume that dtache has color support --- README.org | 26 ++ 1 file changed, 26 insertions(+) diff --git a/README.org b/README.org index 2eb0a08cea..6340ca245f 100644 --- a/README.org +++ b/README.org @@ -451,6 +451,32 @@ The [[https://github.com/stsquad/dired-rsync][dired-rsync]] is a package to run The above code block shows how to make =dired-rsync= use =dtache=. +*** Enable more colors in output + +Many programs such as =git= or =grep= don't show colors in dtache unless they are forced to. This is because these commands only use colors and ansi sequences if they are being run in a terminal as opposed to a pipe. This lets you get color output when you are running these programs interactively while still getting readable output when you are piping them or redirecting them to a logfile. =Dtache= does not run programs in interactive terminal, though, so these commands turn off their co [...] + +*WARNING:* =Dtache= only supports a few basic escape sequences, so this fix /will/ mess up the output for some commands. + +First, put the following script into an executable file: + +#+begin_src sh :results none +#!/usr/bin/env bash + +dtache_command="$*" + +if eval script --quiet -f -e -c "\"$dtache_command\"" /dev/null; then +echo -e "\nDtache session finished" +else +echo -e "\nDtache session exited abnormally with code $?" +fi +#+end_src + +Then, add the following to your =init.el= + +#+begin_src elisp :lexical t :results none + (setq dtache-env "/path/to/file") +#+end_src + * Versions Information about larger changes that has been made between versions can be found in the =CHANGELOG.org=
[elpa] externals/dtache 60ec4c26d1 03/14: Add smart-mode-block-list
branch: externals/dtache commit 60ec4c26d1e3b8915950419167e7abf0bc212376 Author: Niklas Eklund Commit: Niklas Eklund Add smart-mode-block-list --- dtache.el | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dtache.el b/dtache.el index 9483e7f424..236a95d14e 100644 --- a/dtache.el +++ b/dtache.el @@ -92,6 +92,11 @@ :type 'string :group 'dtache) +(defcustom dtache-env-smart-mode-block-list nil + "A list of regexps for commands that should be run in dumb mode in `dtache-env'." + :type 'list + :group 'dtache) + (defcustom dtache-annotation-format '((:width 3 :function dtache--state-str :face dtache-state-face) (:width 3 :function dtache--status-str :face dtache-failure-face) @@ -1126,10 +1131,20 @@ If SESSION is nonattachable fallback to a command that doesn't rely on tee." (env (if dtache-env dtache-env (format "%s -c" dtache-shell-program))) (command (if dtache-env - (concat "smart " (shell-quote-argument (dtache--session-command session))) + (concat (format "%s " (dtache--env-mode (dtache--session-command session))) + (shell-quote-argument (dtache--session-command session))) (shell-quote-argument (dtache--session-command session) (format "%s %s %s; %s %s" begin-shell-group env command end-shell-group redirect))) +(defun dtache--env-mode (command) + "Return mode to run in `dtache-env' based on COMMAND." + (if-let ((blocked-command +(seq-find (lambda (regexp) +(string-match-p regexp command)) + dtache-env-smart-mode-block-list))) + 'dumb +'smart)) + (defun dtache--host () "Return a cons with (host . type)." (let ((remote (file-remote-p default-directory)))
[elpa] externals/dtache d0c5522c9e 07/14: Update README.md
branch: externals/dtache commit d0c5522c9e09e8bac0053553c040749d2578e942 Author: Niklas Eklund Commit: Niklas Eklund Update README.md --- README.md | 12 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index e4b58e9705..601d817174 100644 --- a/README.md +++ b/README.md @@ -332,6 +332,18 @@ For these situations `dtache` provides the `dtache-nonattachable-commands` varia Here a command beginning with `ls` would from now on be considered nonattachable. +## Colors in sessions + +Many programs such as `git` or `grep` don't show colors in dtache unless they are forced to. This is because these commands only use colors and ansi sequences if they are being run in a terminal, as opposed to a pipe. This seting lets you get color output when you are running these programs interactively, while still getting readable output when you are piping them or redirecting them to a logfile. `Dtache` does not run programs in interactive terminal, though, so these commands turn off [...] + +*WARNING:* =Dtache= only supports a few basic escape sequences, so this fix /will/ mess up the output for some commands. + +First, put the following script into an executable file: + +``` emacs-lisp +(setq dtache-env-smart-mode-block-list '(".*")) +``` + # Tips & Tricks ## 3rd party extensions
[elpa] externals/dtache d34c6cb023 10/14: Delete README.org
branch: externals/dtache commit d34c6cb023137da8b7905248b5f96aee71c4b945 Author: Niklas Eklund Commit: Niklas Eklund Delete README.org --- README.org | 506 - 1 file changed, 506 deletions(-) diff --git a/README.org b/README.org deleted file mode 100644 index 6340ca245f..00 --- a/README.org +++ /dev/null @@ -1,506 +0,0 @@ -#+title: dtache.el - Detach Emacs -#+author: Niklas Eklund -#+language: en -#+OPTIONS: toc:nil - -#+html: http://elpa.gnu.org/packages/dtache.html";>https://elpa.gnu.org/packages/dtache.svg"/> -#+html: http://elpa.gnu.org/devel/dtache.html";>https://elpa.gnu.org/devel/dtache.svg"/> -#+html: https://melpa.org/#/dtache";>https://melpa.org/packages/dtache-badge.svg"/> -#+html: https://stable.melpa.org/#/dtache";>https://stable.melpa.org/packages/dtache-badge.svg"/> -#+html: https://builds.sr.ht/~niklaseklund/dtache/commits/main/.build.yml";>https://builds.sr.ht/~niklaseklund/dtache/commits/main/.build.yml.svg"/> - -* Announcement - -The development of the project has been migrated to =sourcehut=, it can now be found at [[https://git.sr.ht/~niklaseklund/dtache][https://git.sr.ht/~niklaseklund/dtache]]. - -* Introduction - :properties: - :description: Why Dtache? - :end: - -Dtache is a package to run, and interact with, shell commands that are completely detached from Emacs itself. The package achieves this functionality by launching the commands with the program [[https://github.com/crigler/dtach][dtach]]. Even though the commands are run decoupled, the package makes sure the integration to Emacs is seamless. The advantage is that the processes are insensitive to Emacs being killed, and this holds true for remote hosts as well, essentially making =dtache= [...] - -Another advantage of =dtache= is that in order to implement the detached feature it actually represents the processes as text inside of Emacs. This enables features such as history of all session outputs, possibility to diff session outputs etc. - -The following videos about =dtache=. They are currently a bit outdated but the core concept is still true. -- [[https://www.youtube.com/watch?v=if1W58SrClk][Dtache - An Emacs package that provides detachable shell commands]] -- [[https://www.youtube.com/watch?v=De5oXdnY5hY][Dtache - Version 0.2]] - -** Features - -The way =dtache= is designed with its =dtache-session= objects opens up the possibilities for the following features. - -*** Output - -The user always have access to the session's output. The user never needs to fear that the output history of the terminal is not enough to capture all of its output. Also its pretty handy to be able to go back in time and see the output from a session you ran earlier today. Having access to the output as well as the other information from the session makes it possible to compile a session using Emacs built in functionality. This enables navigation between errors in the output as well as [...] - -*** Notifications - -Start a session and then focus on something else. =Dtache= will notify you when the session has become inactive. - -*** Metadata - -The session always contain metadata, such as when the session was started, for how long it has been running (if it is active), how long it ran (if it is inactive). - -*** Annotations - -Arbitrary metadata can be captured when a session is started. An example further down is how to leverage this feature to capture the git branch for a session. - -*** Remote - -Proper support for running session on a remote host. See the =Remote suppport= section of the README for further details on how to configure =dtache= to work for a remote host. - -*** Actions - -The package provides commands that can act on a session. There is the functionality to =kill= an active session, to =rerun= a session, or =diff= two sessions. - -*** Persistent - -The sessions are made persistent by writing the =dtache-session= objects to file. This makes it possible for Emacs to resume the knowledge of prior sessions when Emacs is restarted. - - -* Installation - -The package is available on [[https://elpa.gnu.org][GNU ELPA]] and [[https://melpa.org/][MELPA]], and for users of the [[https://guix.gnu.org/][GNU Guix package manager]] there is a guix package. - -* Configuration - -The prerequisite for =dtache= is that the user has the program =dtach= installed. - -** Use-package example - -A minimal configuration for =dtache=. - -#+begin_src elisp :lexical t :results none - (use-package dtache -:hook (after-init . dtache-setup) -:bind (([remap async-shell-command] . dtache-shell-command))) -#+end_src - -* Commands -** Creating a session - -There are tree different ways to create a dtache session. - -| Function | Description | -|--+---| -| =dtache-shell-command= | Called from M-x | -| =dtache-shell-send-input= | Called
[elpa] externals/dtache 12e3ec8f1e 11/14: Make dtache-copy-session compatible with env mode
branch: externals/dtache commit 12e3ec8f1e61c44a53b85809237f94b4175df5ff Author: Niklas Eklund Commit: Niklas Eklund Make dtache-copy-session compatible with env mode --- dtache.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dtache.el b/dtache.el index f4c0820d52..5937006d42 100644 --- a/dtache.el +++ b/dtache.el @@ -403,6 +403,9 @@ The session is compiled by opening its output and enabling (when (dtache-valid-session session) (with-temp-buffer (insert (dtache--session-output session)) + (when (eq 'terminal-data (dtache--session-env-mode session)) +;; Enable `dtache-log-mode' to parse ansi-escape sequences +(dtache-log-mode)) (kill-new (buffer-string) ;;;###autoload
[elpa] externals/dtache 5087f90120 12/14: Update CHANGELOG
branch: externals/dtache commit 5087f9012035d43cbfeea201037dd1ce0623a7dc Author: Niklas Eklund Commit: Niklas Eklund Update CHANGELOG --- CHANGELOG.org | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.org b/CHANGELOG.org index 141adc0b90..2e1e0ac80d 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -3,6 +3,7 @@ #+language: en * Development +- Improvements to =dtache-env=. The package will now control which mode =dtache-env= should be run in. The mode is either =plain-text= or =terminal-data=. The latter is enabled by default and allows =dtache= to capture control sequences for e.g. colored output. - Add integration with =dired= through =dired-do-shell-command= - Add option to show a session's output when attaching to a it. This feature is enabled with =dtache-show-output-on-attach=.
[elpa] externals/dtache 04f27090ae 14/14: Update contributor section in README
branch: externals/dtache commit 04f27090ae5ef0428a54f998ac766f4e92f34dd8 Author: Niklas Eklund Commit: Niklas Eklund Update contributor section in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06b782fde5..88965be043 100644 --- a/README.md +++ b/README.md @@ -498,7 +498,7 @@ This package wouldn't have been were it is today without these contributors. ## Idea contributors -- [rosetail](https://gitlab.com/rosetail) for all great ideas and improvements to the package. +- [rosetail](https://gitlab.com/rosetail) for all the great ideas and improvements to the package. Without those contributions `dtache` would be a less sophisticated package. - [Troy de Freitas](https://gitlab.com/ntdef) for solving the problem of getting `dtache` to work with `filenotify` on macOS. - [Daniel Mendler](https://gitlab.com/minad) for helping out in improving `dtache`, among other things integration with other packages such as `embark` and `consult`. - [Ambrevar](https://gitlab.com/ambrevar) who indirectly contributed by inspiring me with his [yes eshell is my main shell](https://www.reddit.com/r/emacs/comments/6y3q4k/yes_eshell_is_my_main_shell/). It was through that I discovered his [package-eshell-detach](https://github.com/Ambrevar/dotfiles/blob/master/.emacs.d/lisp/package-eshell-detach.el) which got me into the idea of using `dtach` as a base for detached shell commands.
[nongnu] elpa/magit updated (8269af107f -> 21e671ed76)
elpasync pushed a change to branch elpa/magit. from 8269af107f magit-generate-new-buffer: Determine appropriate default-directory adds 21e671ed76 ci: Test on Emacs 28.1 No new revisions were added by this update. Summary of changes: .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+)
[nongnu] elpa/magit-section updated (8269af107f -> 21e671ed76)
elpasync pushed a change to branch elpa/magit-section. from 8269af107f magit-generate-new-buffer: Determine appropriate default-directory adds 21e671ed76 ci: Test on Emacs 28.1 No new revisions were added by this update. Summary of changes: .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+)
[elpa] externals/tmr updated (bd9b1cd8f3 -> 0d94b41782)
elpasync pushed a change to branch externals/tmr. from bd9b1cd8f3 tmr-tabulated: add library headers new 5c8c0e35d9 tmr-tabulated: Bind "+" to add a new timer new bf9c46ad1e tmr: Add tmr-clone to create a timer from an existing one new e7e7a4225c tmr-tabulated: Bind "c" to clone the timer at point new 0d94b41782 Document tmr-clone and new grid view key bindings Summary of changes: README.org | 23 +++ tmr-tabulated.el | 9 + tmr.el | 32 +++- 3 files changed, 55 insertions(+), 9 deletions(-)
[elpa] externals/tmr 5c8c0e35d9 1/4: tmr-tabulated: Bind "+" to add a new timer
branch: externals/tmr commit 5c8c0e35d90e88e0a3c29091acbf8c993a13d9dc Author: Damien Cassou Commit: Protesilaos Stavrou tmr-tabulated: Bind "+" to add a new timer --- tmr-tabulated.el | 1 + 1 file changed, 1 insertion(+) diff --git a/tmr-tabulated.el b/tmr-tabulated.el index 1b24ae3fff..f0d89d823c 100644 --- a/tmr-tabulated.el +++ b/tmr-tabulated.el @@ -59,6 +59,7 @@ (defvar tmr-tabulated-mode-map (let ((map (make-sparse-keymap))) (define-key map "k" #'tmr-tabulated-cancel) +(define-key map "+" #'tmr) map) "Keybindings for `tmr-tabulated-mode-map'.")
[elpa] externals/tmr e7e7a4225c 3/4: tmr-tabulated: Bind "c" to clone the timer at point
branch: externals/tmr commit e7e7a4225c696522de0d5a6a8a346423f0cc87f0 Author: Damien Cassou Commit: Protesilaos Stavrou tmr-tabulated: Bind "c" to clone the timer at point --- tmr-tabulated.el | 8 1 file changed, 8 insertions(+) diff --git a/tmr-tabulated.el b/tmr-tabulated.el index f0d89d823c..3bef253a20 100644 --- a/tmr-tabulated.el +++ b/tmr-tabulated.el @@ -60,6 +60,7 @@ (let ((map (make-sparse-keymap))) (define-key map "k" #'tmr-tabulated-cancel) (define-key map "+" #'tmr) +(define-key map "c" #'tmr-tabulated-clone) map) "Keybindings for `tmr-tabulated-mode-map'.") @@ -82,6 +83,13 @@ Interactively, use the timer at point." (tmr-tabulated--move-point-to-closest-entry) (revert-buffer)) +(defun tmr-tabulated-clone (timer) + "Create a new timer by cloning TIMER. +Interactively, use the timer at point." + (interactive (list (tmr-tabulated--get-timer-at-point))) + (tmr-clone timer) + (revert-buffer)) + (defun tmr-tabulated--move-point-to-closest-entry () "Move the point to the next entry if there is one or to the previous one. Point isn't moved if point is on the only entry."
[elpa] externals/tmr 0d94b41782 4/4: Document tmr-clone and new grid view key bindings
branch: externals/tmr commit 0d94b417820d437c1a85c7e517d46f1d3b5e07ac Author: Protesilaos Stavrou Commit: Protesilaos Stavrou Document tmr-clone and new grid view key bindings --- README.org | 23 +++ tmr.el | 17 +++-- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/README.org b/README.org index d1db07b0e7..c9f864da24 100644 --- a/README.org +++ b/README.org @@ -120,8 +120,13 @@ the completion prompt are described by the exact time they were set and the input that was used to create them, including the optional description that ~tmr~ and ~tmr-with-description~ accept. -[ The following information about the grid view is part of - {{{development-version}}} ] +[ The following information is part of {{{development-version}}}. Some + things may still change. ] + +#+findex: tmr-clone +An existing timer can be cloned with the ~tmr-clone~ command. It copies +the duration and optional description of an existing timer into a new +one. #+findex: tmr-tabulated-view Active timers can be viewed in a grid with ~tmr-tabulated-view~ (part of @@ -144,9 +149,19 @@ From the =*tmr-tabulated-view*= buffer, invoke the command ~describe-mode~ to learn about the applicable key bindings, such as how to expand/contract columns and toggle their sort. +While in this grid view: + ++ The =+= key creates a new timer by calling the standard ~tmr~ command. + As always, use a prefix argument to also prompt for a description. + +#+findex: tmr-tabulated-cancel ++ The =c= key invokes the ~tmr-tabulated-cancel~ command. It is the + same as the aforementioned ~tmr-cancel~ plus some tweaks for the grid + view. + #+findex: tmr-tabulated-cancel -While in this grid view, the =k= key runs the ~tmr-tabulated-cancel~ -command. It immediately cancels the timer at point. ++ The =k= key runs the ~tmr-tabulated-cancel~ command. It immediately + cancels the timer at point. * Installation :PROPERTIES: diff --git a/tmr.el b/tmr.el index 583f191445..d5ca9c325c 100644 --- a/tmr.el +++ b/tmr.el @@ -76,6 +76,10 @@ ;; the input that was used to create them, including the optional ;; description that `tmr' and `tmr-with-description' accept. ;; +;; An existing timer can be cloned with the `tmr-clone' command. It copies +;; the duration and optional description of an existing timer into a new +;; one. +;; ;; Active timers can be viewed in a grid with `tmr-tabulated-view' (part of ;; the `tmr-tabulated.el' file). The grid is placed in the ;; `*tmr-tabulated-view*' buffer and looks like this: @@ -94,8 +98,17 @@ ;; `describe-mode' to learn about the applicable key bindings, such as how ;; to expand/contract columns and toggle their sort. ;; -;; While in this grid view, the `k' key runs the `tmr-tabulated-cancel' -;; command. It immediately cancels the timer at point. +;; While in this grid view: +;; +;; + The `+' key creates a new timer by calling the standard `tmr' command. +;; As always, use a prefix argument to also prompt for a description. +;; +;; + The `c' key invokes the `tmr-tabulated-cancel' command. It is the +;; same as the aforementioned `tmr-cancel' plus some tweaks for the grid +;; view. +;; +;; + The `k' key runs the `tmr-tabulated-cancel' command. It immediately +;; cancels the timer at point. ;;; Code:
[elpa] externals/tmr bf9c46ad1e 2/4: tmr: Add tmr-clone to create a timer from an existing one
branch: externals/tmr commit bf9c46ad1e7dbf21ea390dcafa4d840e8b807eb1 Author: Damien Cassou Commit: Protesilaos Stavrou tmr: Add tmr-clone to create a timer from an existing one --- tmr.el | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tmr.el b/tmr.el index a29c577e02..583f191445 100644 --- a/tmr.el +++ b/tmr.el @@ -335,9 +335,10 @@ Optionally include DESCRIPTION." (defvar tmr--duration-hist '() "Minibuffer history of `tmr' durations.") -(defun tmr--read-duration () - "Ask the user to type a duration." - (let ((def (nth 0 tmr--duration-hist))) +(defun tmr--read-duration (&optional default) + "Ask the user to type a duration. +If DEFAULT is provided, use that as a default." + (let ((def (or default (nth 0 tmr--duration-hist (read-string (if def (format "N minutes for timer (append `h' or `s' for other units) [%s]: " def) @@ -409,5 +410,13 @@ user uses a prefix argument (\\[universal-argument])." (tmr--description-prompt))) (tmr time description)) +;;;###autoload +(defun tmr-clone (timer) + "Create a new timer by cloning TIMER." + (interactive (list (tmr--read-timer))) + (tmr (tmr--read-duration +(format "%ss" (tmr--timer-duration timer))) + (tmr--timer-description timer))) + (provide 'tmr) ;;; tmr.el ends here
[elpa] externals/corfu updated (dc4623b459 -> c7f3a6f83f)
elpasync pushed a change to branch externals/corfu. from dc4623b459 Version 0.24 new 443905dade Minor extension documentation improvements (Fix #167) new c7f3a6f83f corfu-history: Be more explicit about the configuration (See #167) Summary of changes: README.org | 4 +++- extensions/corfu-history.el | 4 extensions/corfu-indexed.el | 7 --- extensions/corfu-info.el| 6 -- extensions/corfu-quick.el | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-)
[elpa] externals/corfu c7f3a6f83f 2/2: corfu-history: Be more explicit about the configuration (See #167)
branch: externals/corfu commit c7f3a6f83f7f2db7e1a5c78156d762cfc69ba677 Author: Daniel Mendler Commit: Daniel Mendler corfu-history: Be more explicit about the configuration (See #167) --- extensions/corfu-history.el | 4 1 file changed, 4 insertions(+) diff --git a/extensions/corfu-history.el b/extensions/corfu-history.el index 3a2cd7758a..10763f1d9c 100644 --- a/extensions/corfu-history.el +++ b/extensions/corfu-history.el @@ -30,6 +30,10 @@ ;; position. Maintain a list of recently selected candidates. In order ;; to save the history across Emacs sessions, enable `savehist-mode' and ;; add `corfu-history' to `savehist-additional-variables'. +;; +;; (corfu-history-mode 1) +;; (savehist-mode 1) +;; (add-to-list 'savehist-additional-variables 'corfu-history) ;;; Code:
[elpa] externals/nano-theme d0c89de2e4: Fixed but (nano-error -> nano-critical)
branch: externals/nano-theme commit d0c89de2e40231fc54ed3cf34bb12b2ebc3daf9b Author: Nicolas P. Rougier Commit: Nicolas P. Rougier Fixed but (nano-error -> nano-critical) --- nano-theme.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nano-theme.el b/nano-theme.el index 53ad25fa57..2d07d77b26 100644 --- a/nano-theme.el +++ b/nano-theme.el @@ -1399,7 +1399,7 @@ background color that is barely perceptible." '(magit-log-graph((t (:inherit nano-default '(magit-mode-line-process((t (:inherit nano-default -'(magit-mode-line-process-error ((t (:inherit nano-error +'(magit-mode-line-process-error ((t (:inherit nano-critical '(magit-process-ng ((t (:inherit nano-default '(magit-process-ok ((t (:inherit nano-default
[elpa] externals/vertico updated (d5d6e312af -> 0831da48fe)
elpasync pushed a change to branch externals/vertico. from d5d6e312af Make vertico-repeat more robust new 26801d5e2e README: Update section about extensions new 0831da48fe Minor extension documentation improvements Summary of changes: README.org| 15 --- extensions/vertico-indexed.el | 6 -- extensions/vertico-quick.el | 6 +- 3 files changed, 17 insertions(+), 10 deletions(-)
[elpa] externals/vertico 0831da48fe 2/2: Minor extension documentation improvements
branch: externals/vertico commit 0831da48fe75a173a27eb1ff283c80f0a2f4 Author: Daniel Mendler Commit: Daniel Mendler Minor extension documentation improvements --- extensions/vertico-indexed.el | 6 -- extensions/vertico-quick.el | 6 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/extensions/vertico-indexed.el b/extensions/vertico-indexed.el index 6bdf030a1b..ed0268c098 100644 --- a/extensions/vertico-indexed.el +++ b/extensions/vertico-indexed.el @@ -26,8 +26,10 @@ ;;; Commentary: -;; This package is a Vertico extension, which prefixes candidates with -;; indices and allows you to select with prefix arguments. +;; This package is a Vertico extension, which prefixes candidates with indices +;; if enabled via `vertico-indexed-mode'. It allows you to select candidates +;; with prefix arguments. This is designed to be a faster alternative to +;; selecting a candidate with `vertico-next' and `vertico-previous'. ;;; Code: diff --git a/extensions/vertico-quick.el b/extensions/vertico-quick.el index 6c8146f066..539607f891 100644 --- a/extensions/vertico-quick.el +++ b/extensions/vertico-quick.el @@ -26,7 +26,11 @@ ;;; Commentary: -;; This package is a Vertico extension, which provides quick keys. +;; This package is a Vertico extension, which prefixes candidates with +;; quick keys. Typing these quick keys allows you to select the +;; candidate in front of them. This is designed to be a faster +;; alternative to selecting a candidate with `vertico-next' and +;; `vertico-previous'. ;; (define-key vertico-map "\M-q" #'vertico-quick-insert) ;; (define-key vertico-map "\C-q" #'vertico-quick-exit)
[elpa] externals/corfu 443905dade 1/2: Minor extension documentation improvements (Fix #167)
branch: externals/corfu commit 443905dade3e1c14d181c4e30b8583559c1d60d1 Author: Daniel Mendler Commit: Daniel Mendler Minor extension documentation improvements (Fix #167) --- README.org | 4 +++- extensions/corfu-indexed.el | 7 --- extensions/corfu-info.el| 6 -- extensions/corfu-quick.el | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index f92a68471b..f706e10fba 100644 --- a/README.org +++ b/README.org @@ -410,9 +410,11 @@ following extensions come with the Corfu ELPA package: - [[https://github.com/minad/corfu/blob/main/extensions/corfu-history.el][corfu-history]]: =corfu-history-mode= to remember selected candidates and to improve sorting. - [[https://github.com/minad/corfu/blob/main/extensions/corfu-indexed.el][corfu-indexed]]: =corfu-indexed-mode= to select indexed candidates with prefix arguments. -- [[https://github.com/minad/corfu/blob/main/extensions/corfu-info.el][corfu-info]]: Candidate actions to access the candidate location and documentation. +- [[https://github.com/minad/corfu/blob/main/extensions/corfu-info.el][corfu-info]]: Actions to access the candidate location and documentation. - [[https://github.com/minad/corfu/blob/main/extensions/corfu-quick.el][corfu-quick]]: Commands to select using Avy-style quick keys. +See the Commentary of those files for configuration details. + * Complementary packages Corfu works well together with all packages providing code completion via the diff --git a/extensions/corfu-indexed.el b/extensions/corfu-indexed.el index 5b817cde38..feefbf1bdb 100644 --- a/extensions/corfu-indexed.el +++ b/extensions/corfu-indexed.el @@ -26,9 +26,10 @@ ;;; Commentary: -;; This package is a Corfu extension, which prefixes candidates with indices and -;; allows you to select with prefix arguments. This is designed to be a faster -;; alternative to selecting a candidate with `corfu-next' and `corfu-previous'. +;; This package is a Corfu extension, which prefixes candidates with indices if +;; enabled via `corfu-indexed-mode'. It allows you to select candidates with +;; prefix arguments. This is designed to be a faster alternative to selecting a +;; candidate with `corfu-next' and `corfu-previous'. ;;; Code: diff --git a/extensions/corfu-info.el b/extensions/corfu-info.el index 14003500a9..e2eff63b48 100644 --- a/extensions/corfu-info.el +++ b/extensions/corfu-info.el @@ -26,8 +26,10 @@ ;;; Commentary: -;; This Corfu extension provides commands to show additional information -;; to the candidates in a separate buffer. +;; This Corfu extension provides commands to show additional information to the +;; candidates in a separate buffer. The commands `corfu-info-location' and +;; `corfu-info-documentation' are bound by default in the `corfu-map' to M-g and +;; M-h respectively. ;;; Code: diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el index df02eccda7..2e0e3e2999 100644 --- a/extensions/corfu-quick.el +++ b/extensions/corfu-quick.el @@ -32,7 +32,7 @@ ;; alternative to selecting a candidate with `corfu-next' and ;; `corfu-previous'. ;; (define-key corfu-map "\M-q" #'corfu-quick-complete) -;; (define-key corfu-map "\C-q" #'corfu-quick-exit) +;; (define-key corfu-map "\C-q" #'corfu-quick-insert) ;;; Code:
[elpa] externals/vertico 26801d5e2e 1/2: README: Update section about extensions
branch: externals/vertico commit 26801d5e2ea2f699740055e41360ed3aff98eeb7 Author: Daniel Mendler Commit: Daniel Mendler README: Update section about extensions --- README.org | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index 4c9c2fd236..e97f54d420 100644 --- a/README.org +++ b/README.org @@ -243,13 +243,14 @@ following extensions come with the Vertico ELPA package: - [[https://github.com/minad/vertico/blob/main/extensions/vertico-reverse.el][vertico-reverse]]: =vertico-reverse-mode= to reverse the display. - [[https://github.com/minad/vertico/blob/main/extensions/vertico-unobtrusive.el][vertico-unobtrusive]]: =vertico-unobtrusive-mode= displays only the topmost candidate. -With these extensions it is possible to adapt Vertico such that it matches your -preference or behaves similar to other familiar UIs. For example, the -combination =vertico-flat= plus =vertico-directory= resembles Ido in look and feel. -For an interface similar to Helm, the extension =vertico-buffer= allows you to -configure freely where the completion buffer opens, instead of growing the -minibuffer. Furthermore =vertico-buffer= will adjust the number of displayed -candidates according to the buffer height. +See the Commentary of those files for configuration details. With these +extensions it is possible to adapt Vertico such that it matches your preference +or behaves similar to other familiar UIs. For example, the combination +=vertico-flat= plus =vertico-directory= resembles Ido in look and feel. For an +interface similar to Helm, the extension =vertico-buffer= allows you to configure +freely where the completion buffer opens, instead of growing the minibuffer. +Furthermore =vertico-buffer= will adjust the number of displayed candidates +according to the buffer height. Configuration example for =vertico-directory=:
[elpa] externals/csv-mode 51580d5bf7: Make csv-mode align when display-line-numbers-mode is on
branch: externals/csv-mode commit 51580d5bf7095eff429029cd8d4b79214faf6b48 Author: Lars Ingebrigtsen Commit: Lars Ingebrigtsen Make csv-mode align when display-line-numbers-mode is on * csv-mode.el (csv-header-line): Add the header line indent. (csv--compute-header-string): Add to align-to. (csv-align-mode): Enable header-line-indent-mode (bug#55387). --- csv-mode.el | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/csv-mode.el b/csv-mode.el index 30dbb5f4ec..c39f81eabe 100644 --- a/csv-mode.el +++ b/csv-mode.el @@ -4,7 +4,7 @@ ;; Author: "Francis J. Wright" ;; Maintainer: emacs-de...@gnu.org -;; Version: 1.19 +;; Version: 1.20 ;; Package-Requires: ((emacs "27.1") (cl-lib "0.5")) ;; Keywords: convenience @@ -1377,8 +1377,12 @@ If there is already a header line, then unset the header line." (overlay-put csv--header-line 'modification-hooks '(csv--header-flush))) (csv--header-flush) +;; These are introduced in Emacs 29. +(unless (boundp 'header-line-indent) + (setq-local header-line-indent "" + header-line-indent-width 0)) (setq header-line-format - '(:eval (csv--header-string) + '("" header-line-indent (:eval (csv--header-string)) (defun csv--header-flush (&rest _) ;; Force re-computation of the header-line. @@ -1412,9 +1416,10 @@ If there is already a header line, then unset the header line." (nexti (next-single-property-change i 'display str)) (newprop `(space :align-to - ,(if (numberp x) - (- x (or csv--header-hscroll 0)) -`(- ,x csv--header-hscroll) + (+ ,(if (numberp x) + (- x (or csv--header-hscroll 0)) + `(- ,x csv--header-hscroll)) +header-line-indent-width (put-text-property i (or nexti (length str)) 'display newprop str) (setq i nexti @@ -1742,6 +1747,8 @@ setting works better)." (add-to-invisibility-spec '(csv-truncate . t)) (kill-local-variable 'csv--jit-columns) (cursor-sensor-mode 1) +(when (fboundp 'header-line-indent-mode) + (header-line-indent-mode)) (jit-lock-register #'csv--jit-align) (jit-lock-refontify)) (t
[elpa] externals/dtache dd57e01ba0: Improve completing read interface
branch: externals/dtache commit dd57e01ba0c06adc7d4a96c546a866ddaf1f792c Author: Niklas Eklund Commit: Niklas Eklund Improve completing read interface Make the command width as well as annotation dynmaic. They will both adapt their width depending on the current sessions. --- CHANGELOG.org | 1 + README.md | 2 +- dtache.el | 121 ++-- test/dtache-test.el | 20 ++--- 4 files changed, 84 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index ef5445e109..14dbcc7d8f 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -3,6 +3,7 @@ #+language: en * Development +- Make completion of sessions adapt to the current dtache sessions. All of the sessions will be used to determine an an appropriate width for the command width as well as each individual annotation. Format has updated in =dtache-annotation-format= and a =dtache-command-format= has been added, this supersedes the =dtache-max-command-lenght=. - Improvements to =dtache-env=. The package will now control which mode =dtache-env= should be run in. The mode is either =plain-text= or =terminal-data=. The latter is enabled by default and allows =dtache= to capture control sequences for e.g. colored output. This update will require users to update their =dtache-env= scripts. - Add integration with =dired= through =dired-do-shell-command= - Add option to show a session's output when attaching to a it. This feature is enabled with =dtache-show-output-on-attach=. diff --git a/README.md b/README.md index 88965be043..70333f515c 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,7 @@ The package provides the following customizable variables. | dtache-timer-configuration | Configuration of the timer that runs on remote hosts | | dtache-env | Name or path to the `dtache-env` script | | dtache-annotation-format | A list of annotations that should be present in completion| -| dtache-max-command-length | How many characters should be used when displaying a command | +| dtache-command-format | A configuration for displaying a session command | | dtache-tail-interval | How often `dtache` should refresh the output when tailing | | dtache-nonattachable-commands | A list of commands that should be considered nonattachable| | dtache-notification-function | Specifies which function to issue notifications with | diff --git a/dtache.el b/dtache.el index 5937006d42..93befbca6a 100644 --- a/dtache.el +++ b/dtache.el @@ -98,20 +98,21 @@ :group 'dtache) (defcustom dtache-annotation-format - '((:width 3 :function dtache--state-str :face dtache-state-face) -(:width 3 :function dtache--status-str :face dtache-failure-face) -(:width 10 :function dtache--host-str :face dtache-host-face) -(:width 40 :function dtache--working-dir-str :face dtache-working-dir-face) -(:width 30 :function dtache--metadata-str :face dtache-metadata-face) -(:width 10 :function dtache--duration-str :face dtache-duration-face) -(:width 8 :function dtache--size-str :face dtache-size-face) -(:width 12 :function dtache--creation-str :face dtache-creation-face)) + '((:width 3 :padding 2 :function dtache--status-str :face dtache-failure-face) +(:width 3 :padding 4 :function dtache--state-str :face dtache-state-face) +(:width 10 :padding 4 :function dtache--host-str :face dtache-host-face) +(:width 40 :padding 4 :function dtache--working-dir-str :face dtache-working-dir-face) +(:width 40 :padding 4 :function dtache--metadata-str :face dtache-metadata-face) +(:width 10 :padding 4 :function dtache--duration-str :face dtache-duration-face) +(:width 8 :padding 4 :function dtache--size-str :face dtache-size-face) +(:width 12 :padding 4 :function dtache--creation-str :face dtache-creation-face)) "The format of the annotations." :type '(repeat symbol) :group 'dtache) -(defcustom dtache-max-command-length 90 - "Maximum length of displayed command." +(defcustom dtache-command-format + '(:width 50 :padding 4 :function dtache--command-str) + "The format for displaying the command." :type 'integer :group 'dtache) @@ -260,6 +261,8 @@ This version is encoded as [package-version].[revision].") (make-variable-buffer-local 'dtache--buffer-session) (defvar dtache--session-candidates nil "An alist of session candidates.") +(defvar dtache--annotation-widths nil + "An alist of widths to use for annotation.") (defconst dtache--shell-command-buffer "*Dtache Shell Command*" "Name of the `dtache-shell-command' buffer.") @@ -331,7 +334,7 @@ Optionally SUPPRESS-OUTPUT if prefix-argument is provided." (list (dtache-completing-read (dtache-g
[elpa] externals/dtache 08310ca70b 2/2: Update CHANGELOG
branch: externals/dtache commit 08310ca70b935d82fab146c7135d19a2c784f160 Author: Niklas Eklund Commit: Niklas Eklund Update CHANGELOG --- CHANGELOG.org | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.org b/CHANGELOG.org index 14dbcc7d8f..bb72a9274a 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -3,6 +3,7 @@ #+language: en * Development +- Rewrite =dtache= to enable the package to lazy load and not force users to load it when starting Emacs. - Make completion of sessions adapt to the current dtache sessions. All of the sessions will be used to determine an an appropriate width for the command width as well as each individual annotation. Format has updated in =dtache-annotation-format= and a =dtache-command-format= has been added, this supersedes the =dtache-max-command-lenght=. - Improvements to =dtache-env=. The package will now control which mode =dtache-env= should be run in. The mode is either =plain-text= or =terminal-data=. The latter is enabled by default and allows =dtache= to capture control sequences for e.g. colored output. This update will require users to update their =dtache-env= scripts. - Add integration with =dired= through =dired-do-shell-command=
[elpa] externals/dtache updated (dd57e01ba0 -> 08310ca70b)
elpasync pushed a change to branch externals/dtache. from dd57e01ba0 Improve completing read interface new b38560b002 Remove dtache's need of setup functions new 08310ca70b Update CHANGELOG Summary of changes: CHANGELOG.org | 1 + README.md | 38 +- dtache-compile.el | 31 +-- dtache-eshell.el | 9 ++--- dtache-org.el | 6 -- dtache-shell.el | 9 + dtache.el | 55 +-- 7 files changed, 67 insertions(+), 82 deletions(-)
[elpa] externals/dtache b38560b002 1/2: Remove dtache's need of setup functions
branch: externals/dtache commit b38560b002b26bcbfd85fa4100df2202a16ee9ac Author: Niklas Eklund Commit: Niklas Eklund Remove dtache's need of setup functions The package required the user to run different setup functions, which forced users to load dtache at start-up. This restructuring update the code as well as the README to guide users on how they can lazy load dtache. --- README.md | 38 +- dtache-compile.el | 31 +-- dtache-eshell.el | 9 ++--- dtache-org.el | 6 -- dtache-shell.el | 9 + dtache.el | 55 +-- 6 files changed, 66 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index 70333f515c..090a639d02 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,10 @@ A minimal configuration for `dtache`. ``` emacs-lisp (use-package dtache - :hook (after-init . dtache-setup) - :bind (([remap async-shell-command] . dtache-shell-command))) + :defer t + :hook ((shell-mode . dtache-shell-mode)) + :bind (([remap async-shell-command] . dtache-shell-command)) + :custom ((dtache-show-output-on-attach t))) ``` # Commands @@ -127,10 +129,11 @@ A `use-package` configuration of the `dtache-shell` extension, which provides th ``` emacs-lisp (use-package dtache-shell - :after dtache - :config - (dtache-shell-setup) - (setq dtache-shell-history-file "~/.bash_history")) + :after shell + :init + (advice-add 'shell :around #'dtache-shell-override-history) + (add-hook 'shell-mode-hook #'dtache-shell-save-history-on-kill) + :custom (dtache-shell-history-file "~/.bash_history")) ``` A minor mode named `dtache-shell-mode` is provided, and will be enabled in `shell`. The commands that are implemented are: @@ -147,9 +150,8 @@ A `use-package` configuration of the `dtache-eshell` extension, which provides t ``` emacs-lisp (use-package dtache-eshell - :after (eshell dtache) - :config - (dtache-eshell-setup)) + :defer t + :hook ((eshell-mode . dtache-eshell-mode))) ``` A minor mode named `dtache-eshell-mode` is provided, and will be enabled in `eshell`. The commands that are implemented are: @@ -167,10 +169,12 @@ In this [blog post](https://niklaseklund.gitlab.io/blog/posts/dtache_eshell/) th A `use-package` configuration of the `dtache-compile` extension, which provides the integration with `compile`. ``` emacs-lisp -(use-package dtache-compile - :hook (after-init . dtache-compile-setup) - :bind (([remap compile] . dtache-compile) - ([remap recompile] . dtache-compile-recompile))) +(use-package dtache-compile + :defer t + :bind (([remap compile] . dtache-compile) + ([remap recompile] . dtache-compile-recompile)) + :hook ((compilation-start . dtache-compile-start) + (compilation-shell-minor-mode . dtache-shell-mode))) ``` The package implements the commands `dtache-compile` and `dtache-compile-recompile`, which are thin wrappers around the original `compile` and `recompile` commands. The users should be able to use the former as replacements for the latter without noticing any difference except from the possibility to `detach`. @@ -182,14 +186,14 @@ A `use-package` configuration of the `dtache-org` extension, which provides the ``` emacs-lisp (use-package dtache-org - :after (dtache org) - :config - (dtache-org-setup)) + :after ob + :init + (advice-add #'org-babel-sh-evaluate :around #'dtache-org-babel-sh)) ``` The package implements an additional header argument for `ob-shell`. The header argument is `:dtache t`. When provided it will enable the code inside a src block to be run with `dtache`. Since org is not providing any live updates on the output the session is created with `dtache-sesion-mode` set to `create`. This means that if you want to access the output of the session you do that the same way you would for any other type of session. The `dtache-org` works both with and without the `: [...] -``` emacs-lisp +``` #+begin_src sh :dtache t cd ~/code ls -la diff --git a/dtache-compile.el b/dtache-compile.el index 713805225e..6ed9f3060e 100644 --- a/dtache-compile.el +++ b/dtache-compile.el @@ -82,6 +82,7 @@ Optionally EDIT-COMMAND." (dtache--current-session session)) (compilation-start (dtache--session-command session) +;;;###autoload (defun dtache-compile-open (session) "Open SESSION with `dtache-compile'." (when (dtache-valid-session session) @@ -89,13 +90,15 @@ Optionally EDIT-COMMAND." (dtache-compile-attach session) (dtache-compile-session session -;;;###autoload -(defun dtache-compile-setup () - "Setup `dtache-compile'." - (dtache-setup) - (advice-add #'compilation-start :around #'dtache-compile--compilation-start) - (add-hook 'compilation-start-hook #'dtache-compile--start) - (add-hook 'compilation-shell-minor-mode-hook #'dtach
[elpa] externals/javaimp updated (00a7e084be -> 2c871eb5c8)
fgunbin pushed a change to branch externals/javaimp. from 00a7e084be More navigation functions fixes new a3bfdc2352 Clean up syntax / parsing settings new 2c871eb5c8 Add test for javaimp-parse--decl-prefix Summary of changes: javaimp-parse.el | 171 ++- javaimp-tests.el | 11 javaimp.el | 10 tests/imenu.el | 8 +-- tests/parse.el | 70 +++ tests/tests.el | 5 +- 6 files changed, 164 insertions(+), 111 deletions(-)
[elpa] externals/javaimp a3bfdc2352 1/2: Clean up syntax / parsing settings
branch: externals/javaimp commit a3bfdc2352197065bfc396ae85b2515980410da4 Author: Filipp Gunbin Commit: Filipp Gunbin Clean up syntax / parsing settings --- javaimp-parse.el | 171 ++- javaimp-tests.el | 11 javaimp.el | 10 tests/imenu.el | 8 +-- tests/parse.el | 22 +++ tests/tests.el | 5 +- 6 files changed, 115 insertions(+), 112 deletions(-) diff --git a/javaimp-parse.el b/javaimp-parse.el index 984dfa5579..0e1cb1350e 100644 --- a/javaimp-parse.el +++ b/javaimp-parse.el @@ -70,21 +70,19 @@ regexp. First group is directive, second group is identifier." (javaimp-parse--directive-regexp "import\\(?:[[:space:]]+static\\)?")) -(defvar javaimp-syntax-table - (make-syntax-table java-mode-syntax-table) ;TODO don't depend on cc-mode - "Javaimp syntax table") - -(defvar javaimp--arglist-syntax-table - (let ((st (make-syntax-table javaimp-syntax-table))) +(defvar javaimp--parse-syntax-table + ;; TODO don't depend on cc-mode + (let ((st (make-syntax-table java-mode-syntax-table))) +;; To be able to skip over generic types as over lists (modify-syntax-entry ?< "(>" st) (modify-syntax-entry ?> ")<" st) -(modify-syntax-entry ?. "_" st) ; separates parts of fully-qualified type -;; Override prefix syntax so that scan-sexps right after @ in -;; annotation doesn't ignore it. +;; Dot separates parts of fully-qualified type +(modify-syntax-entry ?. "_" st) ; +;; Override prefix syntax so that scan-sexps backwards right after +;; @ in annotation doesn't ignore it. (modify-syntax-entry ?@ "_" st) st) - "Enables parsing angle brackets as lists") - + "Syntax table used in parsing.") (defvar-local javaimp-parse--dirty-pos nil "Marker which points to a buffer position after which all parsed @@ -123,7 +121,7 @@ non-nil, then name parsing is skipped." (let ((substr (buffer-substring-no-properties beg end))) (with-temp-buffer (insert substr) - (with-syntax-table javaimp--arglist-syntax-table + (with-syntax-table javaimp--parse-syntax-table (ignore-errors (let (res) (while (progn @@ -237,7 +235,7 @@ is unchanged." (catch 'found (while (javaimp-parse--rsb-keyword regexp bound t) (let ((scan-pos (match-end 0))) - (with-syntax-table javaimp--arglist-syntax-table + (with-syntax-table javaimp--parse-syntax-table ;; Skip over any number of lists, which may be exceptions ;; in "throws", or something like that (while (and scan-pos (<= scan-pos brace-pos)) @@ -259,38 +257,37 @@ point (but not farther than BOUND). Matches inside comments / strings are skipped. Return the beginning of the match (then the point is also at that position) or nil (then the point is left unchanged)." - (with-syntax-table javaimp-syntax-table -(let ((state (syntax-ppss)) - prev-semi pos res) - ;; Move out of any comment/string - (when (nth 8 state) - (goto-char (nth 8 state)) - (setq state (syntax-ppss))) - ;; If we skip a previous scope (including unnamed initializers), - ;; or reach enclosing scope start, we'll fail the check in the - ;; below loop. But a semicolon, which delimits statements, will - ;; just be skipped by scan-sexps, so find it and use as bound. - ;; If it is in another scope, that's not a problem, for the same - ;; reasons as described above. - (setq prev-semi (save-excursion -(javaimp-parse--rsb-keyword ";" bound t)) -bound (when (or bound prev-semi) -(apply #'max - (delq nil - (list bound - (and prev-semi (1+ prev-semi))) - ;; Go back by sexps - (with-syntax-table javaimp--arglist-syntax-table -(while (and (ignore-errors - (setq pos (scan-sexps (point) -1))) -(or (not bound) (>= pos bound)) -(or (member (char-after pos) -'(?@ ?\( ;annotation type / args - ?<)) ;generic type -;; keyword / identifier first char -(= (syntax-class (syntax-after pos)) 2))) ;word - (goto-char (setq res pos - res))) + (let ((state (syntax-ppss)) +prev-semi pos res) +;; Move out of any comment/string +(when (nth 8 state) + (goto-char (nth 8 state)) + (setq state (syntax-ppss))) +;; If we skip a previous scope (including unnamed initializers), +;; or reach enclosing scope start, we'll fail the check in the +;; below loop. But a semicolon, which delimits statements, will +;; just be skipped by scan-sexps, so find it and use as bound. +;; If it is in another scope, that's not a problem,
[elpa] externals/javaimp 2c871eb5c8 2/2: Add test for javaimp-parse--decl-prefix
branch: externals/javaimp commit 2c871eb5c84da984a9ce03879ecb85a8c1e4a444 Author: Filipp Gunbin Commit: Filipp Gunbin Add test for javaimp-parse--decl-prefix --- tests/parse.el | 50 ++ 1 file changed, 50 insertions(+) diff --git a/tests/parse.el b/tests/parse.el index b4c0b99121..86f8820c0f 100644 --- a/tests/parse.el +++ b/tests/parse.el @@ -61,6 +61,56 @@ Exception4>") (should (equal (javaimp-parse--arglist (point-min) (point-max) t) (cdr data)) +(ert-deftest javaimp-parse-decl-prefix () + (dolist (data '(;; simple + (" void " . 2) + (" public static void " . 2) + + ;; no sexps + (" ") + ;; incomplete sexps + ("var)") + (") ") + + ;; don't go over / into braces + ("{ } void" . 6) + ("} void" . 3) + ;; don't go into parens + (") void" . 3) + + ;; comments + ("\ + /** + * javadoc1 + */ + public + // line comment + /** + * javadoc2 + */ + void " . 29) + + ;; annotations + ("\ + @Annotation1 + @Annotation2(value = \"foo\") + @Annotation3({@Ann4(value = \"bar\"), @Ann4}) + void " . 3) + + ;; generics + ("public T " . 1) + (" T " . 1) + ;; don't go into incomplete generic + ("S> T " . 4) + + ;; don't go over semicolon + ("foo(); void " . 8))) +(javaimp-with-temp-buffer nil + (insert (car data)) + (should (equal (cdr data) + (javaimp-parse--decl-prefix)) + + ;; Tests for scope parsers
[elpa] externals/javaimp 53146a24d9: Use javaimp-parse--skip-back-until for exiting comments/strings
branch: externals/javaimp commit 53146a24d910ae19122dbace68c3a4dfff1b13ac Author: Filipp Gunbin Commit: Filipp Gunbin Use javaimp-parse--skip-back-until for exiting comments/strings --- javaimp-parse.el | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/javaimp-parse.el b/javaimp-parse.el index 0e1cb1350e..61d14910e8 100644 --- a/javaimp-parse.el +++ b/javaimp-parse.el @@ -257,12 +257,8 @@ point (but not farther than BOUND). Matches inside comments / strings are skipped. Return the beginning of the match (then the point is also at that position) or nil (then the point is left unchanged)." - (let ((state (syntax-ppss)) -prev-semi pos res) -;; Move out of any comment/string -(when (nth 8 state) - (goto-char (nth 8 state)) - (setq state (syntax-ppss))) + (let (prev-semi pos res) +(javaimp-parse--skip-back-until) ;; If we skip a previous scope (including unnamed initializers), ;; or reach enclosing scope start, we'll fail the check in the ;; below loop. But a semicolon, which delimits statements, will @@ -573,12 +569,9 @@ call this function first." (defun javaimp-parse--enclosing-scope (&optional pred) "Return innermost enclosing scope matching PRED." - (let ((state (syntax-ppss))) -;; Move out of any comment/string -(when (nth 8 state) - (goto-char (nth 8 state)) - (setq state (syntax-ppss))) -(catch 'found + (javaimp-parse--skip-back-until) + (catch 'found +(let ((state (syntax-ppss))) (while t (let ((res (save-excursion (javaimp-parse--scopes nil
[elpa] externals/javaimp 1e68967c27: * javaimp-parse.el (javaimp-parse--decl-prefix): let instead of setq
branch: externals/javaimp commit 1e68967c276cd4f3eb8396059c08f8434476f771 Author: Filipp Gunbin Commit: Filipp Gunbin * javaimp-parse.el (javaimp-parse--decl-prefix): let instead of setq --- javaimp-parse.el | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/javaimp-parse.el b/javaimp-parse.el index 61d14910e8..f1f45a43d9 100644 --- a/javaimp-parse.el +++ b/javaimp-parse.el @@ -257,29 +257,29 @@ point (but not farther than BOUND). Matches inside comments / strings are skipped. Return the beginning of the match (then the point is also at that position) or nil (then the point is left unchanged)." - (let (prev-semi pos res) -(javaimp-parse--skip-back-until) -;; If we skip a previous scope (including unnamed initializers), -;; or reach enclosing scope start, we'll fail the check in the -;; below loop. But a semicolon, which delimits statements, will -;; just be skipped by scan-sexps, so find it and use as bound. -;; If it is in another scope, that's not a problem, for the same -;; reasons as described above. -(setq prev-semi (save-excursion - (javaimp-parse--rsb-keyword ";" bound t)) - bound (when (or bound prev-semi) + (javaimp-parse--skip-back-until) + ;; If we skip a previous scope (including unnamed initializers), or + ;; reach enclosing scope start, we'll fail the check in the below + ;; loop. But a semicolon, which delimits statements, will just be + ;; skipped by scan-sexps, so find it and use as bound. If it is in + ;; another scope, that's not a problem, for the same reasons as + ;; described above. + (let* ((prev-semi (save-excursion + (javaimp-parse--rsb-keyword ";" bound t))) + (bound (when (or bound prev-semi) (apply #'max (delq nil (list bound (and prev-semi (1+ prev-semi))) + pos res) ;; Go back by sexps (with-syntax-table javaimp--parse-syntax-table (while (and (ignore-errors (setq pos (scan-sexps (point) -1))) (or (not bound) (>= pos bound)) (or (memql (char-after pos) - '(?@ ?\(;annotation type / args - ?<)) ;generic type + '(?@ ?\( ;annotation type / args + ?<)) ;generic type ;; keyword / identifier first char (= (syntax-class (syntax-after pos)) 2))) ;word (goto-char (setq res pos
[elpa] externals/taxy updated (b209692b63 -> 009074563f)
elpasync pushed a change to branch externals/taxy. from b209692b63 Release: 0.9 new feac397f27 Meta: 0.10-pre new 009074563f Deffy: Fix: Disambiguate forms with same name Summary of changes: README.org| 6 +++ examples/deffy.el | 20 +++- taxy.el | 2 +- taxy.info | 146 +- 4 files changed, 103 insertions(+), 71 deletions(-)
[elpa] externals/taxy feac397f27 1/2: Meta: 0.10-pre
branch: externals/taxy commit feac397f275c5d4b1661491b885fc9b41ac843f9 Author: Adam Porter Commit: Adam Porter Meta: 0.10-pre --- README.org | 4 ++ taxy.el| 2 +- taxy.info | 146 + 3 files changed, 83 insertions(+), 69 deletions(-) diff --git a/README.org b/README.org index 1f4e00ea9f..21d1919692 100644 --- a/README.org +++ b/README.org @@ -933,6 +933,10 @@ In Emacs 28+, see also =M-x shortdoc-display-group RET taxy RET=. :TOC: :depth 0 :END: +** 0.10-pre + +Nothing new yet. + ** 0.9 *** Changes diff --git a/taxy.el b/taxy.el index f8d8c86074..c9bc4df02f 100644 --- a/taxy.el +++ b/taxy.el @@ -6,7 +6,7 @@ ;; Maintainer: Adam Porter ;; URL: https://github.com/alphapapa/taxy.el ;; Package-Requires: ((emacs "26.3")) -;; Version: 0.9 +;; Version: 0.10-pre ;; Keywords: lisp ;; This program is free software; you can redistribute it and/or modify diff --git a/taxy.info b/taxy.info index 7f6e8f059e..44c69c2f91 100644 --- a/taxy.info +++ b/taxy.info @@ -76,6 +76,7 @@ Reference Changelog +* 0.10-pre: 010-pre. * 0.9: 09. * 0.8: 08. * 0.7: 07. @@ -1134,6 +1135,7 @@ File: README.info, Node: Changelog, Next: Development, Prev: Usage, Up: Top * Menu: +* 0.10-pre: 010-pre. * 0.9: 09. * 0.8: 08. * 0.7: 07. @@ -1145,9 +1147,17 @@ File: README.info, Node: Changelog, Next: Development, Prev: Usage, Up: Top * 0.1: 01. -File: README.info, Node: 09, Next: 08, Up: Changelog +File: README.info, Node: 010-pre, Next: 09, Up: Changelog -4.1 0.9 +4.1 0.10-pre + + +Nothing new yet. + + +File: README.info, Node: 09, Next: 08, Prev: 010-pre, Up: Changelog + +4.2 0.9 === * Menu: @@ -1157,7 +1167,7 @@ File: README.info, Node: 09, Next: 08, Up: Changelog File: README.info, Node: Changes, Up: 09 -4.1.1 Changes +4.2.1 Changes - • Library ‘taxy-magit-section’ is now packaged separately @@ -1165,12 +1175,11 @@ File: README.info, Node: Changes, Up: 09 maintained in a separate branch (https://github.com/alphapapa/taxy.el/tree/package/taxy-magit-section). • Minor fixes to documentation and examples. - • Emacs 27.1 or later is now required. File: README.info, Node: 08, Next: 07, Prev: 09, Up: Changelog -4.2 0.8 +4.3 0.8 === * Menu: @@ -1181,7 +1190,7 @@ File: README.info, Node: 08, Next: 07, Prev: 09, Up: Changelog File: README.info, Node: Additions, Next: Fixes, Up: 08 -4.2.1 Additions +4.3.1 Additions --- • Short documentation group for Emacs 28+. @@ -1189,7 +1198,7 @@ File: README.info, Node: Additions, Next: Fixes, Up: 08 File: README.info, Node: Fixes, Prev: Additions, Up: 08 -4.2.2 Fixes +4.3.2 Fixes --- • Require ‘map’ for ‘pcase’ pattern. @@ -1197,7 +1206,7 @@ File: README.info, Node: Fixes, Prev: Additions, Up: 08 File: README.info, Node: 07, Next: 06, Prev: 08, Up: Changelog -4.3 0.7 +4.4 0.7 === * Menu: @@ -1207,7 +1216,7 @@ File: README.info, Node: 07, Next: 06, Prev: 08, Up: Changelog File: README.info, Node: Additions (1), Up: 07 -4.3.1 Additions +4.4.1 Additions --- • Function ‘taxy-flatten’ returns a list of the items in a taxy and @@ -1219,7 +1228,7 @@ File: README.info, Node: Additions (1), Up: 07 File: README.info, Node: 06, Next: 05, Prev: 07, Up: Changelog -4.4 0.6 +4.5 0.6 === * Menu: @@ -1229,7 +1238,7 @@ File: README.info, Node: 06, Next: 05, Prev: 07, Up: Changelog File: README.info, Node: Additions (2), Up: 06 -4.4.1 Additions +4.5.1 Additions --- • Sorting functions: @@ -1259,7 +1268,7 @@ File: README.info, Node: Additions (2), Up: 06 File: README.info, Node: 05, Next: 04, Prev: 06, Up: Changelog -4.5 0.5 +4.6 0.5 === * Menu: @@ -1270,7 +1279,7 @@ File: README.info, Node: 05, Next: 04, Prev: 06, Up: Changelog File: README.info, Node: Additions (3), Next: Fixes (1), Up: 05 -4.5.1 Additions +4.6.1 Additions --- • Function ‘taxy-magit-section-insert’ takes new arguments: @@ -1292,7 +1301,7 @@ File: README.info, Node: Additions (3), Next: Fixes (1), Up: 05 File: README.info, Node: Fixes (1), Prev: Additions (3), Up: 05 -4.5.2 Fixes +4.6.2 Fixes --- • Example ‘diredy’ referred to an old function name. @@ -1300,7 +1309,7 @@ File: README.info, Node: Fixes (1), Prev: Additions (3), Up: 05 File: README.info, Node: 04, Next: 03, Prev: 05, Up: Changelog -4.6 0.4 +4.7 0.4 === • Incremented version to cause a new ELPA release (since removing a @@ -1309,7 +1318,7 @@ File: README.info, Node: 04, Next: 03, Prev: 05, Up: Changelog File: README.info, Node: 03, Next: 02, Prev: 04, Up: Changelog -4.7 0.3 +4.8 0.3 === * Menu: @@ -1320,7 +1329,7 @@ File: README.info, Node: 03, Next: 02, Prev: 04, Up: Changelog
[elpa] externals/taxy 009074563f 2/2: Deffy: Fix: Disambiguate forms with same name
branch: externals/taxy commit 009074563fc443c5bb6337d642001c6328a9c379 Author: Adam Porter Commit: Adam Porter Deffy: Fix: Disambiguate forms with same name --- README.org| 4 +++- examples/deffy.el | 20 ++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 21d1919692..4160a0844e 100644 --- a/README.org +++ b/README.org @@ -935,7 +935,9 @@ In Emacs 28+, see also =M-x shortdoc-display-group RET taxy RET=. ** 0.10-pre -Nothing new yet. +*Examples* ++ Deffy + + Fix: Disambiguate forms with the same name. ** 0.9 diff --git a/examples/deffy.el b/examples/deffy.el index 03524301d4..3126bd0336 100644 --- a/examples/deffy.el +++ b/examples/deffy.el @@ -304,7 +304,10 @@ prefix, from all `deffy-mode' buffers." "Read form selected from Deffy BUFFERS with completion." (unless deffy-buffers (user-error "No Deffy buffers to find in")) - (cl-labels ((def-cons + (cl-labels ((disambiguate (string) +(format "%s (%s)" +string (deffy-def-type (get-text-property 0 :def string + (def-cons (def) (cons (propertize (format "%s" (deffy-def-name def)) :annotation (funcall annotate-fn def) @@ -345,7 +348,20 @@ prefix, from all `deffy-mode' buffers." affixation-fn #'affix))) (let* ((taxys (mapcar #'buffer-taxy deffy-buffers)) (items (mapcan #'taxy-flatten taxys)) - (alist (setf items (mapcar #'def-cons items))) + (alist (mapcar #'def-cons items)) + ;; Unfortunately, `completing-read' always discards text properties, which + ;; means that they can't be used to disambiguate items with the same name + ;; (e.g. `(defthis foo)' in one form and `(defthat foo)' in another). So we + ;; have to check for items with duplicate names, then replace the string with + ;; one that disambiguates them. + (duplicates (cl-loop for item in alist +when (> (cl-count (car item) alist :key #'car :test #'equal) 1) +collect item)) + (_ (when duplicates +(dolist (dupe duplicates) + (setf alist (remove dupe alist) +dupe (cons (disambiguate (car dupe)) (cdr dupe))) + (push dupe alist (metadata (list 'metadata (cons 'group-function #'group))) (dynamic-fn (lambda (str pred flag) (pcase flag
[nongnu] elpa/git-commit 421105ef4f: magit-section-goto-successor(hunk): Make fourth argument optional
branch: elpa/git-commit commit 421105ef4f21a84d0ba222681590bfbe22203ff9 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit-section-goto-successor(hunk): Make fourth argument optional Even for hunks the ARG argument may be missing, see `magit-section-get-relative-position(hunk)'. --- lisp/magit-diff.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index f405022354..444373660d 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -2878,7 +2878,7 @@ It the SECTION has a different type, then do nothing." (t t (cl-defmethod magit-section-goto-successor ((section magit-hunk-section) -line char arg) +line char &optional arg) (or (magit-section-goto-successor--same section line char) (and-let* ((parent (magit-get-section (magit-section-ident
[nongnu] elpa/magit updated (21e671ed76 -> 421105ef4f)
elpasync pushed a change to branch elpa/magit. from 21e671ed76 ci: Test on Emacs 28.1 adds 421105ef4f magit-section-goto-successor(hunk): Make fourth argument optional No new revisions were added by this update. Summary of changes: lisp/magit-diff.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[nongnu] elpa/magit-section updated (21e671ed76 -> 421105ef4f)
elpasync pushed a change to branch elpa/magit-section. from 21e671ed76 ci: Test on Emacs 28.1 adds 421105ef4f magit-section-goto-successor(hunk): Make fourth argument optional No new revisions were added by this update. Summary of changes: lisp/magit-diff.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[elpa] main 9f18ee1fc1: * elpa-packages (tmr): Ignore Makefile
branch: main commit 9f18ee1fc11866c0e0c525d22aaf2b1abd1f7f4f Author: Protesilaos Stavrou Commit: Protesilaos Stavrou * elpa-packages (tmr): Ignore Makefile --- elpa-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elpa-packages b/elpa-packages index 0a72606e4c..b154a08d95 100644 --- a/elpa-packages +++ b/elpa-packages @@ -614,7 +614,7 @@ ("tmr" :url "https://git.sr.ht/~protesilaos/tmr"; :auto-sync t - :ignored-files ("COPYING" "doclicense.texi")) + :ignored-files ("COPYING" "doclicense.texi" "Makefile")) ("tNFA" :url "http://www.dr-qubit.org/git/predictive.git";) ("tomelr" :url "https://github.com/kaushalmodi/tomelr"; :ignored-files ("LICENSE")