On Mon, Sep 18, 2023 at 05:03:36PM +0200, Vincent Lefevre wrote:
> Package: mmm-mode
> Version: 0.5.9-2
> Severity: important
> Tags: patch
>
> The conflict with xemacs21 is not acceptable as it prevents the
> installation of mmm-mode on machines with both emacs-gtk and xemacs21
> installed (typically multi-user machines).
Hi, Vincent.
Fully agree. I think this is something that should be quickly addressed.
> It appears that disabling the xemacs flavors avoids the installation
> failure (see attached patch, which removes the conflict and patches
> mmm-mode.emacsen-install to disable the xemacs flavors and do some
> cleanup); apel and flim do something similar:
>
> case $FLAVOR in
> *xemacs*|emacs2[0-3]|emacs1?|mule2)
> exit 0
> ;;
> esac
Tested your patch and verified that works.
For the records, when triaging bug report I have been playing with
mmm-mode.emacsen-install to rewrite some parts to my taste. I am attaching
it in case maintainer finds something useful in it. It currently disables
XEmacs, but this can be easily modified in case it is supported again.
Instalation tested only for Emacs.
> and ditto for w3m-el:
>
> case $FLAVOR in
> *xemacs*|emacs2[0-5]|emacs1?|mule2)
> exit 0
> ;;
> esac
I do not see problems with w3m-el.
> Note that mmm-mode.emacsen-remove still has a comment about xemacs,
> but I suppose that this doesn't matter.
I think this is OK in case XEmacs is supported again or for upgrades from
previous versions where XEmacs was supported.
Regards,
--
Agustin
#!/bin/sh -e
package=mmm-mode
# Common lisp files
FILES="mmm-auto.el mmm-class.el mmm-cmds.el mmm-compat.el mmm-cweb.el
mmm-defaults.el mmm-erb.el mmm-mason.el mmm-mode.el mmm-myghty.el mmm-noweb.el
mmm-region.el mmm-rpm.el mmm-sample.el mmm-univ.el mmm-utils.el mmm-vars.el"
# Flavour dependent lisp files
XFILES=""
FLAVOR="$1"
case "$FLAVOR" in
emacs)
SITEFLAG="--no-site-file"
;;
xemacs*)
# Temporarily disable XEmacs byte-compilation
echo "install/${package}: Skipping byte-compilation for $FLAVOR"
exit 0
SITEFLAG="-no-site-file"
XFILES="cl-lib.el"
;;
emacs*)
# Do not byte-compile for other emacsen flavors
echo "install/${package}: Skipping byte-compilation for $FLAVOR"
exit 0
;;
*)
echo install/${package}: Ignoring emacsen flavor [${FLAVOR}]
exit 0
;;
esac
echo "install/mmm-mode: byte-compiling for ${FLAVOR}"
# e25 makes things stale and unflavoured, just emacs and source dir == compile
dir
# before that flavours emacs24, xemacs21 etc.
mkdir -p /usr/share/${FLAVOR}/site-lisp/mmm-mode
for i in $FILES; do
if [ ! -f /usr/share/${FLAVOR}/site-lisp/mmm-mode/$i ]; then
ln -s /usr/share/emacs/site-lisp/mmm-mode/$i
/usr/share/${FLAVOR}/site-lisp/mmm-mode
fi
done
cd /usr/share/${FLAVOR}/site-lisp/mmm-mode
cat <<EOF > path.el
(setq load-path (cons "." load-path) byte-compile-warnings nil)
EOF
${FLAVOR} -q ${SITEFLAG} -batch -l path.el -f batch-byte-compile $FILES
${XFILES}
rm -f path.el
exit 0;