emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hyperbole 4194f18537 4/8: Catch potential error in moun


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 4194f18537 4/8: Catch potential error in mount point shell cmd call from hypb mode
Date: Sun, 14 May 2023 03:58:32 -0400 (EDT)

branch: externals/hyperbole
commit 4194f18537d13d9f9f12f08e6bf3a69eee37a8a9
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    Catch potential error in mount point shell cmd call from hypb mode
---
 ChangeLog | 6 ++++++
 HY-NEWS   | 6 +++---
 hpath.el  | 9 +++++++--
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 85f770c4ea..fc0fd1b717 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2023-05-13  Bob Weiner  <rsw@gnu.org>
 
+* hpath.el (hpath:cache-mswindows-mount-points): Catch and ignore any shell 
command
+    error.  Can be triggered when default-directory is set to a URL, as in RFC
+    display buffers.  This in turn would lead hyperbole-mode activation to 
fail.
+
+* man/hyperbole.texi (HyRolo Keys): Updates to match HY-NEWS.
+
 * DEMO (Org Mode): Update Action Key handling writeup.
 
 * hui-menu.el (infodock-hyperbole-menu): Sync Documentation menu to minibuffer 
Doc/
diff --git a/HY-NEWS b/HY-NEWS
index e82df5ea84..b7b36832b6 100644
--- a/HY-NEWS
+++ b/HY-NEWS
@@ -182,8 +182,8 @@
       now recognized as programming etags in the *Warnings* byte-compilation
       buffer and in Flymake log and diagnostics buffers.
 
-  *** Info Nodes: Better handle embedded double quotes and add support for
-      HTML &quot; quoting.
+  *** Info Nodes: Better handling of embedded double quotes and added support
+      for HTML &quot; quoting.
 
   *** Improved # and Embedded Space Path Handling: If a path exists, don't
       treat its # hash marks as section markers, notably for #autosave# files.
@@ -198,7 +198,7 @@
 
   *** Path Implicit Buttons: Much improved relative path handling, including
       expanding into executable paths when pathname is prefixed by ! or &,
-      handling info paths outside `Info-directory-list', like
+      and handling info paths outside `Info-directory-list', like
       "man/hyperbole.info".
 
   *** Table of Contents Sections: Hyperbole now recognizes TOCs in any text
diff --git a/hpath.el b/hpath.el
index 0fdaaaf766..d7ca305c8c 100644
--- a/hpath.el
+++ b/hpath.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:     1-Nov-91 at 00:44:23
-;; Last-Mod:     23-Apr-23 at 11:58:33 by Bob Weiner
+;; Last-Mod:     13-May-23 at 18:04:17 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -297,7 +297,12 @@ Call this function manually if mount points change after 
Hyperbole is loaded."
                                       mount-point)
                                 mount-points-to-add)))
                      ;; Return a plist of MSWindows path-mounted mount-point 
pairs.
-                     (split-string (shell-command-to-string (format "df -a -t 
drvfs 2> /dev/null | sort | uniq | grep -v '%s' | sed -e 's+ .*[-%%] /+ /+g'" 
hpath:posix-mount-points-regexp))))
+                     ;; Next call will raise an error if default-directory is 
set to
+                     ;; a URL, e.g. in RFC buffers; just ignore it and return 
nil in
+                     ;; such a case.
+                     (condition-case ()
+                         (split-string (shell-command-to-string (format "df -a 
-t drvfs 2> /dev/null | sort | uniq | grep -v '%s' | sed -e 's+ .*[-%%] /+ 
/+g'" hpath:posix-mount-points-regexp)))
+                       (error nil)))
       ;; Sort alist of (path-mounted . mount-point) elements from shortest
       ;; to longest path so that the longest path is selected first within
       ;; 'directory-abbrev-alist' (elements are added in reverse order).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]