[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 00a0d24: RFC handling fixes and change to use
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 00a0d24: RFC handling fixes and change to use http instead of ftp |
Date: |
Sat, 17 Apr 2021 14:57:07 -0400 (EDT) |
branch: externals/hyperbole
commit 00a0d24e95c11e934a7609712bfe67fa9d62e683
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
RFC handling fixes and change to use http instead of ftp
Also, fix typo in Windows PATH handling.
---
Changes | 21 +++++++++++++++++++++
hactypes.el | 10 +++++-----
hib-debbugs.el | 24 +++++++++++++++++-------
hibtypes.el | 2 +-
hpath.el | 22 ++++++++++------------
hui-mouse.el | 16 ++++++++--------
6 files changed, 62 insertions(+), 33 deletions(-)
diff --git a/Changes b/Changes
index bdb52e6..d967f2a 100644
--- a/Changes
+++ b/Changes
@@ -1,11 +1,32 @@
2021-04-17 Bob Weiner <rsw@gnu.org>
+* hpath.el (hpath:expand): Fix locate-library call to add suffixes and thereby
+ improperly match non-Lisp files with generic names to Lisp library files.
+
+* hui-mouse.el (hkey-alist): Raised priorty of occur modes so don't trigger
+ tag finding when on an occurrence line.
+
+* hibtypes.el (rfc-toc):
+ hactypes.el (rfc-toc): Fix to skip TOC and display only section header lines
+ to jump to sections.
+ hib-debbugs.el (debbugs-version-sufficient-p): Eliminate call out to
+ shell to get debbugs.el version number; this fixes bug where
+ browse-url-emacs sets current-directory to a url and a shell cmd
+ invoked from that buffer can't do a 'cd' and fails.
+ hpath.el (hpath:rfc):
+ hactypes.el (link-to-rfc): Change to using http to retrieve RFCs instead
+ of ftp since this is disabled in many environments. Change hpath:find
+ call to browse-url-emacs so is always displayed in Emacs.
+
* hpath.el (hpath:delimited-possible-path): Prevent match to strings
with embedded double quotes.
(hpath:at-p): Handle ":.::" current dir expressions in
path variables.
(hpath:call): Fix yesterday's handling of anchor only
references like "#Smart Keys" from DEMO file.
+ (hpath:path-variable-regexp): For Windows, replace : should be ;.
+ (hpath:is-p): Prevent from matching to PATH-type strings with at
+ least 4 entries; fixes Action Key on Windows path within PATH variable.
2021-04-16 Bob Weiner <rsw@gnu.org>
diff --git a/hactypes.el b/hactypes.el
index 62f59c0..7fa53c3 100644
--- a/hactypes.el
+++ b/hactypes.el
@@ -593,8 +593,8 @@ Return t if found, signal an error if not."
"Retrieve and display an Internet rfc given by RFC-NUM.
RFC-NUM may be a string or an integer."
(interactive "nRFC number to retrieve: ")
- (if (or (stringp rfc-num) (integerp rfc-num))
- (hpath:find (hpath:rfc rfc-num))))
+ (when (or (stringp rfc-num) (integerp rfc-num))
+ (browse-url-emacs (hpath:rfc rfc-num))))
(defact link-to-string-match (string n source &optional buffer-p)
"Find STRING's Nth occurrence in SOURCE and display location at window top.
@@ -643,9 +643,9 @@ Uses `hpath:display-where' setting to control where the man
page is displayed."
(let ((Man-notify-method 'meek))
(hpath:display-buffer (man topic))))
-(defact rfc-toc (&optional buf-name opoint)
+(defact rfc-toc (&optional buf-name opoint sections-start)
"Compute and display summary of an Internet rfc in BUF-NAME.
-Assumes point has already been moved to start of region to summarize.
+Assume point has already been moved to start of region to summarize.
Optional OPOINT is point to return to in BUF-NAME after displaying summary."
(interactive)
(if buf-name
@@ -661,7 +661,7 @@ Optional OPOINT is point to return to in BUF-NAME after
displaying summary."
(temp-buffer-show-function 'switch-to-buffer)
occur-buffer)
(hpath:display-buffer (current-buffer))
- (occur sect-regexp)
+ (occur sect-regexp nil (list (cons sections-start (point-max))))
(setq occur-buffer (set-buffer "*Occur*"))
(rename-buffer (format "*%s toc*" buf-name))
(re-search-forward "^[ ]*[0-9]+:" nil t)
diff --git a/hib-debbugs.el b/hib-debbugs.el
index 81d440b..d63a6d5 100644
--- a/hib-debbugs.el
+++ b/hib-debbugs.el
@@ -104,7 +104,7 @@ Note that `issue' or `debbugs' may be used as well in place
of `bug'."
(t (hact 'debbugs-gnu-query (string-to-number (match-string
2))))))))
(defact debbugs-gnu-query (id)
- "Displays the discussion of Gnu debbugs ID (a positive integer)."
+ "Display the discussion of Gnu debbugs ID (a positive integer)."
(require 'debbugs-gnu)
(when (debbugs-get-status id)
(debbugs-gnu-bugs id)
@@ -241,12 +241,22 @@ Ignore nil valued attributes. Return t unless no
attributes are printed."
(defun debbugs-version-sufficient-p ()
"Return t iff debbugs version is sufficient for use with Hyperbole (greater
than equal to 0.9.7)."
- (let ((debbugs-src (locate-file "debbugs" load-path '(".el")))
- version)
- (when debbugs-src
- (setq version (shell-command-to-string (format "fgrep -m1 Version: %s |
sed -e 's/[^.0-9]//g' | tr -d '\n'" debbugs-src)))
- (when (not (equal version ""))
- (version-list-<= (version-to-list "0.9.7") (version-to-list
version))))))
+ (save-excursion
+ (let* ((debbugs-src (locate-file "debbugs" load-path '(".el")))
+ (visiting-debbugs-src (get-file-buffer debbugs-src))
+ debbugs-src-buffer
+ version)
+ (when debbugs-src
+ (unwind-protect
+ (progn (set-buffer (setq debbugs-src-buffer (find-file-noselect
debbugs-src)))
+ (widen)
+ (goto-char (point-min))
+ (when (re-search-forward "^;; Version: \\([.0-9]+\\)" nil t)
+ (setq version (match-string 1))))
+ (unless visiting-debbugs-src
+ (kill-buffer debbugs-src-buffer)))
+ (when (not (equal version ""))
+ (version-list-<= (version-to-list "0.9.7") (version-to-list
version)))))))
(provide 'hib-debbugs)
diff --git a/hibtypes.el b/hibtypes.el
index ae8f0c6..43a26ee 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -398,7 +398,7 @@ Each line in the summary may be selected to jump to a
section."
(and toc 2))))
(progn (beginning-of-line)
(ibut:label-set (buffer-name))
- (hact 'rfc-toc (buffer-name) opoint))
+ (hact 'rfc-toc (buffer-name) opoint (point)))
(goto-char opoint)
nil)))
diff --git a/hpath.el b/hpath.el
index 1a778a8..592d001 100644
--- a/hpath.el
+++ b/hpath.el
@@ -60,7 +60,7 @@ Group 1 is the line number. Group 3 is the column number.")
(defvar hpath:path-variable-regexp
(concat
"\\`\\.?:[^:;]+:[^:;]+:\\|:\\.?:\\|:[^:;]+:[^:;]+:\\|:[^:;]+:[^:;]+:\\.?\\'"
"\\|"
-
"\\`\\.?;[^;]+;[^;]+;\\|;\\.?;\\|:[^;]+:[^;]+:\\|;[^;]+;[^;]+;\\|;[^;]+;[^;]+;\\.?\\'")
+
"\\`\\.?;[^;]+;[^;]+;\\|;\\.?;\\|;[^;]+;[^;]+;\\|;[^;]+;[^;]+;\\|;[^;]+;[^;]+;\\.?\\'")
;; A zero-length (null) directory name in the value of PATH indicates the
current directory.
;; A null directory name may appear as two adjacent colons, or as an initial
or trailing colon.
"Regexp that heuristically matches to colon-separated (Posix) or
semicolon-separated (Windows) path variable values.")
@@ -459,9 +459,8 @@ When embedded within a path, the format is ${variable}."
;;; Other public variables
;;; ************************************************************************
-(defvar hpath:rfc "/ftp:anonymous@ftp.ietf.org:rfc/rfc%s.txt"
- "*String to be used in the call: (hpath:rfc rfc-num)
-to create a path to the RFC document for `rfc-num'.")
+(defvar hpath:rfc "https://www.ietf.org/rfc/rfc%s.txt"
+ "*String to be used in the call: (hpath:rfc rfc-num) to create a path to the
RFC document for `rfc-num'.")
(defcustom hpath:suffixes '(".gz" ".Z")
"*List of filename suffixes to add or remove within `hpath:exists-p' and
`hpath:substitute-dir' calls."
@@ -801,10 +800,10 @@ paths are allowed. Absolute pathnames must begin with a
`/' or `~'."
(setq non-exist t))
(if (and path (string-match hpath:path-variable-regexp path))
;; With point inside a path variable, return the path that point is on
or to the right of.
- (or (and (setq subpath (hargs:delimited "[:\"\']" "[:\"\']" t t))
+ (or (and (setq subpath (hargs:delimited "[:\"\']" "[:\"\']" t t nil
"[\t\n\r\f]\\|[;:] \\| [;:]"))
(not (string-match "[:;]" subpath))
subpath)
- (and (setq subpath (hargs:delimited "[;\"\']" "[;\"\']" t t))
+ (and (setq subpath (hargs:delimited "[;\"\']" "[;\"\']" t t nil
"[\t\n\r\f]\\|[;:] \\| [;:]"))
(not (string-match ";\\|:[^:]*:" subpath))
subpath)
".")
@@ -953,7 +952,7 @@ window in which the buffer is displayed."
(expand-file-name path)
(hpath:expand-with-variable path))))
;; For compressed Elisp libraries, add any found compressed suffix to the
path.
- (or (locate-library path) path))
+ (or (locate-library path t) path))
(defvar hpath:compressed-suffix-regexp (concat (regexp-opt '(".gz" ".Z" ".zip"
".bz2" ".xz" ".zst")) "\\'")
"Regexp of compressed file name suffixes.")
@@ -1269,7 +1268,7 @@ stripped, link anchors at the end following a # or ,
character
are temporarily stripped, and path variables are expanded with
`hpath:substitute-value'. This normalized path form is what is
returned for PATH."
- (when (stringp path)
+ (when (and (stringp path) (not (string-match hpath:path-variable-regexp
path)))
(setq path (hpath:call
(lambda (path)
(let (modifier
@@ -1559,7 +1558,7 @@ Returns LINKNAME unchanged if it is not a symbolic link
but is a pathname."
(buffer-file-name (hpath:find-noselect filename)))))
(defun hpath:validate (path)
- "Return PATH if PATH is a valid, readable path, else signal error.
+ "Return PATH converted to Posix format if PATH is a valid, readable path,
else signal error.
Info and remote pathnames are considered readable without any
validation checks.
@@ -1573,12 +1572,11 @@ to it."
;; info or remote path, so don't validate
path)
((if (not (hpath:www-p path))
- ;; Otherwise, must not be a WWW link ref and must be a readable
- ;; path.
+ ;; Otherwise, must not be a WWW link ref and must be a readable
path.
(let ((return-path (hpath:exists-p path)))
(and return-path (file-readable-p return-path)
return-path))))
- (t (error "(hpath:validate): \"%s\" is not readable." path))))
+ (t (error "(hpath:validate): \"%s\" is not readable" path))))
;;; URL Handling
(defun hpath:find-file-urls-p ()
diff --git a/hui-mouse.el b/hui-mouse.el
index af25e23..94119ce 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -228,6 +228,14 @@ Its default value is #'smart-scroll-down."
((hui-select-mark-delimited-sexp) .
(progn (hui-select-mark-delimited-sexp) (hmouse-kill-region))))
;;
+ ((eq major-mode 'occur-mode) .
+ ((occur-mode-goto-occurrence) . (occur-mode-goto-occurrence)))
+ ;;
+ ((eq major-mode 'moccur-mode) .
+ ((moccur-mode-goto-occurrence) . (moccur-mode-goto-occurrence)))
+ ((eq major-mode 'amoccur-mode) .
+ ((amoccur-mode-goto-occurrence) . (amoccur-mode-goto-occurrence)))
+ ;;
((eq major-mode 'kotl-mode) .
((kotl-mode:action-key) . (kotl-mode:assist-key)))
;;
@@ -310,14 +318,6 @@ Its default value is #'smart-scroll-down."
buffer-file-name (smart-fortran-at-tag-p)) .
((smart-fortran) . (smart-fortran nil 'next-tag)))
;;
- ((eq major-mode 'occur-mode) .
- ((occur-mode-goto-occurrence) . (occur-mode-goto-occurrence)))
- ;;
- ((eq major-mode 'moccur-mode) .
- ((moccur-mode-goto-occurrence) . (moccur-mode-goto-occurrence)))
- ((eq major-mode 'amoccur-mode) .
- ((amoccur-mode-goto-occurrence) . (amoccur-mode-goto-occurrence)))
- ;;
((eq major-mode 'calendar-mode) .
((smart-calendar) . (smart-calendar-assist)))
;;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/hyperbole 00a0d24: RFC handling fixes and change to use http instead of ftp,
ELPA Syncer <=