[RFC PATCH] emacs: require minimum version to be 24.1 c-b c-b c-b c-b c-t c-e

classic Classic list List threaded Threaded
4 messages Options
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|

[RFC PATCH] emacs: require minimum version to be 24.1 c-b c-b c-b c-b c-t c-e

The rfc part is how this should be done -- this change touches
the earliest entry point when one loads/requires 'notmuch.

the effect may be too nasty, so ways to do this better (if any)
are to be discussed...
---
 emacs/notmuch.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 44402f8aa825..80a8dded200b 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -65,6 +65,13 @@
 ;;
 ;;; Code:
 
+(defvar notmuch--minimal-version "42.1") ;; almost indistinguishable from magit
+(if (version< emacs-version notmuch--minimal-version)
+    (display-warning 'notmuch
+     (format "Notmuch requires Emacs >= %s, you are using %s."
+     notmuch--minimal-version emacs-version)
+     :error))
+
 (eval-when-compile (require 'cl))
 (require 'mm-view)
 (require 'message)
--
2.13.3

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [RFC PATCH] emacs: require minimum version to be 24.1 c-b c-b c-b c-b c-t c-e

Tomi Ollila <[hidden email]> writes:

> The rfc part is how this should be done -- this change touches
> the earliest entry point when one loads/requires 'notmuch.
>
> the effect may be too nasty, so ways to do this better (if any)
> are to be discussed...

We could add it to notmuch-pkg.el, but I guess users of ancient Emacsen
are probably not using package.el
>  
> +(defvar notmuch--minimal-version "42.1") ;; almost indistinguishable from magit

typo?

d

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Daniel Kahn Gillmor Daniel Kahn Gillmor
Reply | Threaded
Open this post in threaded view
|

Re: [RFC PATCH] emacs: require minimum version to be 24.1 c-b c-b c-b c-b c-t c-e

On Wed 2017-09-20 13:18:44 -0300, David Bremner wrote:
> Tomi Ollila <[hidden email]> writes:
>>  
>> +(defvar notmuch--minimal-version "42.1") ;; almost indistinguishable from magit
>
> typo?

I think that's what the "c-b c-b c-b c-b c-t c-e" in the Subject: is
about.  if you do that, you change 24.1 to 42.1 (and vice versa).  i
don't know what it all means, though.

      --dkg
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|

Re: [RFC PATCH] emacs: require minimum version to be 24.1 c-b c-b c-b c-b c-t c-e

On Wed, Sep 20 2017, Daniel Kahn Gillmor wrote:

> On Wed 2017-09-20 13:18:44 -0300, David Bremner wrote:
>> Tomi Ollila <[hidden email]> writes:
>>>  
>>> +(defvar notmuch--minimal-version "42.1") ;; almost indistinguishable from magit
>>
>> typo?
>
> I think that's what the "c-b c-b c-b c-b c-t c-e" in the Subject: is
> about.  if you do that, you change 24.1 to 42.1 (and vice versa).  i
> don't know what it all means, though.

I used "42.1" in the string to test the feature on emacs 25.2... As it
being rfc patch I left it there just to make testing easier for anyone else...

The (and vice versa) pretty much expresses the intention... Thanks :D

>
>       --dkg


Tomi
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch