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

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

[elpa] externals/hyperbole f839e99 5/8: Merge branch 'master' of hyperbo


From: Stefan Monnier
Subject: [elpa] externals/hyperbole f839e99 5/8: Merge branch 'master' of hyperbole
Date: Sat, 10 Apr 2021 18:13:12 -0400 (EDT)

branch: externals/hyperbole
commit f839e990764bab00246d52c4f0410a8e1e543227
Merge: 29df377 50bdd18
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    Merge branch 'master' of hyperbole
---
 Changes            | 20 ++++++++++++++++++++
 HY-NEWS            |  6 ++++++
 Makefile           |  4 ++--
 hui-mouse.el       | 29 +++++++++++++++++++++++++++++
 hypb-ert.el        | 45 +++++++++++++++++++++++++++++++++++++++++++++
 man/hkey-help.txt  |  1 +
 man/hyperbole.texi | 25 ++++++++++++++++++++++++-
 7 files changed, 127 insertions(+), 3 deletions(-)

diff --git a/Changes b/Changes
index f01e591..50c247a 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,23 @@
+2021-04-04  Mats Lidell  <matsl@gnu.org>
+
+* HY-NEWS: Section about hypb-ert
+  Makefile (EL_COMPILE, ELC_COMPILE): Add hypb-ert
+  hypb-ert.el (hypb-run-ert-test-symbol, hypb-run-ert-test-selector)
+    (hypb-ert-sym, hypb-ert-sel): Add implicit buttons for running ert
+    tests.
+
+2021-04-03  Mats Lidell  <matsl@gnu.org>
+
+* man/hyperbole.texi (Smart Key - Todotxt Mode): Add node to document
+    Todotxt support
+* HY-NEWS: Add section for Todotxt mode
+* man/hkey-help.txt: Add section about Todotxt mode
+
+2021-04-02  Mats Lidell  <matsl@gnu.org>
+
+* hui-mouse.el (hkey-alist, smart-todotxt, smart-todotxt-assist): Add
+    support for todotxt-mode
+
 2021-03-21  Mats Lidell  <matsl@gnu.org>
 
 * test/hbut-tests.el (hbut-defal-url-%s): Add test for %s format-style.
diff --git a/HY-NEWS b/HY-NEWS
index 7e6bb84..267f52e 100644
--- a/HY-NEWS
+++ b/HY-NEWS
@@ -97,6 +97,9 @@
       fixed case, so that the case of a value with both upper and lower
       case characters is never changed, for example a value of ${HOME}.
 
+    - Todotxt Mode Support: Smart key support for the todotxt mode
+      https://github.com/rpdillon/todotxt.el.
+
   ACE WINDOW PACKAGE INTEGRATION - fast window and buffer switching
 
     - After installing the ace-window package and loading Hyperbole, execute
@@ -117,6 +120,9 @@
       pass.  If any fail, you can press the Action Key to see the source of
       the failure.
 
+    - Defal implicit buttons hypb-ert-sym and hypb-ert-sel: For running
+      hyperbole ert test from hyperbole source files.
+
 ===========================================================================
 *                                   V7.1.3
 ===========================================================================
diff --git a/Makefile b/Makefile
index cca104e..cef80dc 100644
--- a/Makefile
+++ b/Makefile
@@ -159,7 +159,7 @@ EL_COMPILE = hact.el hactypes.el hargs.el hbdata.el 
hbmap.el hbut.el \
             hpath.el hrmail.el hsettings.el hsmail.el hsys-org.el hsys-www.el 
htz.el \
             hycontrol.el hui-jmenu.el hui-menu.el hui-mini.el hui-mouse.el 
hui-select.el \
             hui-treemacs.el hui-window.el hui.el hvar.el hversion.el hvm.el 
hypb.el hyperbole.el \
-            hyrolo-demo.el hyrolo-logic.el hyrolo-menu.el hyrolo.el 
hywconfig.el set.el
+            hyrolo-demo.el hyrolo-logic.el hyrolo-menu.el hyrolo.el 
hywconfig.el set.el hypb-ert.el
 
 EL_KOTL = kotl/kexport.el kotl/kfile.el kotl/kfill.el kotl/kimport.el 
kotl/klabel.el \
          kotl/klink.el kotl/kmenu.el kotl/knode.el kotl/kotl-mode.el 
kotl/kotl-orgtbl.el \
@@ -175,7 +175,7 @@ ELC_COMPILE =  hactypes.elc hibtypes.elc hib-debbugs.elc 
hib-doc-id.elc hib-kbd.
             hycontrol.elc hui-jmenu.elc hui-menu.elc hui-mini.elc 
hui-mouse.elc hui-select.elc \
             hui-treemacs.elc hui-window.elc hui.elc hvar.elc hversion.elc 
hvm.elc hypb.elc hyperbole.elc \
             hyrolo-demo.elc hyrolo-logic.elc hyrolo-menu.elc hyrolo.elc 
hywconfig.elc \
-            set.elc kprop-em.elc
+            set.elc kprop-em.elc hypb-ert.elc
 
 ELC_KOTL = kotl/kexport.elc kotl/kfile.elc kotl/kfill.elc kotl/kimport.elc 
kotl/klabel.elc \
           kotl/klink.elc kotl/kmenu.elc kotl/knode.elc kotl/kotl-mode.elc 
kotl/kotl-orgtbl.elc \
diff --git a/hui-mouse.el b/hui-mouse.el
index 2774b64..af25e23 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -382,6 +382,10 @@ Its default value is #'smart-scroll-down."
     ;; Outline minor mode is on and usable.
     ((and (boundp 'outline-minor-mode) outline-minor-mode) .
      ((smart-outline) . (smart-outline-assist)))
+    ;;
+    ;; Todotxt
+    ((eq major-mode 'todotxt-mode) .
+     ((smart-todotxt) . (smart-todotxt-assist)))
     )
   "Alist of predicates and form-conses for the Action and Assist Keyboard Keys.
 Each element is: (predicate-form . (action-key-form . assist-key-form)).
@@ -1601,6 +1605,31 @@ CURR-ENTRY-LEVEL is not needed."
         (and selective-display (eq (following-char) ?\r)))
     t))
 
+;;; ************************************************************************
+;;; smart-todotxt functions
+;;; ************************************************************************
+
+(defun smart-todotxt ()
+  "Use a single key or mouse key to manipulate `todotxt' items.
+
+If key is pressed:
+ (1) at the end of buffer, bury buffer
+ (2) on a todo item, toggle the completion"
+  (interactive)
+  (cond ((eobp) (todotxt-bury))
+       (t (todotxt-complete-toggle))))
+
+(defun smart-todotxt-assist ()
+  "Use a single assist-key or mouse assist-key to manipulate `todotxt' items.
+
+If key is pressed:
+ (1) at the end of buffer, archive completed items
+ (2) on a todo item, edit it"
+
+  (interactive)
+  (cond ((eobp) (todotxt-archive))
+       (t (todotxt-edit-item))))
+
 (defun smart-eolp ()
   "Return t if point is at the end of a visible line but not the end of the 
buffer."
   ;; smart-helm handles eol for helm buffers
diff --git a/hypb-ert.el b/hypb-ert.el
new file mode 100644
index 0000000..623206d
--- /dev/null
+++ b/hypb-ert.el
@@ -0,0 +1,45 @@
+;;; hypb-ert --- ert button support                   -*- lexical-binding: t; 
-*-
+
+;; Author: Mats Lidell <matsl@gnu.org>
+;;
+;; Orig-Date: 31-Mar-21 at 21:11:00
+;;
+;; Copyright (C) 2021  Free Software Foundation, Inc.
+;; See the "HY-COPY" file for license information.
+;;
+;; This file is part of GNU Hyperbole.
+
+;;; Commentary:
+
+;; Defines an implicit button for running an ert test
+;;
+;; Example:
+;;   Run the test hbut-defal-url
+;;   <hypb-ert-sym hbut-defal-url>
+;;
+;;   Run the tests specified by the test selector hbut-defal
+;;   <hypb-ert-sel hbut-defal>
+;;
+;;   Run all tests
+;;   <hypb-ert-sel t>
+
+;;; Code:
+
+(require 'hbut)
+(require 'hargs)
+
+(defun hypb-run-ert-test-symbol (test-symbol)
+  "Run the specified TEST-SYMBOL ert test."
+  (mapc 'load-file (directory-files "test" t "\\.el$"))
+  (ert (intern test-symbol)))
+
+(defun hypb-run-ert-test-selector (test-selector)
+  "Run the specified TEST-SELECTOR defined ert test."
+  (mapc 'load-file (directory-files "test" t "\\.el$"))
+  (ert test-selector))
+
+(defal hypb-ert-sym 'hypb-run-ert-test-symbol)
+(defal hypb-ert-sel 'hypb-run-ert-test-selector)
+
+(provide 'hypb-ert)
+;;; hypb-ert.el ends here
diff --git a/man/hkey-help.txt b/man/hkey-help.txt
index 9f08d24..80c20c7 100644
--- a/man/hkey-help.txt
+++ b/man/hkey-help.txt
@@ -109,6 +109,7 @@ Hyperbole Key Press/Click in Special Modes
   Man Apropos                   Displays man page entry    <- same
   Man Pages                     Follows cross refs, file refs and C code refs
   I/Buffer Menu                 Saves, deletes and displays buffers
+  Todotxt Mode                  Toggle item completion     Edit and archive 
items
 
 Emacs Info Reader
   Menu Entry or Cross Ref       To referent                <- same
diff --git a/man/hyperbole.texi b/man/hyperbole.texi
index 873619a..60e6d11 100644
--- a/man/hyperbole.texi
+++ b/man/hyperbole.texi
@@ -481,6 +481,7 @@ Smart Keyboard Keys
 * Smart Key - Gomoku Game::
 * Smart Key - Magit Mode::
 * Smart Key - The OO-Browser::
+* Smart Key - Todotxt Mode::
 * Smart Key - Default Context::
 
 @end detailmenu
@@ -8531,6 +8532,7 @@ If dragged from an Emacs window to outside of Emacs:
 * Smart Key - Gomoku Game::
 * Smart Key - Magit Mode::
 * Smart Key - The OO-Browser::
+* Smart Key - Todotxt Mode::
 * Smart Key - Default Context::
 @end menu
 
@@ -9820,7 +9822,28 @@ When pressed on an identifier within an OO-Browser 
source file:
 @end group
 @end format
 
-@node Smart Key - Default Context,  , Smart Key - The OO-Browser, Smart 
Keyboard Keys
+
+@node Smart Key - Todotxt Mode,  Smart Key - Default Context,  Smart Key - The 
OO-Browser,  Smart  Keyboard Keys
+@subsection Smart Key - Todotext Mode
+
+@cindex todotxt-mode
+todotxt-mode is an add-on package for editing todo.txt files using
+the todotxt-format. For the file format see http://todotxt.org/.
+
+@format
+@group
+If pressed within a Todotext mode buffer:
+  ACTION KEY
+    (1) at the end of buffer, bury the buffer.
+    (2) on a todo item, toggle the completion status of the todo item
+  ASSIST KEY
+    (1) at the end of buffer, archive all completed todo items
+    (2) on a todo item, edit the item
+@end group
+@end format
+
+
+@node Smart Key - Default Context,  , Smart Key - Todotxt Mode, Smart Keyboard 
Keys
 @subsection Smart Key - Default Context
 @vindex action-key-default-function
 @vindex assist-key-default-function



reply via email to

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