lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 3299d70 2/2: Sidestep a vim regression


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 3299d70 2/2: Sidestep a vim regression
Date: Sun, 27 Sep 2020 14:39:30 -0400 (EDT)

branch: master
commit 3299d7051e2bf0b64e459fcda4c9db663d181b4e
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Sidestep a vim regression
    
    This command
      vim -es -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q'
    used to work in the chroot setup scripts, but now fails with
      No protocol specified
    Apparently vim used to run that command successfully even with no GUI
    support available, but no longer does. Added '|| echo ...' to let it
    fail without exiting the script due to 'set -e'.
    
    This regression cannot be worked around by adding '-X'. Installing
    'vim-nox' after 'vim-gtk3' has been installed, and then rerunning the
    command, doesn't work around the problem. Installing 'vim-nox' first,
    then running the command, then installing 'vim-gtk3' works; but that's
    not an appealing solution, because:
      - 'lmi_setup_20.sh' installs vim for all users, then
      - 'lmi_setup_25.sh' runs that command for each user
    and it is seems unreasonable to add an 'lmi_setup_26.sh' script to
    upgrade all users from 'vim-nox' to 'vim-gtk3'.
---
 lmi_setup_25.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lmi_setup_25.sh b/lmi_setup_25.sh
index 72f1153..fe6cfc1 100755
--- a/lmi_setup_25.sh
+++ b/lmi_setup_25.sh
@@ -42,10 +42,15 @@ cp -a .vimrc ~
 # Without this, 'zg' gives an error message; with it, vim creates a
 # spellfile the first time 'zg' is used, if none already exists.
 # But it's a much better idea to install a mature spellfile and
-# (imperatively) run 'mkspell':
+# (imperatively) run 'mkspell'. However, 'vim-gtk (2:8.2.0716-3)'
+# balks at doing that automatically here:
+#  - as given: "No protocol specified"
+#  - with '-X' or '-v': silently returns 1
+# so it might need to be done manually later.
 mkdir -p ~/.vim/spell
 cp -a en.utf-8.add ~/.vim/spell/en.utf-8.add
-vim -es -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q'
+vim -es -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q' ||
+  echo "Run ':mkspell! ~/.vim/spell/en.utf-8.add' manually."
 
 # Configure git. See:
 #   https://lists.nongnu.org/archive/html/lmi/2016-03/msg00006.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]