mu4e: update transient support

We can now rely on transient being available.
This commit is contained in:
Dirk-Jan C. Binnema
2026-02-14 10:25:32 +02:00
committed by Seth Ladygo
parent 3b2ee0bbc7
commit cad56e9587
4 changed files with 38 additions and 18 deletions

View File

@ -1,4 +1,4 @@
## Copyright (C) 2022-2025 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
## Copyright (C) 2022-2026 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
##
## 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
@ -94,8 +94,7 @@ endif
#
#... so let's not do that!
# byte compile the sources that can be byte-compiled. This may exclude mu4e-transient.el and
# mu4e-dbus.el
# byte compile the sources that can be byte-compiled. This may exclude mu4e-dbus.el
foreach src : mu4e_bc_srcs
target_name= '@BASENAME@.elc'
target_path = join_paths(meson.current_build_dir(), target_name)

View File

@ -1,13 +1,32 @@
;;; mu4e-transient.el --- -*- coding: utf-8; lexical-binding: t -*-
;;
;; Copyright (C) 2025 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
;;; mu4e.el --- Mu-based mua for emacs -*- lexical-binding: t -*-
;; Copyright (C) 2025-2026 Dirk-Jan C. Binnema
;; Author: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
;; Maintainer: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
;; This file is not part of GNU Emacs.
;; SPDX-License-Identifier: GPL-3.0-or-later
;; mu4e is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; mu4e is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with mu4e. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;;
;;; Define "transients" for some mu4e functionality.
;;; Define a "transient" menu for some mu4e functionality.
;;; Code:
(require 'mu4e)
(require 'mu4e-bookmarks)
(require 'mu4e-compose)
(require 'mu4e-draft)
@ -20,6 +39,9 @@
;; Helpers.
(declare-function mu4e "mu4e")
(defun mu4e--toggle-description(name val)
"Return a string for a transient toggle with NAME.
Show On/Off based on value VAL."
@ -137,6 +159,9 @@ toggle-function is created."
;;("a" "archive")
]])
;;;###autoload(autoload 'mu4e-transient-menu "mu4e-transient" nil t)
(transient-define-prefix mu4e-transient-menu()
"Mu4e main menu."
[["Main"

View File

@ -45,6 +45,7 @@
(require 'mu4e-notification)
(require 'mu4e-server) ;; communication with backend
(require 'mu4e-transient)
(when mu4e-speedbar-support
(require 'mu4e-speedbar)) ;; support for speedbar
(when mu4e-org-support

View File

@ -3624,13 +3624,8 @@ the counts to latest known ones. When in the main-view, you can use
@section Transient
@cindex transient
@code{mu4e} has experimental support for the ``transient'' menus, as per
@ref{(transient) Top}. Because ``transient'' is not automatically available in
all Emacs version that @code{mu4e} support, you need to manually enable it:
@lisp
(when (require 'mu4e-transient nil 'noerror)
(global-set-key (kbd "C-c m") mu #'mu4e-transient-menu))
@end lisp
@code{mu4e} has support for the ``transient'' menus, as per @ref{(transient)
Top}, through @kbd{M-x mu4e-transient-menu}, or bind it to some key.
@node Desktop notifications
@section Desktop notifications