Re: [PATCH] improve notmuch-hello layout

2023-07-22 Thread David Bremner
Rudolf Adamkovič  writes:

> ---
>  emacs/notmuch-hello.el | 22 +++---
>  1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index 3235f555..f245a7dd 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -383,6 +383,10 @@ supported for \"Customized queries section\" items."
>  (defvar notmuch-hello-first-run t
>"True if `notmuch-hello' is run for the first time, set to nil 
> afterwards.")
>  
> +(defvar notmuch-hello-scheduled-to-run nil
> +  "True if `notmuch-hello' is scheduled to run during the next
> +re-display, and set to nil afterwards.")

The control flow here is already pretty complicaed. I hope that we can
simplify it (drop use run-at-time) before adding any more features.
___
notmuch mailing list -- [email protected]
To unsubscribe send an email to [email protected]


Re: [PATCH] improve notmuch-hello layout

2023-07-09 Thread David Bremner
Rudolf Adamkovič  writes:
>
> Rudy
> From 278017d06bb986f4ec99118bfcfdec8dab970f2b Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
> Date: Thu, 25 May 2023 16:22:08 +0200
> Subject: [PATCH 1/2] emacs: fix notmuch-hello layout when
>  display-line-numbers-mode is on
>
> ---
>  emacs/notmuch-hello.el | 25 +++--
>  1 file changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index 4662e704..3235f555 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -412,6 +412,7 @@ supported for \"Customized queries section\" items."
>  (defun notmuch-search-item-field-width ()
>(max 8 ; Don't let the search boxes be less than 8 characters wide.
> (- (window-width)
> +   (line-number-display-width)

This seems like a harmless change, except that we claim to support emacs
25.1. The function #'line-number-display-width is apparently from emacs
26.1. I don't honestly know if the code even works in emacs 25 anymore,
perhaps we should bump the minimum version requirement. Or you could
make this change conditional on version somehow. The fact that you have
to update 7 places in the code makes me wonder if the calculation should
be collected into a function, so that the next change can be done more easily.
___
notmuch mailing list -- [email protected]
To unsubscribe send an email to [email protected]