branch: externals/hyperbole commit 05c6149932476f784633f2c6295099b4db075c11 Author: bw <r...@gnu.org> Commit: bw <r...@gnu.org>
Small updates in prep for major release --- ChangeLog | 13 ++ HY-ANNOUNCE | 83 ++++----- MANIFEST | 1 - Makefile | 4 +- hactypes.el | 5 +- hload-path.el | 10 +- hmail.el | 9 +- hsys-org.el | 8 +- hui.el | 8 +- hvm.el | 547 ---------------------------------------------------------- hypb.el | 5 +- hyperbole.el | 9 +- 12 files changed, 80 insertions(+), 622 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6981d20f6c..dc09b9bbcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2024-03-10 Bob Weiner <r...@gnu.org> + +* hload-path.el (make-directory-autoloads): Remove 'ext:' since this is an Emacs + built-in library available in version 28 and above. + +* hvm.el: Remove from Hyperbole as VM (the mail reader) is a very old package that is + not available in normal package distributions today. + +* hsys-org.el (hsys-org-search-internal-link-p, + hsys-org-search-radio-target-link-p): + hactypes.el (link-to-org-id-marker): Conditionalize call of 'org-fold-show-context' + on whether 'org-fold' feature exists. + 2024-03-08 Mats Lidell <ma...@gnu.org> * test/hmouse-drv-tests.el (hmouse-drv--hmouse-choose-link-and-referent-windows--two-windows-same-frame) diff --git a/HY-ANNOUNCE b/HY-ANNOUNCE index 16cccc15d3..da6eacb709 100644 --- a/HY-ANNOUNCE +++ b/HY-ANNOUNCE @@ -1,22 +1,29 @@ From: Bob Weiner <r...@gnu.org> To: gnu-emacs-sour...@gnu.org, emacs-tange...@gnu.org, hyperbole-us...@gnu.org, hyperbole-annou...@gnu.org -Subject: GNU Hyperbole Major Release 9 +Subject: GNU Hyperbole Major Release 9 (V9.0.1) --text follows this line-- ======================================================================== * Overview ======================================================================== -GNU Hyperbole 9.0.0, the Rhapsody release, is now available on GNU ELPA. +GNU Hyperbole 9.0.1, the Rhapsody release, is now available on GNU ELPA. And oh what a release it is: extensive new features, new video demos, org and org roam integration, Markdown and Org file support in HyRolo, recursive directory and wildcard file scanning in HyRolo and much more. -Hyperbole is a unique hypertextual information management Emacs package -that works across all Emacs modes, letting the computer do the hard work -while you benefit from its sophisticated context-sensitive linking and -navigation capabilities. Hyperbole has always been one of the best -documented Emacs packages. With Version 9 comes excellent test coverage: -over 340 automated tests to ensure quality. We hope you'll give it a try. +Hyperbole is a unique hypertextual information management Emacs +package that works across all Emacs modes, letting the computer do the +hard work while you benefit from its sophisticated context-sensitive +linking and navigation capabilities. + +Hyperbole has always been one of the best documented Emacs packages. +With Version 9 comes excellent test coverage: over 400 automated tests +are run with every update against every major version of Emacs since +version 27, to ensure quality. We hope you'll give it a try. + +======================================================================== +* What's New +======================================================================== What's new in this release is described here: @@ -25,8 +32,8 @@ What's new in this release is described here: Everything back until release 8.0.0 is new since the last major release announcement (almost a year and a half ago), so updates are extensive. -If you prefer video introductions, visit the videos linked to below; otherwise, -skip to the next section. +If you prefer video introductions, visit the videos linked to below; +otherwise, skip to the next section. |--------------------------------------------------+------------------------------| | GNU Hyperbole Videos | Web Link | @@ -66,34 +73,32 @@ skip to the next section. Hyperbole is like Markdown for hypertext. Hyperbole automatically recognizes dozens of common patterns in any buffer regardless of mode -and can instantly activate them as hyperbuttons with a single key: -email addresses, URLs, grep -n outputs, programming backtraces, -sequences of Emacs keys, programming identifiers, Texinfo and Info -cross-references, Org links, Markdown links and on and on. All you do -is load Hyperbole and then your text comes to life with no extra -effort or complex formatting. - -Hyperbole interlinks all your working information within Emacs for -fast access and editing, not just within special modes. Every button -is automatically assigned a type and new types can be developed for -your own buttons with simple function definitions. You can create -your own buttons by simply dragging between two buffers. - -But Hyperbole is also a hub controller for your information supplying -built-in capabilities of contact management/hierarchical record -lookup, legal-numbered outlines with hyperlinkable views and a unique -window and frame manager. It is even Org-compatible so you can use -all of Org's capabilities together with Hyperbole. - -Hyperbole is unique, powerful, extensively documented, and free. Like -Emacs, Org, Counsel and Helm, Hyperbole has many different uses all -based around the theme of reducing cognitive load and improving your -everyday information management. It reduces cognitive load by using -a single Action Key, {M-RET}, across many different contexts -which automatically chooses the best action - -Then as you grow with it across time, it helps you build new capabilities -that continue to speed your work. +and transparently turns them into hyperbuttons you can instantly +activate with a single key. Email addresses, URLs, grep -n outputs, +programming backtraces, sequences of Emacs keys, programming +identifiers, Texinfo and Info cross-references, Org links, Markdown +links and on and on. All you do is load Hyperbole and then your text +comes to life with no extra effort or complex formatting. + +Hyperbole interlinks your working information across all major modes +within Emacs for fast access and editing. Every button is +automatically assigned a type and new types can be developed for your +own buttons with simple function definitions. You can create your own +buttons by simply dragging between two buffers. + +But Hyperbole is also a personal information manager with built-in +capabilities of contact management/hierarchical record lookup, +legal-numbered outlines with hyperlinkable views and a unique window +and frame manager. It is even Org-compatible so you can use all of +Org's capabilities together with Hyperbole. + +Hyperbole is unique, powerful, extensively documented, and free. It +stays out of your way but is always a key press away when you need it. +Like Emacs, Org, Counsel and Helm, Hyperbole has many different uses +all based around the theme of reducing cognitive load and improving +your everyday information management. It reduces cognitive load by +using a single Action Key, {M-RET}, across many different contexts to +perform the best default action in each. ======================================================================== * Installing and Using Hyperbole @@ -111,7 +116,7 @@ Then to invoke its minibuffer menu, use: {C-h h} or {M-x hyperbole RET} The best way to get a feel for many of its capabilities is to invoke the -all new, interactive DEMO and explore sections of interest: +all new, interactive FAST-DEMO and explore sections of interest: {C-h h d d} diff --git a/MANIFEST b/MANIFEST index 6c8dab71a8..371c52ebde 100644 --- a/MANIFEST +++ b/MANIFEST @@ -70,7 +70,6 @@ set.el - General mathematical operators for unordered sets hmh.el - GNU Hyperbole buttons in mail reader: Mh hrmail.el - GNU Hyperbole buttons in mail reader: Rmail hsmail.el - GNU Hyperbole buttons in mail composer: mail -hvm.el - GNU Hyperbole buttons in mail reader: Vm * --- HYPERBOLE KOUTLINER --- kotl/MANIFEST - Summary of Koutliner files diff --git a/Makefile b/Makefile index 767dd5a33b..9572827f90 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # Author: Bob Weiner # # Orig-Date: 15-Jun-94 at 03:42:38 -# Last-Mod: 3-Mar-24 at 18:29:05 by Bob Weiner +# Last-Mod: 10-Mar-24 at 11:50:28 by Bob Weiner # # Copyright (C) 1994-2023 Free Software Foundation, Inc. # See the file HY-COPY for license information. @@ -193,7 +193,7 @@ EL_COMPILE = hact.el hactypes.el hargs.el hbdata.el hbmap.el hbut.el \ hyrolo-demo.el hyrolo-logic.el hyrolo-menu.el hyrolo.el hywconfig.el set.el hypb-ert.el \ hui-dired-sidebar.el hypb-maintenance.el hui-em-but.el hui-register.el -EL_SRC = $(EL_COMPILE) hvm.el +EL_SRC = $(EL_COMPILE) EL_KOTL = kotl/kexport.el kotl/kfile.el kotl/kfill.el kotl/kimport.el kotl/klabel.el \ kotl/klink.el kotl/kmenu.el kotl/kotl-mode.el kotl/kotl-orgtbl.el \ diff --git a/hactypes.el b/hactypes.el index ecf9b52ea4..d42f16ea84 100644 --- a/hactypes.el +++ b/hactypes.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 23-Sep-91 at 20:34:36 -;; Last-Mod: 4-Mar-24 at 00:24:53 by Bob Weiner +;; Last-Mod: 10-Mar-24 at 11:28:18 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -632,7 +632,8 @@ See doc of `ibtypes::org-id' for usage." (org-mark-ring-push) (hact 'link-to-buffer-tmp (marker-buffer marker) marker) (move-marker marker nil) - (org-fold-show-context)) + (when (featurep 'org-fold) ;; newer Org versions + (org-fold-show-context))) (defact link-to-regexp-match (regexp n source &optional buffer-p) "Find REGEXP's Nth occurrence in SOURCE and display location at window top. diff --git a/hload-path.el b/hload-path.el index 98a5d645a9..fb554a3e55 100644 --- a/hload-path.el +++ b/hload-path.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 29-Jun-16 at 14:39:33 -;; Last-Mod: 21-Jan-24 at 23:38:30 by Bob Weiner +;; Last-Mod: 10-Mar-24 at 12:07:48 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1992-2022 Free Software Foundation, Inc. +;; Copyright (C) 1992-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -21,7 +21,7 @@ ;;; ************************************************************************ (defvar generated-autoload-file) -(declare-function make-directory-autoloads "ext:autoload") +(declare-function make-directory-autoloads "autoload") ;;; ************************************************************************ ;;; Public variables @@ -149,10 +149,6 @@ directory or directories specified." ;; Menu items could call this function before Info is loaded. (autoload 'Info-goto-node "info" "Jump to specific Info node." t) -;; Auto-autoload doesn't work for next item because it is defined -;; within a condition-case, so autoload it here. -(autoload 'Vm-init "hvm" "Initializes Hyperbole Vm support." t) - (defun hyperb:autoloads-exist-p () "Return t if all Hyperbole autoload files exist or nil otherwise." (and (file-readable-p (expand-file-name "hyperbole-autoloads.el" hyperb:dir)) diff --git a/hmail.el b/hmail.el index b0a4180a39..53647877ac 100644 --- a/hmail.el +++ b/hmail.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 9-Oct-91 at 18:38:05 -;; Last-Mod: 20-Jan-24 at 15:38:10 by Mats Lidell +;; Last-Mod: 10-Mar-24 at 11:52:34 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -51,11 +51,10 @@ (defcustom hmail:init-function nil "*Function (a symbol) to initialize Hyperbole support for a mail reader/composer. -Valid values are: nil, Mh-init, Rmail-init or Vm-init." +Valid values are: nil, Mh-init or Rmail-init." :type '(choice (const nil) (const Mh-init) - (const Rmail-init) - (const Vm-init)) + (const Rmail-init)) :group 'hyperbole-commands) (defvar hmail:composer 'message-mode @@ -176,7 +175,7 @@ Otherwise, return nil." func-suffix-list)))) (defun hmail:invoke (&optional address cc subject) - "Invoke user preferred mail composer: vm-mail, mh-send or mail. + "Invoke user preferred mail composer: mh-send or mail. Optional arguments are ADDRESS, CC list and SUBJECT of mail." ;; Next 3 lines prevent blank lines between fields due to ;; fill-region-as-paragraph within mail-setup. diff --git a/hsys-org.el b/hsys-org.el index 7e3386dfbd..5f28aad176 100644 --- a/hsys-org.el +++ b/hsys-org.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 2-Jul-16 at 14:54:14 -;; Last-Mod: 18-Feb-24 at 23:44:42 by Mats Lidell +;; Last-Mod: 10-Mar-24 at 11:31:56 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -501,7 +501,8 @@ White spaces are insignificant. Return t if a link is found, else nil." (backward-char) (let ((object (org-element-context))) (when (eq (org-element-type object) 'link) - (org-fold-show-context 'link-search) + (when (featurep 'org-fold) ;; newer Org versions + (org-fold-show-context 'link-search)) (goto-char (or (previous-single-property-change (point) 'face) (point-min))) (throw :link-match t)))) (goto-char origin) @@ -522,7 +523,8 @@ White spaces are insignificant. Return t if a target link is found, else nil." (backward-char) (let ((object (org-element-context))) (when (eq (org-element-type object) 'link) - (org-fold-show-context 'link-search) + (when (featurep 'org-fold) ;; newer Org versions + (org-fold-show-context 'link-search)) (throw :radio-match t)))) (goto-char origin) nil))) diff --git a/hui.el b/hui.el index 57ab3ec033..b2a1e8e728 100644 --- a/hui.el +++ b/hui.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 19-Sep-91 at 21:42:03 -;; Last-Mod: 25-Feb-24 at 11:56:14 by Bob Weiner +;; Last-Mod: 10-Mar-24 at 10:07:01 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -732,9 +732,9 @@ Use `hui:gbut-create' to create a global explicit button." (interactive "sCreate global implicit button named: \nsButton text (with any delimiters): ") (let (but-buf opoint - delimited-label) + delimited-name) (save-excursion - (setq delimited-label (concat ibut:label-start name ibut:label-end) + (setq delimited-name (concat ibut:label-start name ibut:label-end) but-buf (hpath:find-noselect (gbut:file))) (hui:buf-writable-err but-buf "gibut-create") ;; This prevents movement of point which might be useful to user. @@ -744,7 +744,7 @@ Use `hui:gbut-create' to create a global explicit button." (unless (bolp) (insert "\n")) (setq opoint (point)) - (insert delimited-label ": " text "\n") + (insert delimited-name ": " text "\n") (save-excursion (goto-char (+ opoint (length ibut:label-start))) ;; Create button object from ibut at point diff --git a/hvm.el b/hvm.el deleted file mode 100644 index bc05b3d846..0000000000 --- a/hvm.el +++ /dev/null @@ -1,547 +0,0 @@ -;;; hvm.el --- GNU Hyperbole buttons in mail reader: Vm -*- lexical-binding: t; -*- -;; -;; Author: Bob Weiner -;; -;; Orig-Date: 10-Oct-91 at 01:51:12 -;; Last-Mod: 18-Feb-24 at 12:33:39 by Mats Lidell -;; -;; SPDX-License-Identifier: GPL-3.0-or-later -;; -;; Copyright (C) 1991-2021 Free Software Foundation, Inc. -;; See the "HY-COPY" file for license information. -;; -;; This file is part of GNU Hyperbole. - -;;; Commentary: -;; -;; Automatically configured for use in "hyperbole.el". -;; If hsettings loading fails prior to initializing Hyperbole Vm support, -;; -;; {M-x Vm-init RET} -;; -;; will do it. -;; - -;;; Code: -;;; ************************************************************************ -;;; Other required Elisp libraries -;;; ************************************************************************ - -;; VM is not available as a regular Emacs package, so it is somewhat -;; difficult to install properly. Requiring it below will therefore -;; often trigger an error and prevent Hyperbole from properly -;; loading, so prevent this error with a condition-case around this -;; whole file. - -(condition-case nil -(progn - -(require 'hload-path) - -(eval-and-compile - (require 'hmail) - (load "hsmail") - (when (require 'vm nil t) - (or (and (fboundp 'vm-edit-message) (fboundp 'vm-edit-message-end)) - (load "vm-edit")) - (vm-session-initialization))) ;; this requires all of vm's modules - -;;; ************************************************************************ -;;; Public variables -;;; ************************************************************************ - -;; Current versions of VM define this next variable in "vm-vars.el". We -;; define it here for earlier VM versions. -(defvar vm-edit-message-mode nil - "*Major mode to use when editing messages in VM.") - -;; "hmail.el" procedures will branch improperly if a regular mode, like VM's -;; default `text-mode', is used for editing. -(setq vm-edit-message-mode 'vm-edit-mode) - -;;; ************************************************************************ -;;; Public functions -;;; ************************************************************************ - -(defun vm-edit-mode () - "Major mode for editing vm mail messages. -Special commands:\\{vm-edit-message-map} -Turning on vm-edit-mode calls the value of the variable vm-edit-message-hook, -if that value is non-nil." - (interactive) - (kill-all-local-variables) -;; (use-local-map vm-edit-message-map) - (setq mode-name "VM Edit") - (setq major-mode 'vm-edit-mode) - (setq local-abbrev-table text-mode-abbrev-table) - (set-syntax-table text-mode-syntax-table) -;; (run-hooks 'vm-edit-message-hook) - ) - -;;;###autoload -(defun Vm-init () - "Initialize Hyperbole support for Vm mail reading." - (interactive) - (setq hmail:composer 'mail-mode - hmail:lister 'vm-summary-mode - hmail:modifier 'vm-edit-mode - hmail:reader 'vm-mode) - ;; - ;; Setup public abstract interface to Hyperbole defined mail - ;; reader-specific functions used in "hmail.el". - ;; - (rmail:init) - ;; - ;; Setup private abstract interface to mail reader-specific functions - ;; used in "hmail.el". - ;; - (defalias 'rmail:get-new 'vm-get-new-mail) - (defalias 'rmail:msg-forward 'vm-forward-message) - (defalias 'rmail:summ-msg-to 'vm-follow-summary-cursor) - (defalias 'rmail:summ-new 'vm-summarize) - (if (called-interactively-p 'interactive) - (message "Hyperbole VM mail reader support initialized."))) - -(defun Vm-msg-hdrs-full (toggled) - "If TOGGLED is non-nil, toggle full/hidden headers, else show full headers." - (save-excursion - (if (or toggled - (let ((exposed (= (point-min) - (vm-start-of (car vm-message-pointer))))) - (not exposed))) - (progn (vm-expose-hidden-headers) - (setq toggled t))) - toggled)) - -(defun Vm-msg-narrow () - "Narrows mail reader buffer to current message. -This includes Hyperbole button data." - (save-excursion - (vm-select-folder-buffer) - (narrow-to-region (point-min) (Vm-msg-end)))) - -(defun Vm-msg-next () (vm-next-message 1)) - -(defun Vm-msg-num () - "Return number of vm mail message that point is within, in physical message order." - (interactive) - (let ((count 1) - (case-fold-search)) - (save-excursion - (save-restriction - (widen) - (while (re-search-backward Vm-msg-start-regexp nil t) - (setq count (1+ count))))) - count)) - -(defun Vm-msg-prev () (vm-previous-message 1)) - -(defun Vm-msg-to-p (mail-msg-id mail-file) - "Set current buffer to start of msg with MAIL-MSG-ID in MAIL-FILE. -Return t if successful, else nil or signal error." - (if (not (file-readable-p mail-file)) - nil - (vm-visit-folder mail-file) - (widen) - (goto-char 1) - (if (let ((case-fold-search)) - (re-search-forward (concat rmail:msg-hdr-prefix - (regexp-quote mail-msg-id)) nil t)) - ;; Found matching msg - (progn - (setq buffer-read-only t) - (vm-goto-message-at-point) - t)))) - -(defun Vm-msg-widen () - "Widens buffer to full current message including Hyperbole button data." - (save-excursion - (vm-select-folder-buffer) - (narrow-to-region (point-min) (Vm-msg-end)))) - -(defun Vm-to () - "Set current buffer to a mail reader buffer." - (and (eq major-mode 'vm-summary-mode) (set-buffer vm-mail-buffer))) - -(defun Vm-Summ-delete () - (vm-follow-summary-cursor) - (vm-delete-message 1)) - -(defalias 'Vm-Summ-expunge 'vm-expunge-folder) - -(defalias 'Vm-Summ-goto 'vm-follow-summary-cursor) - -(defun Vm-Summ-to () - "Set current buffer to a mail listing buffer." - (and (eq major-mode 'vm-mode) (set-buffer vm-summary-buffer))) - -(defun Vm-Summ-undelete-all () - (message - "(Vm-Summ-undelete-all: Vm doesn't have an undelete all msgs function.")) - -;;; ************************************************************************ -;;; Private functions -;;; ************************************************************************ - -(defun Vm-msg-end () - "Return end point for current Vm message, including Hyperbole button data. -Has side-effect of widening buffer." - (save-excursion - (goto-char (point-min)) - (widen) - (if (let ((case-fold-search)) - (re-search-forward Vm-msg-start-regexp nil t)) - (match-beginning 0) - (point-max)))) - -;; Redefine version of this function from "vm-page.el" to hide any -;; Hyperbole button data whenever a message is displayed in its entirety. -(defun vm-show-current-message () - (save-excursion - (save-excursion - (goto-char (point-min)) - (hmail:msg-narrow (point-min) (Vm-msg-end))) - (and vm-honor-page-delimiters - (save-excursion - (if (search-forward page-delimiter nil t) - (progn - (goto-char (match-beginning 0)) - (not (looking-at (regexp-quote hmail:hbdata-sep)))))) - (progn - (if (looking-at page-delimiter) - (forward-page 1)) - (vm-narrow-to-page)))) - ;; don't mark the message as read if the user can't see it! - (if (vm-get-buffer-window (current-buffer)) - (progn - (setq vm-system-state 'showing) - (cond ((vm-new-flag (car vm-message-pointer)) - (vm-set-new-flag (car vm-message-pointer) nil))) - (cond ((vm-unread-flag (car vm-message-pointer)) - (vm-set-unread-flag (car vm-message-pointer) nil))) - (vm-update-summary-and-mode-line) - (vm-howl-if-eom)) - (if (fboundp 'hproperty:but-create) (hproperty:but-create)) - (vm-update-summary-and-mode-line))) - -;; Redefine version of this function from "vm-page.el" to treat end of -;; text (excluding Hyperbole button data) as end of message. -(defun vm-scroll-forward-internal (arg) - (let ((direction (prefix-numeric-value arg)) - (w (selected-window))) - (condition-case error-data - (progn (scroll-up arg) nil) - (error - (if (or (and (< direction 0) - (> (point-min) (vm-text-of (car vm-message-pointer)))) - (and (>= direction 0) - (/= (point-max) - (save-restriction - (hmail:hbdata-start - (point-min) - (vm-text-end-of - (car vm-message-pointer))))))) - (progn - (vm-widen-page) - (if (>= direction 0) - (progn - (forward-page 1) - (set-window-start w (point)) - nil ) - (if (or (bolp) - (not (save-excursion - (beginning-of-line) - (looking-at page-delimiter)))) - (forward-page -1)) - (beginning-of-line) - (set-window-start w (point)) - 'tryagain)) - (if (eq (car error-data) 'end-of-buffer) - (if vm-auto-next-message - 'next-message - (set-window-point w (point)) - 'end-of-message))))))) - -;; Redefine version of this function from "vm-page.el" (called by -;; vm-scroll-* functions). Make it keep Hyperbole button data hidden. -(defun vm-widen-page () - (if (or (> (point-min) (vm-text-of (car vm-message-pointer))) - (/= (point-max) (vm-text-end-of (car vm-message-pointer)))) - (hmail:msg-narrow (vm-vheaders-of (car vm-message-pointer)) - (if (or (vm-new-flag (car vm-message-pointer)) - (vm-unread-flag (car vm-message-pointer))) - (vm-text-of (car vm-message-pointer)) - (vm-text-end-of (car vm-message-pointer)))))) - -;; Redefine version of this function from "vm-edit.el" to hide -;; Hyperbole button data when insert edited message from temporary buffer. -(advice-add 'vm-edit-message :after - (lambda () (&rest _) (hmail:msg-narrow))) - -;;; Redefine version of this function from "vm-edit.el" to hide -;;; Hyperbole button data when insert edited message from temporary buffer. -(defun vm-edit-message-end () - "End the edit of a message and copy the result to its folder." - (interactive) - (if (null vm-message-pointer) - (error "This is not a VM message edit buffer")) - (if (null (buffer-name (vm-buffer-of (car vm-message-pointer)))) - (error "The folder buffer for this message has been killed")) - (let ((pos-offset (- (point) (point-min)))) - ;; make sure the message ends with a newline - (goto-char (point-max)) - (and (/= (preceding-char) ?\n) (insert ?\n)) - ;; munge message separators found in the edited message to - ;; prevent message from being split into several messages. - (vm-munge-message-separators (vm-message-type-of (car vm-message-pointer)) - (point-min) (point-max)) - ;; for From_-with-Content-Length recompute the Content-Length header - (if (eq (vm-message-type-of (car vm-message-pointer)) - 'From_-with-Content-Length) - (let ((buffer-read-only nil) - length) - (goto-char (point-min)) - ;; first delete all copies of Content-Length - (while (and (re-search-forward vm-content-length-search-regexp nil t) - (null (match-beginning 1)) - (progn (goto-char (match-beginning 0)) - (vm-match-header vm-content-length-header))) - (delete-region (vm-matched-header-start) (vm-matched-header-end))) - ;; now compute the message body length - (goto-char (point-min)) - (search-forward "\n\n" nil 0) - (setq length (- (point-max) (point))) - ;; insert the header - (goto-char (point-min)) - (insert vm-content-length-header " " (int-to-string length) "\n"))) - (let ((edit-buf (current-buffer)) - (mp vm-message-pointer)) - (if (buffer-modified-p) - (progn - (widen) - (with-current-buffer (vm-buffer-of (vm-real-message-of (car mp))) - (if (not (memq (vm-real-message-of (car mp)) vm-message-list)) - (error "The original copy of this message has been expunged")) - (vm-save-restriction - (widen) - (goto-char (vm-headers-of (vm-real-message-of (car mp)))) - (let ((vm-message-pointer mp) - opoint - (buffer-read-only nil)) - (setq opoint (point)) - (insert-buffer-substring edit-buf) - (delete-region - (point) (vm-text-end-of (vm-real-message-of (car mp)))) - (vm-discard-cached-data) - (hmail:msg-narrow)) - (vm-set-edited-flag-of (car mp) t) - (vm-set-edit-buffer-of (car mp) nil)) - (set-buffer (vm-buffer-of (car mp))) - (if (eq (vm-real-message-of (car mp)) - (vm-real-message-of (car vm-message-pointer))) - (progn - (vm-preview-current-message) - ;; Try to position the cursor in the message - ;; window close to where it was in the edit - ;; window. This works well for non MIME - ;; messages, but the cursor drifts badly for - ;; MIME and for refilled messages. - (vm-save-buffer-excursion - (and vm-presentation-buffer - (set-buffer vm-presentation-buffer)) - (vm-save-restriction - (vm-save-buffer-excursion - (widen) - (let ((osw (selected-window)) - (new-win (vm-get-visible-buffer-window - (current-buffer)))) - (unwind-protect - (if new-win - (progn - (select-window new-win) - (goto-char (vm-headers-of - (car vm-message-pointer))) - (ignore-errors (forward-char pos-offset)))) - (if (not (eq osw (selected-window))) - (select-window osw)))))))) - (vm-update-summary-and-mode-line)))) - (message "No change.")) - (vm-display edit-buf nil '(vm-edit-message-end) - '(vm-edit-message-end reading-message startup)) - (set-buffer-modified-p nil) - (kill-buffer edit-buf)))) - - -;;; Define this function if the VM version in use doesn't have it. -(or (fboundp 'vm-goto-message-at-point) -(defun vm-goto-message-at-point () - "In a VM folder buffer, select the message that contain point." - (cond ((fboundp 'vm-update-search-position) - (vm-update-search-position t) - ;; vm-show-current-message only adjusts (point-max), - ;; it doesn't change (point-min). - (narrow-to-region - (vm-vheaders-of (car vm-message-pointer)) - (point-max)) - (vm-show-current-message) - (setq vm-system-state 'reading)) - ((fboundp 'vm-isearch-update) - (vm-isearch-update) - (narrow-to-region - (vm-vheaders-of (car vm-message-pointer)) - (point-max)) - (vm-show-current-message) - (setq vm-system-state 'reading)) - (t (error "Vm search code is missing, can't continue"))))) - -;; Hide any Hyperbole button data when reply to or forward a message. -;; See "vm-reply.el". -(var:append 'vm-mail-mode-hook '(hmail:msg-narrow)) - -;; Redefine this function from "vm-folder.el" called whenever new mail is -;; incorporated so that it will highlight Hyperbole buttons when possible. -;; Returns list of new messages if there were any new messages, nil otherwise. -(defun vm-assimilate-new-messages (&optional - dont-read-attributes - gobble-order - labels first-time) - (let ((tail-cons (vm-last vm-message-list)) - b-list new-messages) - (save-excursion - (vm-save-restriction - (widen) - (if (fboundp 'hproperty:but-create) - (hproperty:but-create)) - (vm-build-message-list) - (if (or (null tail-cons) (cdr tail-cons)) - (progn - (if (not vm-assimilate-new-messages-sorted) - (setq vm-ml-sort-keys nil)) - (if dont-read-attributes - (vm-set-default-attributes (cdr tail-cons)) - (vm-read-attributes (cdr tail-cons))) - ;; Yuck. This has to be done here instead of in the - ;; vm function because this needs to be done before - ;; any initial thread sort (so that if the thread - ;; sort matches the saved order the folder won't be - ;; modified) but after the message list is created. - ;; Since thread sorting is done here this has to be - ;; done here too. - (if gobble-order - (vm-gobble-message-order)) - (if (or (vectorp vm-thread-obarray) - vm-summary-show-threads) - (vm-build-threads (cdr tail-cons)))))) - (setq new-messages (if tail-cons (cdr tail-cons) vm-message-list)) - (vm-set-numbering-redo-start-point new-messages) - (vm-set-summary-redo-start-point new-messages)) - ;; Only update the folders summary count here if new messages - ;; have arrived, not when we're reading the folder for the - ;; first time, and not if we cannot assume that all the arrived - ;; messages should be considered new. Use gobble-order as a - ;; first time indicator along with the new messages being equal - ;; to the whole message list. - (if (and new-messages dont-read-attributes - (or (not (eq new-messages vm-message-list)) - (null gobble-order))) - (vm-modify-folder-totals buffer-file-name 'arrived - (length new-messages))) - ;; copy the new-messages list because sorting might scramble - ;; it. Also something the user does when - ;; vm-arrived-message-hook is run might affect it. - ;; vm-assimilate-new-messages returns this value so it must - ;; not be mangled. - (setq new-messages (copy-sequence new-messages)) - ;; add the labels - (if (and new-messages labels (boundp 'vm-burst-digest-messages-inherit-labels) - vm-burst-digest-messages-inherit-labels) - (let ((mp new-messages)) - (while mp - (vm-set-labels-of (car mp) (copy-sequence labels)) - (setq mp (cdr mp))))) - (if (and new-messages vm-summary-show-threads) - (progn - ;; get numbering and summary of new messages done now - ;; so that the sort code only has to worry about the - ;; changes it needs to make. - (vm-update-summary-and-mode-line) - (vm-sort-messages "thread"))) - (if (and new-message - (or vm-arrived-message-hook vm-arrived-messages-hook) - ;; Run the hooks only if this is not the first - ;; time vm-assimilate-new-messages has been called - ;; in this folder. - (not first-time)) - (let ((new-messages new-messages)) - ;; seems wise to do this so that if the user runs VM - ;; commands here they start with as much of a clean - ;; slate as we can provide, given we're currently deep - ;; in the guts of VM. - (vm-update-summary-and-mode-line) - (if vm-arrived-message-hook - (while new-messages - (vm-run-message-hook (car new-messages) - 'vm-arrived-message-hook) - (setq new-messages (cdr new-messages)))) - (run-hooks 'vm-arrived-messages-hook))) - (if (and new-messages vm-virtual-buffers) - (save-excursion - (setq b-list vm-virtual-buffers) - (while b-list - ;; buffer might be dead - (if (buffer-name (car b-list)) - (let (tail-cons) - (set-buffer (car b-list)) - (setq tail-cons (vm-last vm-message-list)) - (vm-build-virtual-message-list new-messages) - (if (or (null tail-cons) (cdr tail-cons)) - (progn - (if (not vm-assimilate-new-messages-sorted) - (setq vm-ml-sort-keys nil)) - (if (vectorp vm-thread-obarray) - (vm-build-threads (cdr tail-cons))) - (vm-set-summary-redo-start-point - (or (cdr tail-cons) vm-message-list)) - (vm-set-numbering-redo-start-point - (or (cdr tail-cons) vm-message-list)) - (if (null vm-message-pointer) - (progn (setq vm-message-pointer vm-message-list - vm-need-summary-pointer-update t) - (if vm-message-pointer - (vm-preview-current-message)))) - (if vm-summary-show-threads - (progn - (vm-update-summary-and-mode-line) - (vm-sort-messages "thread"))))))) - (setq b-list (cdr b-list))))) - (if (and new-messages vm-ml-sort-keys) - (vm-sort-messages vm-ml-sort-keys)) - new-messages )) - -;; Redefine version of `vm-force-mode-line-update' from "vm-folder.el" -;; to highlight Hyperbole buttons in summary buffers. -(defun vm-force-mode-line-update () - "Force a mode line update in all frames." - (if vm-summary-buffer - (with-current-buffer vm-summary-buffer - (if (fboundp 'hproperty:but-create) (hproperty:but-create)))) - (if (fboundp 'force-mode-line-update) - (force-mode-line-update t) - (with-current-buffer (other-buffer) - (set-buffer-modified-p (buffer-modified-p))))) - -;;; ************************************************************************ -;;; Private variables -;;; ************************************************************************ - -(defvar Vm-msg-start-regexp "\n\nFrom \\|\n\001\001\001\001" - "Regular expression that begins a Vm mail message.") - -(provide 'hvm)) -(error nil)) - -;; Local Variables: -;; no-byte-compile: t -;; End: - -;;; hvm.el ends here diff --git a/hypb.el b/hypb.el index dda1410240..5157c2d26c 100644 --- a/hypb.el +++ b/hypb.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 6-Oct-91 at 03:42:38 -;; Last-Mod: 18-Feb-24 at 23:50:41 by Mats Lidell +;; Last-Mod: 10-Mar-24 at 11:51:55 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -29,7 +29,6 @@ (defvar mh-e-RCS-id) (defvar pm-version) -(defvar vm-version) (declare-function helm-info "ext:helm") (declare-function helm-apropos "ext:helm") @@ -341,8 +340,6 @@ Use optional OUT-BUF if present, else the current buffer." (when (and (boundp 'hmail:reader) hmail:reader) (insert (format "\tMail Reader: %s\n" (cond ((eq hmail:reader 'rmail-mode) "RMAIL") - ((eq hmail:reader 'vm-mode) - (concat "VM " vm-version)) ((and (eq hmail:reader 'mh-show-mode) (string-match "v ?\\([0-9]+.[0-9]+\\)" mh-e-RCS-id)) diff --git a/hyperbole.el b/hyperbole.el index 2ef83eb0a6..bdcb684403 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -8,7 +8,7 @@ ;; Maintainer: Mats Lidell <ma...@gnu.org> ;; Maintainers: Robert Weiner <r...@gnu.org>, Mats Lidell <ma...@gnu.org> ;; Created: 06-Oct-92 at 11:52:51 -;; Last-Mod: 19-Feb-24 at 12:31:45 by Bob Weiner +;; Last-Mod: 10-Mar-24 at 11:53:00 by Bob Weiner ;; Released: 03-Dec-23 ;; Version: 8.0.2pre ;; Keywords: comm, convenience, files, frames, hypermedia, languages, mail, matching, mouse, multimedia, outlines, tools, wp @@ -432,17 +432,10 @@ frame, those functions by default still return the prior frame." ;; Mh-e (var:append 'mh-inc-folder-hook '(Mh-init)) ;; -;; VM support is based on V5.72 beta of VM. If you have a version of VM -;; earlier than 5.70 beta, you should either upgrade or comment out the -;; following line so that Hyperbole support for VM is not enabled. -(var:append 'vm-mode-hook '(Vm-init)) -;; ;; Hyperbole mail composer support configuration. ;; (var:append 'message-mode-hook (list (lambda () (require 'hsmail)))) (var:append 'mh-letter-mode-hook (list (lambda () (require 'hsmail)))) -(var:append 'vm-mail-mode-hook (list (lambda () (require 'hsmail)))) - ;;; ************************************************************************ ;;; URL Browsing