From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pal Gloss Newsgroups: gmane.emacs.bugs Subject: bug#49924: 28.0.50; `package-quickstart-refresh' fails for "long" (according to `print-length') `package-alist' Date: Sat, 7 Aug 2021 10:45:37 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="649"; mail-complaints-to="usenet@ciao.gmane.io" To: 49924@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 07 10:46:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCHyA-000AWg-F1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Aug 2021 10:46:14 +0200 Original-Received: from localhost ([::1]:45852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCHy8-0002fh-FK for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Aug 2021 04:46:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCHxz-0002fW-6Q for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 04:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40386) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCHxy-0008HF-W0 for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 04:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCHxy-0005nH-Ia for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 04:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pal Gloss Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Aug 2021 08:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49924 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162832594722238 (code B ref -1); Sat, 07 Aug 2021 08:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Aug 2021 08:45:47 +0000 Original-Received: from localhost ([127.0.0.1]:51932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCHxj-0005mb-4s for submit@debbugs.gnu.org; Sat, 07 Aug 2021 04:45:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCHxe-0005mO-Dk for submit@debbugs.gnu.org; Sat, 07 Aug 2021 04:45:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCHxe-0002ev-26 for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 04:45:42 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:42489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCHxb-0007vU-TF for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 04:45:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1628325937; bh=zw1U4iS9JFfo4sE4LmUe/Lwgl/i+MHDJS+HaSJmZgBc=; h=X-UI-Sender-Class:From:To:Subject:Date; b=YB31GeMUgkzMb8cB//UdGPZo0bSHO9jLRwha8xuT3w1Buir23hn5u6VZaoX7NDey6 fkhasWtsnr9VZfRkTx1i7GLOOjanxoGzabb8jnqjjjTlvkG8+KHjtZGBiYYbJDuDq6 R+T0hbND0c5V3EAS08MMSx7Jg+EogboBq9iE76UA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [81.245.63.7] ([81.245.63.7]) by web-mail.gmx.net (3c-app-mailcom-bs08.server.lan [172.19.170.176]) (via HTTP); Sat, 7 Aug 2021 10:45:37 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:sYopMcZmeSY1JLd2UNxhk9vBWjNaII/OntaR5UEKxCxGFmVh4NdXZWhui7UCnN21WGDPy aaE9srewrkITqbjsKXA/Q0OEr/ub2dA5rO5HSwcP8iBtuf63cEy8/s5kqHmoR14OUAOG03bv6K4o MEeqhMVFId0Qwiii8PvNUlQbkpzyrysWMIZq/tpZgpOhOF4nNpbm17DvKG3CiUVWkUIcn74CMdsO ECz03HCqtW/j65D0hC5smYcKCllHuaLIvkVFViivK4MpA+DN4R3lHA4gxfMoilpMGe4P68eNunK5 3s= X-UI-Out-Filterresults: notjunk:1;V03:K0:uBHrAAHAvEY=:UAur828P5hUBV8k6jYtEzv jWSC69M3WypiigaIGMsL7LBkqNcuJwCOm2lsnQQ33oX55JKUFbjwHy+S2/yR+t8yNXrqOsaIe 2+AMzT63DywIM9JX8QVDt0hzubBNufhLBEkSW8n7JPfhfVE9L1tckHGyQD7VgzsFPt0Ecn+5D fyVm+tJ3mBqyqHH/owqCFsZS2a1XwiGNxVxxc/Ee4/wHHkwL1S5N5wFnlyRct7D40kSeTe3E1 5NShMvKon9+SsK+ER9zluRTcGWQHbIbqDNNaOBEHqsJlsZyvt3a5DjMvOR4cFrMt3XlU2PBjF Y+Neh0PsJxFYyl6viaKMb+hXNJi/KvNJiti075Sf+hhMuC4iyVP6k/r8Iwaj7pZ7S+iL0v7Yp nm+uSEIPQ7gLu0Jc2ZvKx2ZOTkTPJom1fWxdiFZ2PLnIGJ/XU/mzPwXH02fvfDGTb4hevtQ/y 3O9Rw2Dg6kmQtbbsXeJfTnFbNtdqSufSrBkS/8hmFN6qqhGxqWm+OLNzboknKsnnBXHjqe3Nl ojQ0yuYRtKNZLE4+KuV70jD+G+LpK6N1Z2kNmYrhQu3j41tfdFxtzjRqThG9hUqbPit1Bg3Ru rohztUZ87YdLEQsNzDr3jV+h5DE0mEETQfrsqzzDgKMobfmk+I/UIoioHCZ5LFNtpKwKvO6oj kWdBJj16gTIVt5mcynjt12toA+Tb3oXF2E45kJZIJ5vipwKDcaKJ81DirMlOUwYSNwqMsBLJU xDMT1a6VAtZ9DylFwFbloyH8z2nBSt9u/sOxli9lW4SyeMtm8bOUwJhsl0ytgg3371EeybzN Received-SPF: pass client-ip=212.227.15.19; envelope-from=pcfeb0009@gmx.com; helo=mout.gmx.net X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211361 Archived-At: Following #49922, I was able to diagnose & fix an issue with `package-quickstart-refresh' when `print-length' is lower than `(length package-activated-list)'=2E There are two possible user-visible symptoms, caused by the presence of the "=2E=2E=2E" ellipsis in the `package-quickstart-file': 1=2E A warning in *Compile-Log* about a free variable =E2=80=98\=2E\=2E\= =2E=E2=80=99 2=2E When restarting emacs, an error message about a missing package named "=2E=2E=2E" I did not make any experiments, but I am pretty sure that it also would be possible to produce a broken `package-quickstart-file' with `print-level' suitably low (1 or 2, maybe even 3?)=2E ;; !!! This reproduction scenario ruins your !!! ;; !!! $HOME/=2Eemacs=2Ed/package-quickstart=2Eel unless you are careful != !! ;; !!! Run it with: !!! ;; env HOME=3D/tmp emacs -Q (let ((print-length 2)) (require 'package) (package-quickstart-refresh)) ;; There is a warning in *Compile-Log* ;; ;; Compiling file c:/msys64/tmp/=2Eemacs=2Ed/package-quickstart=2Eel at Sa= t Aug 7 10:09:10 2021 ;; Entering directory =E2=80=98c:/msys64/tmp/=2Eemacs=2Ed/=E2=80=99 ;; package-quickstart=2Eel:4:30: Warning: reference to free variable =E2= =80=98\=2E\=2E\=2E=E2=80=99 Now look inside the generated "package-quickstart=2Eel" with (find-file package-quickstart-file) And you will see "(setq package-activated-list =2E=2E=2E)" (literally with= 3 dots) instead of "(setq package-activated-list (append ))"=2E There is another way to reproduce it that can work with a more "likely" (or reasonable) value of `print-length', but this is not with `emacs -Q' because it requires a non-NIL `package-alist', i=2Ee=2E an existing emacs configuration with some outside packages: ;; !!! This reproduction scenario ruins your !!! ;; !!! `package-quickstart-file'=2E Regenerate it afterwards=2E !!! ;; Assuming you have at least 4 external packages activated in ;; your configuration (progn (package-initialize) (let ((print-length (- (length package-alist) 1))) (package-quickstart-refresh))) Now look inside the generated "package-quickstart=2Eel" with (find-file package-quickstart-file) And you will see that a package named "=2E=2E=2E" is added to the `package-activated-list'=2E Next time you start emacs, the package initialization will fail because there is no such package=2E My work-around is to rebind `print-level' and `print-length' before calling `package-quickstart-refresh' (I do so periodically in the background): ;; -------- From my early-init=2Eel file -------- ;; Enable package quickstart =2E=2E=2E (funcall (or (get 'package-quickstart 'custom-set) 'set-default) 'package-quickstart t) ;; =2E=2E=2E and make sure it stays up to date (run-with-idle-timer 120 ; seconds 'repeat (lambda () (let (;; don't abbreviate lists: the `package-activated-list' is long a= nd ;; needs to be complete, otherwise Emacs will search for a packag= e ;; called "=2E=2E=2E"=2E (print-length nil) ;; I haven't had a problem with it yet, but better safe than sorr= y=2E (print-level nil)) (package-quickstart-refresh)))) ;; -------- End of my early-init=2Eel file -------- In GNU Emacs 28=2E0=2E50 (build 1, x86_64-w64-mingw32) of 2021-08-06 built on Repository revision: 0afab352e02d7070a8ced2af53c1d01217400cdf Repository branch: master Windowing system distributor 'Microsoft Corp=2E', version 6=2E3=2E9600 System Description: Microsoft Windows 8=2E1 (v6=2E3=2E0=2E9600=2E20069) Configured using: 'configure --with-xml2 --with-zlib --without-pop --prefix=3D/home/username/emacs-native-comp/dest --without-compress-install --without-dbus --with-native-compilation --with-modules 'CFLAGS=3D-O2 -g3' PKG_CONFIG_PATH=3D/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB Important settings: value of $LC_CTYPE: fr_FR=2EUTF-8 value of $LANG: en_US=2EUTF-8 locale-coding-system: cp1252 Major mode: ELisp/l Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found=2E Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils modus-vivendi-theme modus-themes pcase compile text-property-search comint ansi-color ring pp info finder-inf package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source eieio eieio-core eieio-loaddefs password-cache json map url-vars comp comp-cstr warnings subr-x rx cl-seq cl-macs cl-extra help-mode seq byte-opt gv cl-loaddefs cl-lib bytecomp byte-compile cconv iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 174962 29708) (symbols 48 12845 1) (strings 32 34208 2217) (string-bytes 1 1074693) (vectors 16 20567) (vector-slots 8 314808 27474) (floats 8 82 46) (intervals 56 304 0) (buffers 992 15))