branch: elpa/casual
commit 7465008ea172ebf19933946da2ac5d910ae41a35
Merge: ea32e82b30 0cf4661eb4
Author: Charles Choi <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #224 from
kickingvegas/merge-development-to-main-20250604_110405
Merge development to main 20250604_110405
---
docs/casual.info | 26 +++++++++++++++++---------
docs/casual.org | 10 ++++++++--
lisp/casual-timezone-settings.el | 11 ++++++++++-
lisp/casual-timezone-utils.el | 12 +++++++++---
lisp/casual.el | 18 +++++++++++-------
tests/test-casual-timezone-settings.el | 2 ++
6 files changed, 57 insertions(+), 22 deletions(-)
diff --git a/docs/casual.info b/docs/casual.info
index 072aa56b16..d3ef8b6e48 100644
--- a/docs/casual.info
+++ b/docs/casual.info
@@ -11,7 +11,7 @@ File: casual.info, Node: Top, Next: Motivations, Up: (dir)
Casual User Guide
*****************
-Version: 2.5.0
+Version: 2.5.1
Casual is a project to re-imagine the primary user interface for Emacs
using keyboard-driven menus.
@@ -1186,6 +1186,13 @@ the timezone planner.
These variables can be customized via the Transient menu
‘casual-timezone-settings-tmenu’.
+Zoneinfo Database Configuration
+===============================
+
+The variable ‘casual-timezone-zone-info-database’ is default set to the
+path "/usr/share/zoneinfo/tzdata.zi". Customize this variable if the
+zoneinfo database is located at a different path.
+
File: casual.info, Node: UX Conventions, Next: Customization, Prev: Casual
Modes, Up: Top
@@ -1389,6 +1396,7 @@ File: casual.info, Node: Index, Next: Variable Index,
Prev: Acknowledgments,
* Transient Conventions: Transient Conventions.
(line 6)
* UX Conventions: UX Conventions. (line 6)
+* Zoneinfo Database Configuration: Timezone. (line 88)
File: casual.info, Node: Variable Index, Prev: Index, Up: Top
@@ -1422,14 +1430,14 @@ Node: I-Search24468
Node: Make25629
Node: RE-Builder28013
Node: Timezone31437
-Node: UX Conventions34567
-Node: Customization37268
-Node: Feedback & Discussion37642
-Node: Sponsorship38060
-Node: About38354
-Node: Acknowledgments38631
-Node: Index39013
-Node: Variable Index43280
+Node: UX Conventions34829
+Node: Customization37530
+Node: Feedback & Discussion37904
+Node: Sponsorship38322
+Node: About38616
+Node: Acknowledgments38893
+Node: Index39275
+Node: Variable Index43615
End Tag Table
diff --git a/docs/casual.org b/docs/casual.org
index 4b7d9ca2bf..2a174cf1f6 100644
--- a/docs/casual.org
+++ b/docs/casual.org
@@ -6,7 +6,7 @@
#+OPTIONS: ':t toc:t author:t email:t compact-itemx:t
#+LANGUAGE: en
-#+MACRO: version 2.5.0
+#+MACRO: version 2.5.1
#+TEXINFO_FILENAME: casual.info
#+TEXINFO_HEADER: @syncodeindex pg cp
@@ -860,7 +860,13 @@ The following variables can control how working hours are
displayed in the timez
- ~casual-timezone-working-hour-glyph~ will set the glyph used to denote a
working hour (default is ☼).
- ~casual-timezone-planner-working-highlight~ will set the face used to
highlight a working hour.
-These variables can be customized via the Transient menu
~casual-timezone-settings-tmenu~.
+These variables can be customized via the Transient menu
~casual-timezone-settings-tmenu~.
+
+#+TEXINFO: @unnumberedsec Zoneinfo Database Configuration
+#+CINDEX: Zoneinfo Database Configuration
+
+The variable ~casual-timezone-zone-info-database~ is default set to the path
"/usr/share/zoneinfo/tzdata.zi". Customize this variable if the zoneinfo
database is located at a different path.
+
* UX Conventions
#+CINDEX: UX Conventions
diff --git a/lisp/casual-timezone-settings.el b/lisp/casual-timezone-settings.el
index ae54c63f32..def6187d94 100644
--- a/lisp/casual-timezone-settings.el
+++ b/lisp/casual-timezone-settings.el
@@ -64,7 +64,8 @@
[:class transient-row
(casual-lib-customize-unicode)
- (casual-lib-customize-hide-navigation)]
+ (casual-lib-customize-hide-navigation)
+ ("D" "Zoneinfo DB" casual-timezone--customize-zone-info-database)]
[:class transient-row
(casual-lib-quit-one)
@@ -79,6 +80,14 @@ This customizes the variable
`casual-timezone-working-hour-glyph'."
(interactive)
(customize-variable 'casual-timezone-working-hour-glyph))
+
+(defun casual-timezone--customize-zone-info-database ()
+ "Set path for zoneinfo database.
+
+This customizes the variable `casual-timezone-zone-info-database'."
+ (interactive)
+ (customize-variable 'casual-timezone-zone-info-database))
+
(defun casual-timezone--customize-planner-working-highlight ()
"Set working hour highlight face.
diff --git a/lisp/casual-timezone-utils.el b/lisp/casual-timezone-utils.el
index 8793b0abc1..8dae47eb90 100644
--- a/lisp/casual-timezone-utils.el
+++ b/lisp/casual-timezone-utils.el
@@ -85,6 +85,11 @@ working hour in `casual-timezone-planner'."
:type 'string
:group 'casual)
+(defcustom casual-timezone-zone-info-database "/usr/share/zoneinfo/tzdata.zi"
+ "Path to the tzdata.zi file used by `casual-timezone-zone-info'."
+ :type 'file
+ :group 'casual)
+
(defface casual-timezone-planner-working-highlight
'((((type tty) (class color))
:background "gray25")
@@ -108,8 +113,9 @@ working hour in `casual-timezone-planner'."
This function reads the local zoneinfo database to obtain the
list of timezones.
-This function requires that /usr/share/zoneinfo/tzdata.zi exists
-and that awk is installed."
+This function requires that the zoneinfo database in
+`casual-timezone-zone-info-database' exists and that awk is
+installed."
(unless (not (eq system-type 'windows-nt))
(error "Not available on Windows"))
@@ -119,7 +125,7 @@ and that awk is installed."
nil
(current-buffer)
nil
- "/^Z/ { print $2 }; /^L/ { print $3 }" "/usr/share/zoneinfo/tzdata.zi")
+ "/^Z/ { print $2 }; /^L/ { print $3 }" casual-timezone-zone-info-database)
(split-string (buffer-string))))
(defun casual-timezone-map-local-to-timezone (ts remote-tz)
diff --git a/lisp/casual.el b/lisp/casual.el
index a5cc257776..03bdd17f0c 100644
--- a/lisp/casual.el
+++ b/lisp/casual.el
@@ -5,8 +5,8 @@
;; Author: Charles Choi <[email protected]>
;; URL: https://github.com/kickingvegas/casual
;; Keywords: tools, wp
-;; Version: 2.5.0
-;; Package-Requires: ((emacs "29.1") (transient "0.6.0"))
+;; Version: 2.5.1-rc.1
+;; Package-Requires: ((emacs "29.1") (transient "0.9.0"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -82,6 +82,10 @@
;; An interface for the Emacs regular expression tool.
;; URL:
`https://github.com/kickingvegas/casual/blob/main/docs/re-builder.org'
+;; - Timezone (Elisp library: `casual-timezone')
+;; A library of commands to work with different time zones.
+;; URL: `https://github.com/kickingvegas/casual/blob/main/docs/timezone.org'
+
;; Users can choose any or all of the user interfaces made available by Casual
;; at their pleasure.
@@ -124,11 +128,11 @@
;; must remove that configuration. After doing so, please follow the above
;; instructions for installing `casual'.
-;; If you are using Emacs ≤ 30.0, you will need to update the built-in package
-;; `transient'. By default, `package.el' will not upgrade a built-in package.
-;; Set the customizable variable `package-install-upgrade-built-in' to `t' to
-;; override this. For more details, please refer to the "Install" section on
-;; this project's repository web page.
+;; Casual relies on the latest stable release of `transient' which may differ
+;; from the version that is preinstalled as a built-in. By b default,
`package.el'
+;; will not upgrade a built-in package. Set the customizable variable
+;; `package-install-upgrade-built-in' to `t' to override this. For more
details,
+;; please refer to the "Install" section on this project's repository web page.
;;; Code:
(require 'package)
diff --git a/tests/test-casual-timezone-settings.el
b/tests/test-casual-timezone-settings.el
index 6eef0cc2e3..1472fe54ec 100644
--- a/tests/test-casual-timezone-settings.el
+++ b/tests/test-casual-timezone-settings.el
@@ -37,6 +37,7 @@
(casualt-mock
#'casual-timezone--customize-planner-working-highlight)
(casualt-mock
#'casual-timezone--customize-convert-timestamp-format)
(casualt-mock #'casual-timezone--customize-datestamp-format)
+ (casualt-mock #'casual-timezone--customize-zone-info-database)
(casualt-mock #'casual-timezone--describe-format-time-string))
(let ((test-vectors
@@ -46,6 +47,7 @@
(:binding "c" :command
casual-timezone--customize-convert-timestamp-format)
(:binding "p" :command
casual-timezone--customize-datestamp-format)
(:binding "f" :command
casual-timezone--describe-format-time-string)
+ (:binding "D" :command
casual-timezone--customize-zone-info-database)
(:binding "a" :command casual-timezone-about)
)))