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

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

[elpa] externals/hyperbole 7aedbf3 5/5: Redo all default external-displa


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 7aedbf3 5/5: Redo all default external-display variables to use generic open cmds
Date: Sun, 5 Dec 2021 17:57:20 -0500 (EST)

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

    Redo all default external-display variables to use generic open cmds
---
 ChangeLog | 32 +++++++++++++++++++++++++++-----
 hpath.el  | 43 ++++++++++++++++++++++++++-----------------
 2 files changed, 53 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f7494d8..109cf37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,10 +6,32 @@
 * hibtypes.el (grep-msg, ripgrep-msg): Allow for ${emacs-lisp-var} with : in 
its name
     within the filename/pathname at the start of the line.
 
+* kotl/kview.el (kcell-view:forward, kcell-view:backward, kcell-view:child,
+    kview:map-branch, kview:map-expanded-tree, kview:map-tree):
+  kotl/klabel.el (klabel-type:set-alpha, klabel-type:set-legal,
+    klabel-type:set-partial-alpha):
+  kotl/kotl-mode.el: (kotl-mode:end-of-tree, kotl-mode:next-tree, 
kotl-mode:tree-end):
+    Change indent handling to only be a different indent if different
+    by (kview:level-indent KVIEW) since if length of label changes at level
+    one, then indent will show as 1 or 2 chars longer.
+
+* Makefile (test-all): When run under Emacs with TERM=dumb, set term
+    to vt100 so tests will at least run and show whether all ran
+    successfully or not.
+
+* hpath.el (hpath:external-file-suffixes): Add this new customization
+    with external file suffixes for the Action Key.  Use in each
+    OS-dependent variable.
+
 * test/demo-tests.el (demo-smart-scrolling-proportional-test): Make run
     only when running on a window system since does not work properly
     in batch mode on Macs.
 
+* hpath.el (hpath:native-image-suffixes): Include xbm and xwd formats.
+           (hpath:external-open-office-suffixes): Include more suffixes.
+           (hpath:external-display-alist-x): Use xdg-open to open file
+    types like .ps previously included in this variable.
+
 2021-11-28  Bob Weiner  <rsw@gnu.org>
 
 * hbut.el (ibut:to-name): Move to the start of the name of a given implicit
@@ -23,11 +45,11 @@
     when point is within the ibut.
 
 * hui.el (hui:link-possible-types): Fix to properly get lbl-key for link-to
-    Hyperbole button types.  This resolves a problem when using drags or
-    ace-window {M-o w <window-id>} to create link buttons.
+    Hyperbole button types.  This resolves a problem when using drags or 
ace-window
+    {M-o w <window-id>} to create link buttons.
 
-* hui-window.el (hmouse-prior-active-region): Handle when hkey-value's buffer
-    has been killed.
+* hui-window.el (hmouse-prior-active-region): Handle when hkey-value's buffer 
has
+    been killed.
 
 * hbut.el (hbut:funcall): Add to call an ibut manipulation function with point
     on the ibut (may be a different src buffer than the original source).
@@ -60,7 +82,7 @@
 
 2021-11-08  Mats Lidell  <matsl@gnu.org>
 
-* test/kotl-orgtbl-tests.el 
(kotl-orgtbl-action-key-on-vertical-bar-toggles-orgtbl-mode)
+* test/kotl-orgtbl-tests.el 
(kotl-orgtbl-action-key-on-vertical-bar-toggles-orgtbl-mode):
     (kotl-orgtbl-shift-tab-demotes-tree-outside-table): Add tests.
 
 * kotl/kotl-mode.el (kotl-mode): Change binding for orgtbl C-d to use new
diff --git a/hpath.el b/hpath.el
index f8a2062..d166c82 100644
--- a/hpath.el
+++ b/hpath.el
@@ -304,34 +304,42 @@ Call this function manually if mount points change after 
Hyperbole is loaded."
 ;;; FILE VIEWER COMMAND SETTINGS
 ;;; ************************************************************************
 
-(defcustom hpath:external-open-office-suffixes 
"doc[mx]?\\|od[st]\\|ppsx?\\|ppt[mx]?\\|xls[mx]?"
-  "*Regexp of Open Office document suffix alternatives to display externally.
+(defcustom hpath:external-open-office-suffixes 
"doc[mx]?\\|od[st]\\|ppsx?\\|ppt[mx]?\\|v[dst][s]?[tx]\\|vsd[x]?\\|xls[mx]?"
+  "*Regexp of Open Office document suffix alternatives to display externally 
with the Action Key
+Do not include an initial period or enclosing grouping parentheses;
+these will be added automatically.
+
 See http://www.openwith.org/programs/openoffice for a full list of
 possible suffixes."
   :type 'string
   :group 'hyperbole-commands)
 
-(defcustom hpath:external-display-alist-macos (list (cons (format 
"\\.\\(app\\|%s\\|adaptor\\|app\\|bshlf\\|clr\\|concur\\|create\\|diagram\\|dp\\|e?ps\\|frame\\|gif\\|locus\\|Mesa\\|nib\\|pdf\\|project\\|rtf\\|sense\\|tiff\\|tree\\)$"
-                                                                 
hpath:external-open-office-suffixes)
+(defcustom hpath:external-file-suffixes 
"e?ps\\|dvi\\|pdf\\|ps\\.g?[zZ]\\|gif\\|tiff?\\|xpm\\|xbm\\|xwd\\|pm\\|pbm\\|jpe?g\\|ra?s\\|xcf"
+  "*Non-operating system dependent regexp of file suffixes to open outside 
Emacs with the Action Key when not handled by `hpath:native-image-suffixes'.
+Do not include an initial period or enclosing grouping parentheses; these will 
be added automatically."
+  :type 'string
+  :group 'hyperbole-commands)
+
+(defcustom hpath:external-display-alist-macos (list (cons (format 
"\\.\\(%s\\|%s\\|app\\|adaptor\\|bshlf\\|clr\\|concur\\|create\\|diagram\\|dp\\|frame\\|locus\\|Mesa\\|nib\\|project\\|rtf\\|sense\\|tree\\)$"
+                                                                 
hpath:external-open-office-suffixes
+                                                                 
hpath:external-file-suffixes)
                                                          "open"))
   "*An alist of (FILENAME-REGEXP . DISPLAY-PROGRAM-STRING-OR-LIST) elements 
for the macOS window system.
 See the function `hpath:get-external-display-alist' for detailed format 
documentation."
   :type '(alist :key-type regexp :value-type string)
   :group 'hyperbole-commands)
 
-;; (defvar hpath:external-display-alist-mswindows (list '("\\.vba$" . 
"/c/Windows/System32/cmd.exe //c start \"${@//&/^&}\"")
-;;                                                  (cons (format 
"\\.\\(%s\\)$" hpath:external-open-office-suffixes)
-;;                                                        "openoffice.exe"))
-
-(defcustom hpath:external-display-alist-mswindows (list '("\\.vba$" . 
"/c/Windows/System32/cmd.exe //c start \"${@//&/^&}\"")
-                                                       (cons (format 
"\\.\\(%s\\)$" hpath:external-open-office-suffixes)
-                                                             "openoffice.exe"))
+(defcustom hpath:external-display-alist-mswindows (list (cons (format 
"\\.\\(%s\\)$" hpath:external-open-office-suffixes)
+                                                             "openoffice.exe")
+                                                       (cons (format 
"\\.\\(%s\\|vba\\)$" hpath:external-file-suffixes)
+                                                             
"/c/Windows/System32/cmd.exe //c start \"${@//&/^&}\""))
   "*An alist of (FILENAME-REGEXP . DISPLAY-PROGRAM-STRING-OR-LIST) elements 
for MS Windows.
 See the function `hpath:get-external-display-alist' for detailed format 
documentation."
   :type '(alist :key-type regexp :value-type string)
   :group 'hyperbole-commands)
 
 
+;; Old X Window System configuration prior to use of 'xdg-open'.
 ;; (defvar hpath:external-display-alist-x (list '("\\.e?ps$" . "ghostview")
 ;;                                          '("\\.dvi$"  . "xdvi")
 ;;                                          (cons (format "\\.\\(%s\\)$" 
hpath:external-open-office-suffixes) "openoffice")
@@ -340,8 +348,9 @@ See the function `hpath:get-external-display-alist' for 
detailed format document
 ;;                                          
'("\\.\\(gif\\|tiff?\\|xpm\\|xbm\\|xwd\\|pm\\|pbm\\|jpe?g\\)"  . "xv")
 ;;                                          '("\\.ra?s$" . "snapshot -l"))
 
-(defcustom hpath:external-display-alist-x (list (cons (format 
"\\.\\(xcf\\|%s\\)$"
-                                                             
hpath:external-open-office-suffixes)
+(defcustom hpath:external-display-alist-x (list (cons (format 
"\\.\\(%s\\|%s\\)$"
+                                                             
hpath:external-open-office-suffixes
+                                                             
hpath:external-file-suffixes)
                                                      "setsid -w xdg-open"))
   "*An alist of (FILENAME-REGEXP . DISPLAY-PROGRAM-STRING-OR-LIST) elements 
for the X Window System.
 See the function `hpath:get-external-display-alist' for detailed format 
documentation."
@@ -459,8 +468,8 @@ Valid DISPLAY-WHERE-SYMBOLs are:
     other-frame             - display in another, possibly existing, frame
     other-frame-one-window  - display in another frame, deleting other 
windows.")
 
-(defcustom hpath:native-image-suffixes "\\.\\(xpm\\|png\\|gif\\|jpe?g\\)\\'"
-  "Regular expression matching file name suffixes of natively handled image 
types.
+(defcustom hpath:native-image-suffixes 
"\\.\\(xbm\\|xpm\\|xwd\\|png\\|gif\\|jpe?g\\)\\'"
+  "Regular expression matching file name suffixes of image types Hyperbole 
displays in Emacs.
 Used only if the function `image-mode' is defined."
   :type 'regexp
   :group 'hyperbole-commands)
@@ -1880,7 +1889,7 @@ With optional INCLUDE-START-AND-END-P non-nil, returns 
list of:
 (defun hpath:command-string (cmd filename)
   "Return a single string that runs a shell CMD over FILENAME.
 CMD may contain a single `%s' indicating where FILENAME is to
-be integrated, otherwise the filename is appended as an argument."
+be integrated, otherwise the filename is appended as a double-quoted argument."
   ;; Permit %s substitution of filename within program.
   (if (string-match "[^%]%s" cmd)
       (format cmd filename)
@@ -2002,7 +2011,7 @@ See also documentation for the function 
(hpath:get-external-display-alist) and t
        ))
 
 (defun hpath:match (filename regexp-alist)
-  "If FILENAME match the car of any element in REGEXP-ALIST, return its cdr.
+  "If FILENAME matches the car of any element in REGEXP-ALIST, return its cdr.
 REGEXP-ALIST elements must be of the form (<filename-regexp>
 . <command-to-display-file>).  <command-to-display-file> may be a string
 representing an external `window-system' command to run or it may be a Lisp



reply via email to

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