[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 28a1e0c 18/50: Use xdg-open to dispatch to us
From: |
Stefan Monnier |
Subject: |
[elpa] externals/hyperbole 28a1e0c 18/50: Use xdg-open to dispatch to user preferences for display alist (#40) |
Date: |
Wed, 17 Mar 2021 18:44:16 -0400 (EDT) |
branch: externals/hyperbole
commit 28a1e0c43ee36b63fef4f93219b9f7eda4c2eadf
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>
Use xdg-open to dispatch to user preferences for display alist (#40)
* Use xdg-open to dispatch to user preferences for display alist
Default is gimp and office extensions but can be customized.
* Add defcustom to display alists
* Add documentation
Co-authored-by: Mats Lidell <matsl@gnu.org>
---
Changes | 7 +++++++
hpath.el | 51 +++++++++++++++++++++++++++++++++------------------
2 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/Changes b/Changes
index a624e46..1ce1c12 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,10 @@
+2020-11-02 Mats Lidell <matsl@gnu.org>
+
+* hpath.el (hpath:external-display-alist-mswindows):
+ (hpath:internal-display-alist): Add customization.
+ (hpath:external-display-alist-x): Add customization. Use
+ xdg-open to use users preferred app in window system.
+
2020-10-25 Bob Weiner <rsw@gnu.org>
* hibtypes.el:
diff --git a/hpath.el b/hpath.el
index 58d5dc4..348b3f7 100644
--- a/hpath.el
+++ b/hpath.el
@@ -4,7 +4,7 @@
;;
;; Orig-Date: 1-Nov-91 at 00:44:23
;;
-;; Copyright (C) 1991-2019 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2020 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
;;
;; This file is part of GNU Hyperbole.
@@ -252,29 +252,42 @@ possible 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 'regexp
+ :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"))
+ "*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)
-(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"))
- "*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.")
-
-(defvar hpath:external-display-alist-x (list '("\\.e?ps$" . "ghostview")
- '("\\.dvi$" . "xdvi")
- (cons (format "\\.\\(%s\\)$"
hpath:external-open-office-suffixes) "openoffice")
- '("\\.pdf$" . ("xpdf" "acroread"))
- '("\\.ps\\.g?[zZ]$" . "zcat %s |
ghostview -")
-
'("\\.\\(gif\\|tiff?\\|xpm\\|xbm\\|xwd\\|pm\\|pbm\\|jpe?g\\)" . "xv")
- '("\\.ra?s$" . "snapshot -l"))
+
+;; (defvar hpath:external-display-alist-x (list '("\\.e?ps$" . "ghostview")
+;; '("\\.dvi$" . "xdvi")
+;; (cons (format "\\.\\(%s\\)$"
hpath:external-open-office-suffixes) "openoffice")
+;; '("\\.pdf$" . ("xpdf" "acroread"))
+;; '("\\.ps\\.g?[zZ]$" . "zcat %s |
ghostview -")
+;;
'("\\.\\(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)
+ "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.")
+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:info-suffix "\\.info\\(-[0-9]+\\)?\\(\\.gz\\|\\.Z\\|-z\\)?\\'"
"Regexp matching to the end of Info manual file names.")
-(defvar hpath:internal-display-alist
+(defcustom hpath:internal-display-alist
(let ((info-suffix "\\.info\\(-[0-9]+\\)?\\(\\.gz\\|\\.Z\\|-z\\)?\\'"))
(delq
nil
@@ -313,7 +326,9 @@ See the function `hpath:get-external-display-alist' for
detailed format document
)))
"*Alist of (FILENAME-REGEXP . EDIT-FUNCTION) elements for calling special
functions to display particular file types within Emacs. See also
-the function (hpath:get-external-display-alist) for external display program
settings.")
+the function (hpath:get-external-display-alist) for external display program
settings."
+ :type '(alist :key-type regexp :value-type sexp)
+ :group 'hyperbole-commands)
(defvar hpath:display-buffer-alist
(list
- [elpa] externals/hyperbole c0e48fb 01/50: Use \0 for matched Nth substitution (#37), (continued)
- [elpa] externals/hyperbole c0e48fb 01/50: Use \0 for matched Nth substitution (#37), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 531cf87 02/50: Handle Org links in non-Org mode buffers with a low priority ibtype, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole afbae3a 04/50: Do not save temp buffer, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole c1ac392 05/50: Use emacs lisp for updating the web repo, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 357a098 06/50: Initial org-tbl support, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 0e8d33e 03/50: Add Makefile.maintenance, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole de9e60f 09/50: Fix bug#43692, failed to do substitute fixed case for path variables, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 66b35cc 07/50: Add kotl/kotl-orgtbl.el, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 8d77205 08/50: 7.1.3a - Add key bindings and finish Kotl Org table mode support, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 4ddeaf6 10/50: Remove Makefile.maintenance, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 28a1e0c 18/50: Use xdg-open to dispatch to user preferences for display alist (#40),
Stefan Monnier <=
- [elpa] externals/hyperbole 7b92152 11/50: Merge pull request #39 from rswgnu/add-maintenance-makefile-with-web-site-support, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 7be77e0 12/50: Update git cache interactively, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole ad16470 13/50: Document Koutline Org table support; allow ibtype reprioritization, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 9f5a787 14/50: Add hypb-maintenance.el, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole e914edb 15/50: Add hypb-maintenance.el to MANIFEST, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole b4f7e49 16/50: Move HY-TALK.org button data to HY-TALK/.hypb, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 781bbb5 17/50: Merge pull request #41 from rswgnu/update-git-repo-cache-interactively, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 22439e6 20/50: Add klink ref cmds, ebut:program and defiblink for programmatic creation, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole e999fc7 21/50: Stop man-apropos from matching to log file entries, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole cfc61a3 22/50: Eliminate a number of order-based byte-compilation warnings, Stefan Monnier, 2021/03/17