branch: externals/hyperbole commit f9325f78f37d539819303359b90290b1cfd98d5f Author: Bob Weiner <r...@gnu.org> Commit: Bob Weiner <r...@gnu.org>
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 <r...@gnu.org> + +* 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/1689487 Show a specific project snippet +;; gl#snippet=1689487 Show a specific project snippet ;;; Code: ;;; ************************************************************************ @@ -367,7 +367,7 @@ or /<project>. 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 /<project-or-group> (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 is shown; + pull(s), snippet(s) or tag(s) followed by a '/', '-' or '=' + and an item-id; the item is shown; an issue reference given by a positive integer, e.g. 92 or prefaced with GL-, e.g. GL-92; the issue is displayed; @@ -592,15 +593,15 @@ PROJECT value is provided, it defaults to the value of ;; Labeled category of issues (setq ref-type "issues?label_name%5B%5D=" reference (substring reference (match-end 0)))) - ((string-match "\\`\\(commit\\|issues\\|milestones\\|pull\\|snippets\\|tags\\)[/=]" reference) + ((string-match "\\`\\(commit\\|issues\\|milestones\\|pull\\|snippets\\|tags\\)[-/=]" reference) ;; Ref-id preceded by a keyword (setq ref-type (concat (substring reference 0 (match-end 1)) "/") reference (substring reference (match-end 0)))) - ((string-match "\\`\\(issue\\|milestone\\|snippet\\|tag\\)[/=]" reference) + ((string-match "\\`\\(issue\\|milestone\\|snippet\\|tag\\)[-/=]" reference) ;; Ref-id preceded by a singular keyword that must be converted to plural (setq ref-type (concat (substring reference 0 (match-end 1)) "s/") reference (substring reference (match-end 0)))) - ((string-match "\\`\\(commit\\|pull\\)s[/=]" reference) + ((string-match "\\`\\(commit\\|pull\\)s[-/=]" reference) ;; Ref-id preceded by a plural keyword that must be converted to singular (setq ref-type (concat (substring reference 0 (match-end 1)) "/") reference (substring reference (1+ (match-end 0))))) @@ -610,7 +611,7 @@ PROJECT value is provided, it defaults to the value of (t ;; Specific branch or commit tag reference (setq ref-type "tree/") - (when (string-match "\\`\\(branch\\|tag\\)[/=]" reference) + (when (string-match "\\`\\(branch\\|tag\\)[-/=]" reference) ;; If preceded by optional keyword, remove that from the reference. (setq reference (substring reference (match-end 0))))))) (if (and (stringp user) (stringp project)) diff --git a/man/hyperbole.texi b/man/hyperbole.texi index fe469a6071..79f7fc2c34 100644 --- a/man/hyperbole.texi +++ b/man/hyperbole.texi @@ -7,7 +7,7 @@ @c Author: Bob Weiner @c @c Orig-Date: 6-Nov-91 at 11:18:03 -@c Last-Mod: 13-Apr-24 at 11:21:43 by Bob Weiner +@c Last-Mod: 16-Apr-24 at 22:13:33 by Bob Weiner @c %**start of header (This is for running Texinfo on a region.) @setfilename hyperbole.info @@ -159,7 +159,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</P> <PRE> Edition 9.0.2pre -Printed April 7, 2024. +Printed April 16, 2024. Published by the Free Software Foundation, Inc. Author: Bob Weiner @@ -201,7 +201,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @example Edition 9.0.2pre -April 7, 2024 +April 16, 2024 Published by the Free Software Foundation, Inc. Author: Bob Weiner @@ -3203,7 +3203,7 @@ REFERENCE is a string of one of the following forms: @table @asis @item @bullet{} one of the words: branches, commits, issues, pulls, or tags the associated items are listed -@item @bullet{} one of the words: branch, commit, issue, pull or tag followed by a '/' and item id +@item @bullet{} one of the words: branch, commit, issue, pull or tag followed by a '/', '-', or '=', and item id the item is shown @item @bullet{} an issue reference given by a positive integer, e.g. @emph{92} or prefaced with @emph{GH-}, like GH-92 the issue is displayed @@ -3242,7 +3242,7 @@ or @table @asis @item @bullet{} one of the words: activity, analytics, boards or kanban, branches, commits, contributors, groups, issues or list, jobs, labels, merge_requests, milestones, pages, pipelines, pipeline_charts, members or people or staff, projects, pulls, schedules, snippets, status or tags the associated items are listed -@item @bullet{} 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 +@item @bullet{} 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 is shown @item @bullet{} an issue reference given by a positive integer, e.g. @emph{92} or prefaced with @emph{GL-}, like GL-92 the issue is displayed