unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mike Kupfer <kupfer@rawbw.com>
To: emacs-devel@gnu.org
Subject: [PATCH] MH-E: handle removal of mhparam libdir from nmh 1.8
Date: Mon, 16 Jan 2023 16:04:03 -0800	[thread overview]
Message-ID: <152405.1673913843@alto> (raw)

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

nmh 1.8 has not been released yet, but the first release candidate is
out.  I haven't had time to test it yet, but a user has reported that
the mh-version command breaks with it.  That is, mh-version is only able
to report a few things before erroring out on a nil value where a string
was expected.

The attached patch fixes the problem and works on older nmh releases as
well as 1.8.  Is it okay for emacs-29? 

thanks,
mike

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: proposed patch --]
[-- Type: text/x-diff, Size: 1472 bytes --]

From 77baa31a2f2dba1a5c83fc9d74c44628207616b7 Mon Sep 17 00:00:00 2001
From: Mike Kupfer <kupfer@rawbw.com>
Date: Mon, 16 Jan 2023 13:50:49 -0800
Subject: [PATCH] MH-E: handle removal of mhparam libdir from nmh 1.8

* lisp/mh-e/mh-e.el (mh-variant-nmh-info): If "libdir" doesn't
work, try "libexecdir" (SF#491).
---
 lisp/mh-e/mh-e.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 1640c23e002..34c809a5ecd 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -764,6 +764,8 @@ mh-variant-nmh-info
   ;; Sample '-version' outputs:
   ;; mhparam -- nmh-1.1-RC1 [compiled on chaak at Fri Jun 20 11:03:28 PDT 2003]
   ;; install-mh -- nmh-1.7.1 built October 26, 2019 on build-server-000
+  ;; "libdir" was deprecated in nmh-1.7 in favor of "libexecdir", and
+  ;; removed completely in nmh-1.8.
   (let ((install-mh (expand-file-name "install-mh" dir)))
     (when (mh-file-command-p install-mh)
       (erase-buffer)
@@ -774,7 +776,8 @@ mh-variant-nmh-info
               (mh-progs dir))
           `(,version
             (variant        nmh)
-            (mh-lib-progs   ,(mh-profile-component "libdir"))
+            (mh-lib-progs   ,(or (mh-profile-component "libdir")
+                                 (mh-profile-component "libexecdir")))
             (mh-lib         ,(mh-profile-component "etcdir"))
             (mh-progs       ,dir)
             (flists         ,(file-exists-p
-- 
2.30.2


                 reply	other threads:[~2023-01-17  0:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=152405.1673913843@alto \
    --to=kupfer@rawbw.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).