[elpa] externals/hyperbole f9325f78f3 2/5: github/gitlab-reference - Allow a - character following any ref-type
branch: externals/hyperbole commit f9325f78f37d539819303359b90290b1cfd98d5f Author: Bob Weiner Commit: Bob Weiner github/gitlab-reference - Allow a - character following any ref-type --- ChangeLog | 7 +++ hib-social.el | 31 --- man/hyperbole.texi | 10 +- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2002a36ac..28bbb04a05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-04-16 Bob Weiner + +* hib-social.el (github-reference): Allow for a - character following +commit, issue or pull keywords; already supported / and = characters. +(gitlab-reference): Allow for a - character following +any ref-type keyword. + * hui-select.el (hui-select-initialize): Disable C++ defun selection regexp until regexp is rewritten to prevent Emacs hangs. See Emacs bug#61436 from 2023 and; gh#rswgnu/hyperbole/issue-518 from 2024. diff --git a/hib-social.el b/hib-social.el index 129790c931..13b32c7a9e 100644 --- a/hib-social.el +++ b/hib-social.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date:20-Jul-16 at 22:41:34 -;; Last-Mod: 13-Apr-24 at 11:17:42 by Bob Weiner +;; Last-Mod: 16-Apr-24 at 22:10:55 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -166,7 +166,7 @@ ;; gl#projects List all available projects ;; ;; gl#milestone=38 Show a specific project milestone -;; gl#snippet/1689487Show a specific project snippet +;; gl#snippet=1689487Show a specific project snippet ;;; Code: ;;; @@ -367,7 +367,7 @@ or /. are listed; one of the words: branch, commit, issue, pull or tag followed - by a '/' or '=' and an item-id; the item is shown; + by by '/', '-', or '=', and an item-id; the item is shown; an issue reference given by a positive integer, e.g. 92 or prefaced with GH-, e.g. GH-92; the issue is displayed; @@ -390,7 +390,7 @@ PROJECT value is provided, it defaults to the value of (url-to-format (assoc-default "github" hibtypes-social-hashtag-alist #'string-match)) (ref-type)) (when url-to-format - (cond ((string-match "\\`\\(branch\\|commit\\|issue\\|pull\\|tag\\)[/=]" reference) + (cond ((string-match "\\`\\(branch\\|commit\\|issue\\|pull\\|tag\\)[-/=]" reference) ;; [branch | commit | issue | pull | tag]/ref-item nil) ((string-match "\\`/?\\(\\([^/#@]+\\)/\\)\\([^/#@]+\\)\\'" reference) @@ -426,20 +426,21 @@ PROJECT value is provided, it defaults to the value of (setq ref-type reference reference "")) ((and (< (length reference) 8) (string-match "\\`\\([gG][hH]-\\)?[0-9]+\\'" reference)) - ;; Issue ref-id reference + ;; Issue 'number' or 'GH-number' ref-id reference (setq ref-type "issues/" reference (substring reference (match-end 1) (match-end 0 - ((string-match "\\`\\(commit\\|issue\\|pull\\)[/=]" reference) + ((string-match "\\`\\(commit\\|issue\\|pull\\)[-/=]" reference) ;; Specific reference preceded by keyword branch, commit, - ;; issue, or pull + ;; issue, or pull and followed by -, /, = or #. (setq ref-type (substring reference 0 (match-end 1)) reference (substring reference (match-end 0)) - ref-type (concat ref-type (if (string-equal ref-type "issue") "s/" "/" ((string-match "\\`[0-9a-f]+\\'" reference) + ref-type (concat ref-type (if (string-equal ref-type "issue") "s/" "/" + ((string-match "\\`[0-9a-f]+\\'" reference) ;; Commit reference (setq ref-type "commit/")) (t ;; Specific branch or commit tag reference - (if (string-match "\\`\\(branch\\|tag\\)/" reference) + (if (string-match "\\`\\(branch\\|tag\\)[-/=]" reference) ;; Reference is a specific branch or tag. ;; If preceded by optional keyword, remove that from the reference. (setq ref-type "blob/" @@ -482,8 +483,8 @@ or / (where a group is a collection of projects). listed; one of the words: branch, commit(s), issue(s), milestone(s), - pull(s), snippet(s) or tag(s) followed by a '/' or '=' and an - item-id; the item
[elpa] externals/hyperbole d3a70b9dfe 3/5: hyrolo.py - For Org files, include '#+PROPERTY:' lines in file hdr
branch: externals/hyperbole commit d3a70b9dfe10ca6fd75cf015b2e405233bed2167 Author: Bob Weiner Commit: Bob Weiner hyrolo.py - For Org files, include '#+PROPERTY:' lines in file hdr --- ChangeLog | 3 +++ hyrolo.py | 35 --- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28bbb04a05..d4e9989bae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2024-04-16 Bob Weiner +* hyrolo.py: For Org files, create hyrolo match file header from all +initial buffer-level '#+PROPERTY:' lines. + * hib-social.el (github-reference): Allow for a - character following commit, issue or pull keywords; already supported / and = characters. (gitlab-reference): Allow for a - character following diff --git a/hyrolo.py b/hyrolo.py index 661c8df594..09c80fc8b2 100644 --- a/hyrolo.py +++ b/hyrolo.py @@ -8,7 +8,7 @@ # Author: Bob Weiner # # Orig-Date: 1-Apr-24 at 01:45:27 -# Last-Mod: 15-Apr-24 at 00:04:58 by Bob Weiner +# Last-Mod: 16-Apr-24 at 23:12:28 by Bob Weiner # # SPDX-License-Identifier: GPL-3.0-or-later # @@ -36,11 +36,11 @@ import re # String to match at bol for file header start and end file_header_delimiter = '===' -# Header to insert before a file's first entry match when file has no header. -# Used with one argument, the file name. +# Header to insert before a file's first entry match when file has no header +# Used with one argument, the file name file_header_format = \ "===\n" \ -"@loc> \"%s\"\n" \ +"%s" \ "===\n" # The ANSI escape sequence for the red color @@ -55,6 +55,7 @@ def find_matching_entries(match_string, file_paths): # Remove any null items from file_paths and expand them file_paths = [os.path.abspath(os.path.expanduser(os.path.expandvars(p))) for p in file_paths if p] +org_buffer_property_regex ='#\\+[^: \t\n]+:' for file_path in file_paths: # Initialize variables @@ -62,18 +63,27 @@ def find_matching_entries(match_string, file_paths): file_header_buffer = '' inside_entry = False inside_file_header = False +inside_org_file_header = False first_line = True first_entry = True headline_match = False +org_file = False # Open the file with open(file_path, 'r') as file: +org_file = file_path.endswith('.org') for line in file: if first_line: first_line = False if line.startswith(file_header_delimiter): inside_file_header = True file_header_buffer += line +org_file = False # Prevent double file header wrapping +continue +elif org_file and line.startswith('#'): +inside_org_file_header = True +if re.match(org_buffer_property_regex, line): +file_header_buffer += line continue if inside_file_header: @@ -81,20 +91,31 @@ def find_matching_entries(match_string, file_paths): if line.startswith(file_header_delimiter): inside_file_header = False continue +elif inside_org_file_header: +if re.match(org_buffer_property_regex, line): +file_header_buffer += line +elif line.startswith('#'): +pass +else: +inside_org_file_header = False +continue headline_match = re.match(r'[\*\#]+[ \t]', line, re.IGNORECASE) -# If inside a entry and the line starts with an asterisk, check +# If inside an entry and the line starts with an asterisk, check # if the buffer contains the match string. if inside_entry and headline_match: if re.search(quoted_match_string, buffer, re.IGNORECASE): if first_entry: first_entry = False if file_header_buffer: -print(file_header_buffer, end='') +if org_file: +print(file_header_format % file_header_buffer, end='') +else: +print(file_header_buffer, end='') file_header_buffer = '' print("@loc> \"%s\"\n" % file_path) else: -print(file_header_format % fi
[elpa] externals/hyperbole updated (fba4d6b6d4 -> 91de35dac5)
elpasync pushed a change to branch externals/hyperbole. from fba4d6b6d4 Merge pull request #517 from rswgnu/rsw new 34008d80d0 hui-select-initialize - Disable C++ defun-prompt-regexp definition new f9325f78f3 github/gitlab-reference - Allow a - character following any ref-type new d3a70b9dfe hyrolo.py - For Org files, include '#+PROPERTY:' lines in file hdr new 737ee4f9f1 Merge branch 'master' into rsw new 91de35dac5 Merge pull request #519 from rswgnu/rsw Summary of changes: ChangeLog | 14 ++ hib-social.el | 31 --- hui-select.el | 12 hyrolo.py | 35 --- man/hyperbole.texi | 10 +- 5 files changed, 71 insertions(+), 31 deletions(-)
[elpa] externals/hyperbole 91de35dac5 5/5: Merge pull request #519 from rswgnu/rsw
branch: externals/hyperbole commit 91de35dac59fcbedf9d39bbbd7145fb7f6514b05 Merge: fba4d6b6d4 737ee4f9f1 Author: Robert Weiner Commit: GitHub Merge pull request #519 from rswgnu/rsw hyrolo.py - For Org files, include '#+PROPERTY:' lines in file hdr --- ChangeLog | 14 ++ hib-social.el | 31 --- hui-select.el | 12 hyrolo.py | 35 --- man/hyperbole.texi | 10 +- 5 files changed, 71 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78e07d7d54..d4e9989bae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2024-04-16 Bob Weiner + +* hyrolo.py: For Org files, create hyrolo match file header from all +initial buffer-level '#+PROPERTY:' lines. + +* hib-social.el (github-reference): Allow for a - character following +commit, issue or pull keywords; already supported / and = characters. +(gitlab-reference): Allow for a - character following +any ref-type keyword. + +* hui-select.el (hui-select-initialize): Disable C++ defun selection regexp until +regexp is rewritten to prevent Emacs hangs. See Emacs bug#61436 from 2023 +and; gh#rswgnu/hyperbole/issue-518 from 2024. + 2024-04-14 Mats Lidell * test/hbut-tests.el (hypb--gbut-act-with-web-link): Test for gbut:act diff --git a/hib-social.el b/hib-social.el index 129790c931..13b32c7a9e 100644 --- a/hib-social.el +++ b/hib-social.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date:20-Jul-16 at 22:41:34 -;; Last-Mod: 13-Apr-24 at 11:17:42 by Bob Weiner +;; Last-Mod: 16-Apr-24 at 22:10:55 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -166,7 +166,7 @@ ;; gl#projects List all available projects ;; ;; gl#milestone=38 Show a specific project milestone -;; gl#snippet/1689487Show a specific project snippet +;; gl#snippet=1689487Show a specific project snippet ;;; Code: ;;; @@ -367,7 +367,7 @@ or /. are listed; one of the words: branch, commit, issue, pull or tag followed - by a '/' or '=' and an item-id; the item is shown; + by by '/', '-', or '=', and an item-id; the item is shown; an issue reference given by a positive integer, e.g. 92 or prefaced with GH-, e.g. GH-92; the issue is displayed; @@ -390,7 +390,7 @@ PROJECT value is provided, it defaults to the value of (url-to-format (assoc-default "github" hibtypes-social-hashtag-alist #'string-match)) (ref-type)) (when url-to-format - (cond ((string-match "\\`\\(branch\\|commit\\|issue\\|pull\\|tag\\)[/=]" reference) + (cond ((string-match "\\`\\(branch\\|commit\\|issue\\|pull\\|tag\\)[-/=]" reference) ;; [branch | commit | issue | pull | tag]/ref-item nil) ((string-match "\\`/?\\(\\([^/#@]+\\)/\\)\\([^/#@]+\\)\\'" reference) @@ -426,20 +426,21 @@ PROJECT value is provided, it defaults to the value of (setq ref-type reference reference "")) ((and (< (length reference) 8) (string-match "\\`\\([gG][hH]-\\)?[0-9]+\\'" reference)) - ;; Issue ref-id reference + ;; Issue 'number' or 'GH-number' ref-id reference (setq ref-type "issues/" reference (substring reference (match-end 1) (match-end 0 - ((string-match "\\`\\(commit\\|issue\\|pull\\)[/=]" reference) + ((string-match "\\`\\(commit\\|issue\\|pull\\)[-/=]" reference) ;; Specific reference preceded by keyword branch, commit, - ;; issue, or pull + ;; issue, or pull and followed by -, /, = or #. (setq ref-type (substring reference 0 (match-end 1)) reference (substring reference (match-end 0)) - ref-type (concat ref-type (if (string-equal ref-type "issue") "s/" "/" ((string-match "\\`[0-9a-f]+\\'" reference) + ref-type (concat ref-type (if (string-equal ref-type "issue") "s/" "/" + ((string-match "\\`[0-9a-f]+\\'" reference) ;; Commit reference (setq ref-type "commit/")) (t ;; Specific branch or commit tag reference - (if (string-match "\\`\\(branch\\|tag\\)/" reference) + (if (string-match "\\`\\(branch\\|tag\\)[-/=]" reference) ;; Reference is a spec
[elpa] externals/hyperbole 737ee4f9f1 4/5: Merge branch 'master' into rsw
branch: externals/hyperbole commit 737ee4f9f1ebf212d9466ec2625e080b47b00ace Merge: d3a70b9dfe fba4d6b6d4 Author: Robert Weiner Commit: GitHub Merge branch 'master' into rsw
[elpa] externals/hyperbole 34008d80d0 1/5: hui-select-initialize - Disable C++ defun-prompt-regexp definition
branch: externals/hyperbole commit 34008d80d057bea491fcc89cb8c83b2c2123bbd3 Author: Bob Weiner Commit: Bob Weiner hui-select-initialize - Disable C++ defun-prompt-regexp definition Until it is re-written to prevent an Emacs hang. --- ChangeLog | 4 hui-select.el | 12 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78e07d7d54..c2002a36ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +* hui-select.el (hui-select-initialize): Disable C++ defun selection regexp until +regexp is rewritten to prevent Emacs hangs. See Emacs bug#61436 from 2023 +and; gh#rswgnu/hyperbole/issue-518 from 2024. + 2024-04-14 Mats Lidell * test/hbut-tests.el (hypb--gbut-act-with-web-link): Test for gbut:act diff --git a/hui-select.el b/hui-select.el index 4bd62edaa1..8c4cc4bf57 100644 --- a/hui-select.el +++ b/hui-select.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date:19-Oct-96 at 02:25:27 -;; Last-Mod: 19-Jan-24 at 18:17:28 by Mats Lidell +;; Last-Mod: 16-Apr-24 at 22:21:45 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -401,9 +401,13 @@ Also, add language-specific syntax setups to aid in thing selection." ;; programmers don't put their function braces in the first column. (var:add-and-run-hook 'java-mode-hook (lambda () (setq defun-prompt-regexp hui-java-defun-prompt-regexp))) - (var:add-and-run-hook 'c++-mode-hook (lambda () -(setq defun-prompt-regexp - "^[ \t]*\\(template\\s-*<[^>;.{}]+>\\s-*\\)?\\(\\(\\(auto\\|const\\|explicit\\|extern\\s-+\"[^\"]+\"\\|extern\\|friend\\|inline\\|mutable\\|overload\\|register\\|static\\|typedef\\|virtual\\)\\s-+\\)*\\(\\([[a-zA-Z0-9 ,]+>\\s-*[*&]*\\|[[a-zA-Z0-9]*\\(::[[a-zA-Z0-9]+\\)?\\s-*[*&]*\\)[*& \t\n\r]+\\)\\)?\\(\\(::\\|[[;{}]+>\\s-*[*&]*::\\|[[a-zA-Z0-9]*\\s-* [...] + + ;; !! TODO: defun selection regexp is disabled in C++ until regexp is + ;; rewritten as it can hang Emacs; reported in Emacs bug#61436 in + ;; 2023 and gh#rswgnu/hyperbole/issue-518 in 2024. + ;; (var:add-and-run-hook 'c++-mode-hook (lambda () + ;;(setq defun-prompt-regexp + ;; "^[ \t]*\\(template\\s-*<[^>;.{}]+>\\s-*\\)?\\(\\(\\(auto\\|const\\|explicit\\|extern\\s-+\"[^\"]+\"\\|extern\\|friend\\|inline\\|mutable\\|overload\\|register\\|static\\|typedef\\|virtual\\)\\s-+\\)*\\(\\([[a-zA-Z0-9 ,]+>\\s-*[*&]*\\|[[a-zA-Z0-9]*\\(::[[a-zA-Z0-9]+\\)?\\s-*[*&]*\\)[*& \t\n\r]+\\)\\)?\\(\\(::\\|[[;{}]+>\\s-*[*&]*::\\|[[a-zA-Z0-9]*\ [...] ;; ;; Match to Lisp symbols with : in their names, often included in help buffers. (var:add-and-run-hook 'help-mode-hook (lambda () (modify-syntax-entry ?: "_" help-mode-syntax-table)))
[nongnu] elpa/cider updated (bd72fe197b -> 75412f96b4)
elpasync pushed a change to branch elpa/cider. from bd72fe197b Update additional_packages.adoc new 7439167ca6 [Docs] Extend the "Wording with docs" section new d6d16e3da3 [Docs] Move "code reloading" docs to their own section new 955afdcbdb [Docs] Add a note new 75412f96b4 [Docs] Add missing reload keybindings Summary of changes: doc/modules/ROOT/nav.adoc | 1 + doc/modules/ROOT/pages/usage/code_reloading.adoc | 129 + doc/modules/ROOT/pages/usage/misc_features.adoc| 97 .../pages/usage/working_with_documentation.adoc| 33 +- 4 files changed, 158 insertions(+), 102 deletions(-) create mode 100644 doc/modules/ROOT/pages/usage/code_reloading.adoc
[nongnu] elpa/cider 955afdcbdb 3/4: [Docs] Add a note
branch: elpa/cider commit 955afdcbdbd03a64361b87d3dd5a0b2fa4f8779f Author: Bozhidar Batsov Commit: Bozhidar Batsov [Docs] Add a note --- doc/modules/ROOT/pages/usage/code_reloading.adoc | 4 1 file changed, 4 insertions(+) diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc index 4be5f5b7b0..71d554d369 100644 --- a/doc/modules/ROOT/pages/usage/code_reloading.adoc +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -8,6 +8,10 @@ and there are no temporary definitions hanging around. == "Reloaded" Workflow +NOTE: The workflow described below was made popular by +this https://www.cognitect.com/blog/2013/06/04/clojure-workflow-reloaded[blog article], +which served as the primary inspiration for CIDER's take on it. + Typing kbd:[C-c M-n r] or kbd:[C-c M-n M-r] will invoke `cider-ns-refresh` and reload all modified Clojure files on the classpath.
[nongnu] elpa/cider 75412f96b4 4/4: [Docs] Add missing reload keybindings
branch: elpa/cider commit 75412f96b41884c9afbbb956db12ee30a8584a38 Author: Bozhidar Batsov Commit: Bozhidar Batsov [Docs] Add missing reload keybindings --- doc/modules/ROOT/pages/usage/code_reloading.adoc | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc index 71d554d369..c40d00efc1 100644 --- a/doc/modules/ROOT/pages/usage/code_reloading.adoc +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -102,8 +102,8 @@ way `tools.namespace` does. == Basic Code Reloading Sometimes, `cider-ns-refresh` may not work for you. If you're looking -for a bit more forceful reloading the `cider-ns-reload` -and `cider-ns-reload-all` commands can be used instead. These commands +for a bit more forceful reloading the `cider-ns-reload` (kbd:[C-c M-n l]) +and `cider-ns-reload-all` (kbd:[C-c M-n M-l]) commands can be used instead. These commands invoke Clojure's `+(require ... :reload)+` and `+(require ... :reload-all)+` commands at the REPL. @@ -118,3 +118,12 @@ TIP: Theses commands don't depend on `cider-nrepl`, so they are always available | kbd:[C-c M-n r] + kbd:[C-c M-n M-r] | Reload all modified Clojure files on the classpath. Adding a prefix argument, kbd:[C-u C-c M-n r], will reload all the namespaces on the classpath unconditionally, regardless of their modification status. Adding a double prefix argument, kbd:[C-u C-u M-n r], will first clear the state of the namespace tracker before reloading. + +| `cider-ns-reload` +| kbd:[C-c M-n l] +| Reload using `(require :reload)` + +| `cider-ns-reload-all` +| kbd:[C-c M-n M-l] +| Reload using `(require :reload-all)` +|===
[nongnu] elpa/cider 7439167ca6 1/4: [Docs] Extend the "Wording with docs" section
branch: elpa/cider commit 7439167ca666e19819929fafc0377815a783b7fe Author: Bozhidar Batsov Commit: Bozhidar Batsov [Docs] Extend the "Wording with docs" section --- .../pages/usage/working_with_documentation.adoc| 33 ++ 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/doc/modules/ROOT/pages/usage/working_with_documentation.adoc b/doc/modules/ROOT/pages/usage/working_with_documentation.adoc index 3cace4ae40..fe72f33f5f 100644 --- a/doc/modules/ROOT/pages/usage/working_with_documentation.adoc +++ b/doc/modules/ROOT/pages/usage/working_with_documentation.adoc @@ -11,16 +11,39 @@ press kbd:[C-c C-d C-d] then. This open a documentation buffer containing all the relevant information about the thing referenced by the symbol (special form, var, Java method, etc). +TIP: You can also use the keybinding kbd:[C-c C-d d]. Most CIDER keymaps +provide two versions of the same keybinding (with or without the final `Control`), +as some people prefer to keep holding `Control` and some don't. + +Normally the command operates on the symbol at point. If invoked with a prefix argument, or no symbol is found at point, it will prompt for a symbol. + +NOTE: If using `enrich-classpath`, Java doc comments are available and rendered in the same way that Clojure docstrings are. +They're often much more handy than opening Javadoc in a browser. Starting from CIDER 1.8.0, +the HTML-like language that they use is nicely rendered into syntax-colored strings, well-aligned tables, etc + == JavaDoc CIDER provides a quick access to the online Javadoc documentation -via the command `cider-javadoc`. +via the command `cider-javadoc` (kbd:[C-c C-d j] or kbd:[C-c C-d C-j]), using your default browser. -This requires `enrich-classpath` to be enabled. +Normally the command operates on the symbol at point. If invoked with a prefix argument, or no symbol is found at point, it will prompt for a symbol. -NOTE: if using `enrich-classpath`, Java doc comments are available and rendered in the same way that Clojure docstrings are. -They're often much more handy than opening Javadoc in a browser. Starting from CIDER 1.8.0, -the HTML-like language that they use is nicely rendered into syntax-colored strings, well-aligned tables, etc +If you don't want CIDER to use an external browser to display the JavaDoc you can use the built-in +EWW browser instead like this: + +[source,lisp] + +(setq browse-url-browser-function 'eww-browse-url) + + +== Searching in Docstrings + +CIDER provides a handy alternative of `clojure.repl/find-doc` - `cider-apropos-documentation` (kbd:[C-c C-d f] or +kbd:[C-c C-d C-f]). This allows you to search in the docstrings of all loaded vars with the results presented +in Emacs's `apropos` interface. + +Alternatively you can use `cider-apropos-documentation-select` (kbd:[C-c C-d e] or kbd:[C-c C-d C-e]), which presents you the matching +results as a list in the minibuffer, so you can quickly select what you need (especially if you're using some package like `ido` or `vertico`). == ClojureDocs
[nongnu] elpa/cider d6d16e3da3 2/4: [Docs] Move "code reloading" docs to their own section
branch: elpa/cider commit d6d16e3da34f74f12285b6216c3f9a64a0501d11 Author: Bozhidar Batsov Commit: Bozhidar Batsov [Docs] Move "code reloading" docs to their own section --- doc/modules/ROOT/nav.adoc| 1 + doc/modules/ROOT/pages/usage/code_reloading.adoc | 116 +++ doc/modules/ROOT/pages/usage/misc_features.adoc | 97 --- 3 files changed, 117 insertions(+), 97 deletions(-) diff --git a/doc/modules/ROOT/nav.adoc b/doc/modules/ROOT/nav.adoc index 121efcc789..06035fd885 100644 --- a/doc/modules/ROOT/nav.adoc +++ b/doc/modules/ROOT/nav.adoc @@ -20,6 +20,7 @@ ** xref:usage/cider_mode.adoc[Using cider-mode] ** xref:usage/code_evaluation.adoc[Code Evaluation] ** xref:usage/code_completion.adoc[Code Completion] +** xref:usage/code_reloading.adoc[Code Reloading] ** xref:usage/pretty_printing.adoc[Pretty Printing] ** xref:usage/dealing_with_errors.adoc[Dealing with Errors] ** xref:usage/working_with_documentation.adoc[Working with Documentation] diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc new file mode 100644 index 00..4be5f5b7b0 --- /dev/null +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -0,0 +1,116 @@ += Code Reloading + +While Clojure's and CIDER's interactive programming style means you'll +restart your application far less often than with other languages and +development environments, sometimes you'll want to clean everything up +and reload one or more namespaces to ensure that they are up to date +and there are no temporary definitions hanging around. + +== "Reloaded" Workflow + +Typing kbd:[C-c M-n r] or kbd:[C-c M-n M-r] will invoke +`cider-ns-refresh` and reload all modified Clojure files on the +classpath. + +Adding a prefix argument, kbd:[C-u C-c M-n r], will reload all +the namespaces on the classpath unconditionally, regardless of their +modification status. + +Adding a double prefix argument, kbd:[C-u C-u M-n r], will first +clear the state of the namespace tracker before reloading. This is +useful for recovering from some classes of error that normal reloads +would otherwise not recover from. A good example is circular +dependencies. The trade-off is that stale code from any deleted files +may not be completely unloaded. + +`cider-ns-refresh` wraps +https://github.com/clojure/tools.namespace[clojure.tools.namespace], and as +such the same +https://github.com/clojure/tools.namespace#reloading-code-motivation[benefits] +and +https://github.com/clojure/tools.namespace#reloading-code-preparing-your-application[caveats] +regarding writing reloadable code also apply. + +The above three operations are analogous to +http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh[`clojure.tools.namespace.repl/refresh`], +http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh-all[`clojure.tools.namespace.repl/refresh-all`] +and +http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/clear[`clojure.tools.namespace.repl/clear`] +(followed by a normal refresh), respectively. + +=== Configuration + +You can define Clojure functions to be called before reloading, and after a +successful reload, when using `cider-ns-refresh`: + +[source,lisp] + +(setq cider-ns-refresh-before-fn "user/stop-system!" + cider-ns-refresh-after-fn "user/start-system!") + + +These must be set to the namespace-qualified names of vars bound to +functions of no arguments. The functions must be synchronous +(blocking), and are expected to be side-effecting - they will always +be executed serially, without retries. + +By default, messages regarding the status of the in-progress reload +will be displayed in the echo area after you call +`cider-ns-refresh`. The same information will also be recorded in the +`+*cider-ns-refresh-log*+` buffer, along with anything printed to +`+*out*+` or `+*err*+` by `cider-ns-refresh-before-fn` and +`cider-ns-refresh-start-fn`. + +You can make the `+*cider-ns-refresh-log*+` buffer display automatically +after you call `cider-ns-refresh` by setting the +`cider-ns-refresh-show-log-buffer` variable to a non-nil value. This +will also prevent any related messages from also being displayed in +the echo area. + +[source,lisp] + +(setq cider-ns-refresh-show-log-buffer t) + + +By default, CIDER will prompt for whether to save all modified `clojure-mode` +buffers visiting files on the classpath. You can customize this behavior with +`cider-ns-save-files-on-refresh` and `cider-ns-save-files-on-refresh-modes`. + +=== Using clj-reload + +You can also use https://github.com/tonsky/clj-reload[clj-reload] instead. +It provides support for +https://github.com/tonsky/clj-reload/blob/469da68/README.md#usage-keeping-vars-between-reloads[keeping vars between reloads] +among some +https://github.com/tonsky/clj-reload/blob/469da68/README.md#comparison-toolsnamespace[other differences] +from `to
[nongnu] elpa/evil-matchit 03fc03d659 1/2: add more org blocks
branch: elpa/evil-matchit commit 03fc03d659b858592accd0d7676ad84632dc24a5 Author: Xuan Wang Commit: Xuan Wang add more org blocks verse: preserve line breaks center: center text comment: don't export export: this replace the old "begin_html" with "begin_export html", supporting more formats justifyleft/right: only works for ascii export --- evil-matchit-org.el | 6 ++ 1 file changed, 6 insertions(+) diff --git a/evil-matchit-org.el b/evil-matchit-org.el index 16d904327c..2587e7f388 100644 --- a/evil-matchit-org.el +++ b/evil-matchit-org.el @@ -50,6 +50,12 @@ Sub-match is the match defined between '\\(' and '\\)' in regular expression.") (("begin_html") () ("end_html") "MONOGAMY") (("begin_quote") () ("end_quote") "MONOGAMY") (("begin_export") () ("end_export") "MONOGAMY") +(("begin_verse") () ("end_verse") "MONOGAMY") +(("begin_center") () ("end_center") "MONOGAMY") +(("begin_comment") () ("end_comment") "MONOGAMY") +(("begin_export") () ("end_export") "MONOGAMY") +(("begin_justifyleft") () ("end_justifyleft") "MONOGAMY") +(("begin_justifyright") () ("end_justifyright") "MONOGAMY") (("results") () ("end") "MONOGAMY")) "Match tags in org file.")
[nongnu] elpa/evil-matchit 143e03d9c6 2/2: Merge pull request #146 from xuan-w/patch-org
branch: elpa/evil-matchit commit 143e03d9c6ec2f7fffafa0bf0914170cbab3b33f Merge: 1c4fefa9bb 03fc03d659 Author: Chen Bin Commit: GitHub Merge pull request #146 from xuan-w/patch-org add more org blocks --- evil-matchit-org.el | 6 ++ 1 file changed, 6 insertions(+) diff --git a/evil-matchit-org.el b/evil-matchit-org.el index 16d904327c..2587e7f388 100644 --- a/evil-matchit-org.el +++ b/evil-matchit-org.el @@ -50,6 +50,12 @@ Sub-match is the match defined between '\\(' and '\\)' in regular expression.") (("begin_html") () ("end_html") "MONOGAMY") (("begin_quote") () ("end_quote") "MONOGAMY") (("begin_export") () ("end_export") "MONOGAMY") +(("begin_verse") () ("end_verse") "MONOGAMY") +(("begin_center") () ("end_center") "MONOGAMY") +(("begin_comment") () ("end_comment") "MONOGAMY") +(("begin_export") () ("end_export") "MONOGAMY") +(("begin_justifyleft") () ("end_justifyleft") "MONOGAMY") +(("begin_justifyright") () ("end_justifyright") "MONOGAMY") (("results") () ("end") "MONOGAMY")) "Match tags in org file.")
[nongnu] elpa/cider updated (75412f96b4 -> af37662b68)
elpasync pushed a change to branch elpa/cider. from 75412f96b4 [Docs] Add missing reload keybindings new 900f083fe8 Fix a changelog entry new af37662b68 [Docs] Tweak the code reloading docs a bit Summary of changes: CHANGELOG.md | 2 +- doc/modules/ROOT/pages/usage/code_reloading.adoc | 7 ++- 2 files changed, 7 insertions(+), 2 deletions(-)
[nongnu] elpa/cider 900f083fe8 1/2: Fix a changelog entry
branch: elpa/cider commit 900f083fe8ad5009497859c0de5c0d64ab8854e1 Author: Bozhidar Batsov Commit: Bozhidar Batsov Fix a changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 470e425d6e..db3c4903b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - The `clojure-mode` dependency is still required for CIDER to function. - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with `clojure-ts-mode` (yet). - [#3624](https://github.com/clojure-emacs/cider/pull/3624): Support new `cider.clj-reload/reload` cider-nrepl middleware. - - adds `cider-ns-refresh-tool` defcustom, defaulting to `'tools.namespace`. + - adds `cider-ns-code-reload-tool` defcustom, defaulting to `'tools.namespace`. - you can change it to `'clj-reload` to use [clj-reload](https://github.com/tonsky/clj-reload) instead of [tools.namespace](https://github.com/clojure/tools.namespace). ### Changes
[nongnu] elpa/cider af37662b68 2/2: [Docs] Tweak the code reloading docs a bit
branch: elpa/cider commit af37662b686a5849ae70b1c273154c15a98e162c Author: Bozhidar Batsov Commit: Bozhidar Batsov [Docs] Tweak the code reloading docs a bit --- doc/modules/ROOT/pages/usage/code_reloading.adoc | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc index c40d00efc1..6ba6a7648a 100644 --- a/doc/modules/ROOT/pages/usage/code_reloading.adoc +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -82,7 +82,9 @@ buffers visiting files on the classpath. You can customize this behavior with === Using clj-reload -You can also use https://github.com/tonsky/clj-reload[clj-reload] instead. +NOTE: Support for `clj-reload` was introduced in CIDER 1.14. + +You can also use `cider-ns-refresh` with https://github.com/tonsky/clj-reload[clj-reload] instead of `clojure.tools.namespace`. It provides support for https://github.com/tonsky/clj-reload/blob/469da68/README.md#usage-keeping-vars-between-reloads[keeping vars between reloads] among some @@ -99,6 +101,9 @@ https://github.com/tonsky/clj-reload/blob/469da68/README.md##usage[the usage doc . If you don't set them manually, it will default to the current project's resource dirs in the same way `tools.namespace` does. +NOTE: Down the road we may rename `cider-ns-refresh` to something more tool-agnostic (e.g. `cider-ns-smart-reload`) to reflect +that it supports different code reload tools now. + == Basic Code Reloading Sometimes, `cider-ns-refresh` may not work for you. If you're looking
[elpa] externals/dape fb6908dbd8: Update README.org (#98)
branch: externals/dape commit fb6908dbd857628891f6d5296643865e21ca4c01 Author: Jorge Gomez Commit: GitHub Update README.org (#98) Copyright-paperwork-exempt: yes --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index 6400d87008..fd3e9b86c0 100644 --- a/README.org +++ b/README.org @@ -87,7 +87,7 @@ Dape takes a slightly different approach to configuration. + =Dape= does not support ~launch.json~ files, if per project configuration is needed use ~dir-locals~ and ~dape-command~. + =Dape= enhances ergonomics within the minibuffer by allowing users to modify or add PLIST entries to an existing configuration using options. For example ~dape-config :cwd default-directory :program "/home/user/b.out" compile "gcc -g -o b.out main.c"~. + No magic, no special variables like =${workspaceFolder}=. Instead, functions and variables are resolved before starting a new session. -+ Tries to be envision to how debug adapter configuration would be implemented in Emacs if vscode never existed. ++ Tries to envision how debug adapter configurations would be implemented in Emacs if vscode never existed. * Supported debug adapters In theory all debug adapters should be compatible with =Dape=.
[elpa] externals/drepl ac8e9d1cdc: IPython: send candidate prefix in completion response
branch: externals/drepl commit ac8e9d1cdc34c2d3c3591ac14a82ef58d352181c Author: Augusto Stoffel Commit: Augusto Stoffel IPython: send candidate prefix in completion response --- drepl-ipython.py | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drepl-ipython.py b/drepl-ipython.py index 5beb67b9e2..7793fa756c 100644 --- a/drepl-ipython.py +++ b/drepl-ipython.py @@ -3,10 +3,11 @@ import base64 import json import sys +from itertools import chain from pathlib import Path from tempfile import mkstemp -from IPython.core.completer import provisionalcompleter +from IPython.core.completer import provisionalcompleter, rectify_completions from IPython.core.displayhook import DisplayHook from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC from IPython.utils.tokenutil import token_at_cursor @@ -157,11 +158,15 @@ class Drepl(InteractiveShell): def drepl_complete(self, id, code, pos): with provisionalcompleter(): -r = [ -{"text": c.text, "annot": c.signature} -for c in self.Completer.completions(code, pos) -] -sendmsg(id=id, candidates=r or None) +completions = rectify_completions(code, self.Completer.completions(code, pos)) +first = next(completions, None) +if first is None: +sendmsg(id=id) +return +prefix = code[first.start: pos] +completions = chain([first], completions) +candidates = [{"text": c.text, "annot": c.signature} for c in completions] +sendmsg(id=id, prefix=prefix, candidates=candidates) def drepl_checkinput(self, id, code): status, indent = self.check_complete(code)
[nongnu] elpa/sesman 7bca68dbba: Fix `sesman-current-session` when `sesman-use-friendly-sessions` is nil (#28)
branch: elpa/sesman commit 7bca68dbbab0af26a6a23be1ff5fa97f9a18e022 Author: Felipe Commit: GitHub Fix `sesman-current-session` when `sesman-use-friendly-sessions` is nil (#28) --- sesman.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sesman.el b/sesman.el index 3b24e49a19..f2a2854527 100644 --- a/sesman.el +++ b/sesman.el @@ -625,7 +625,8 @@ types to consider. Defaults to the list returned from `sesman-context-types'." "Get the most relevant current session for the SYSTEM. CXT-TYPES is a list of context types to consider." (or (car (sesman--linked-sessions system 'sort cxt-types)) - (car (sesman--friendly-sessions system 'sort + (when sesman-use-friendly-sessions +(car (sesman--friendly-sessions system 'sort) (defun sesman-ensure-session (system &optional cxt-types) "Get the most relevant linked session for SYSTEM or throw if none exists.
[elpa] externals/js2-mode a02abd3d52 1/2: Add @async to js2-jsdoc-empty-tag-regexp
branch: externals/js2-mode commit a02abd3d523d66671c638c154eadf30196d5474c Author: Damien Cassou Commit: Damien Cassou Add @async to js2-jsdoc-empty-tag-regexp --- js2-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/js2-mode.el b/js2-mode.el index 20fdb98488..ec1b64e156 100644 --- a/js2-mode.el +++ b/js2-mode.el @@ -7017,6 +7017,7 @@ of a simple name. Called before EXPR has a parent node." (regexp-opt '("abstract" "addon" + "async" "author" "class" "const"
[elpa] externals/js2-mode 9b90d31ed9 2/2: Merge pull request #602 from DamienCassou/add-async-jsdoc-tag
branch: externals/js2-mode commit 9b90d31ed968e5c51bd3e279d4003248ea896807 Merge: e92829da3d a02abd3d52 Author: Dmitry Gutov Commit: GitHub Merge pull request #602 from DamienCassou/add-async-jsdoc-tag Add @async to js2-jsdoc-empty-tag-regexp --- js2-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/js2-mode.el b/js2-mode.el index 20fdb98488..ec1b64e156 100644 --- a/js2-mode.el +++ b/js2-mode.el @@ -7017,6 +7017,7 @@ of a simple name. Called before EXPR has a parent node." (regexp-opt '("abstract" "addon" + "async" "author" "class" "const"