mu4e-headers-buffer-name variable void on mu 1.6.10-1 (Ubuntu LTS)
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### I confirm that...
- [X] I have searched the [issue tracker](https://github.com/doomemacs/doomemacs/issues), [documentation](https://docs.doomemacs.org), [FAQ](https://docs.doomemacs.org/-/faq), [Discourse](https://discourse.doomemacs.org), and [Google](https://google.com), in case this issue has already been reported/resolved.
- [X] I have read "[How to Debug Issues](https://doomemacs.org/d/how2debug)", and will use it to provide as much information about this issue as possible.
- [X] The issue can be reproduced on the **latest** available commit of Doom.
- [X] The issue can be reproduced on a stable release of Emacs, such as 27 or 28. *(Doom does not support development builds like 29+ or any version ending in .50 or .9x)*
### Expected behavior
When opening any mail view buffer of mu4e (`M-x mu4e` then say `bt` for today's emails), I should switch to the mu4e headers view to see emails.
### Current behavior
Buffer doesn't open, due to void variable:
> Symbol’s value as variable is void: mu4e-headers-buffer-name [4 times]
Behaviour started ~a week ago, since I updated doom to latest (last update 6 weeks before)
---
Couldn't get a backtrace out of this (post-command-hook failed) but I got plenty of details otherwise:
I've checked the buffer variable `mu4e-headers-buffer-name` exists on mu4e codebase as of [this commit](https://github.com/djcb/mu/commit/9157d9102d96d06d7cc39a8dee73f4d928c46bfe#diff-06a824e134b290af28c381d257da143ccfc6c4d64493108eb7b5d7f62fb845d9L752), where it was moved/changed from `mu4e~headers-buffer-name` (notice tilda) to `mu4e-headers-buffer-name`.
This "bad" variable name is used in on place of doom: the `mu4e/config.el` file since this commit: https://github.com/doomemacs/doomemacs/commit/2662d68ae89cf782351fa7801ef8a77087e07bad = #6825.
Commit was done 23 days ago, matching with my timeline of 6 weeks ago worked vs now broken.
Seems the packaged version of mu4e in Ubuntu 22.04 (version 1.6.10-1) doesn't have the latest mu4e variable names, and that assumption wasn't checked by the fix made.
I have locally fixed it via the following patch:
```patch
From 4f8d6202e560d3a6696c9770cd0eef7949ff1665 Mon Sep 17 00:00:00 2001
From: Jb DOYON
Date: Thu, 13 Oct 2022 12:28:54 +0100
Subject: [PATCH] fix(mu4e): wrong variable name voids on old mu
---
modules/email/mu4e/config.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el
index 78215733..8e429b04 100644
--- a/modules/email/mu4e/config.el
+++ b/modules/email/mu4e/config.el
@@ -248,7 +248,9 @@ is non-nil."
"Expand the mu4e-headers containing frame's width to `+mu4e-min-header-frame-width'."
(dolist (frame (frame-list))
(when (and (string= (buffer-name (window-buffer (frame-selected-window frame)))
- mu4e-headers-buffer-name)
+ ;; mu4e-headers-buffer-name not found in older mu4e, introduced in this change:
+ ;; https://github.com/djcb/mu/commit/9157d9102d96d06d7cc39a8dee73f4d928c46bfe#diff-06a824e134b290af28c381d257da143ccfc6c4d64493108eb7b5d7f62fb845d9L752
+ mu4e~headers-buffer-name)
(< (frame-width) +mu4e-min-header-frame-width))
(set-frame-width frame +mu4e-min-header-frame-width))))
(add-hook 'mu4e-headers-mode-hook #'+mu4e-widen-frame-maybe)
--
2.34.1
```
Suggest we explore some kind of `if mu4e_version < 1.7.x: buf_prefix="mu4e~"; else buf_prefix="mu4e-";`?
Also suggest testing doom emacs with mu4e from packaged Ubuntu (LTS), but that's a whole bigger affair, maybe not worth.
### Steps to reproduce
1. Using Ubuntu 22.04 (LTS) mu package (`apt install maildir-utils`, currently version 1.6.10-1)
2. Open (doom) Emacs
3. Open mu4e (`M-x mu4e`)
4. Jump to any header view (e.g. today's: `bt`)
5. Observe void-variable in `*Messages*` instead of headers buffer showing
### System Information
https://pastebin.com/2jkjj0E6
Contributor guide
Research direction
Start in modules/email/mu4e/config.el, especially the frame-width hook that refers to the headers buffer name, and reproduce the failure with mu4e from Ubuntu 22.04's 1.6.10-1 package. Compare the available mu4e variable names across the affected and newer versions; done means opening a headers view succeeds on the supported versions without a void-variable error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs-lisp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100