From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 28 10:12:09 2020 Received: (at submit) by debbugs.gnu.org; 28 Feb 2020 15:12:09 +0000 Received: from localhost ([127.0.0.1]:33639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7hJ9-0007WG-UJ for submit@debbugs.gnu.org; Fri, 28 Feb 2020 10:12:09 -0500 Received: from lists.gnu.org ([209.51.188.17]:52511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7hJ7-0007W8-2S for submit@debbugs.gnu.org; Fri, 28 Feb 2020 10:12:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42938) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7hJ3-0000on-Ib for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:12:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7hIz-0005fI-T6 for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:12:01 -0500 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]:33004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7hIz-0005f0-Mn for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:11:57 -0500 Received: by mail-qk1-x734.google.com with SMTP id p62so515965qkb.0 for ; Fri, 28 Feb 2020 07:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=8Mo2xGFodpzKglVdwtCgdwMMopjQtoJ03VSN912X1gE=; b=NKy1u25nVCbtNLTPEicrepAzVZb/8c5UMq+3Db0vNYZLc8AqtxBYnT2tCa1QXckLUE qSAKKaK/Muo7cR/DgVFYbetT4J7Af1/y1A5p8K7nXy7cJPgSbUAF21/h79nIwJ9GkQi/ tzPzdFo3EUOM+59yyIhj1vQxr0UBO1i4Pbem9A7ktEHGU6yveJawJZXuyGbxcj129AJq JQJjFh4w12tILSNhm9pmq+7O5lmv9OOD5Zkwiq7TefqEClr6KCa1M8zUpnFr2MYkQeVJ DTNSSgO6jmttwKNH8af3AUGCdL2lhF8gpeC8VyG+g3T4+7uA6QCp0moN5JaewilK1TQQ VUzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=8Mo2xGFodpzKglVdwtCgdwMMopjQtoJ03VSN912X1gE=; b=Hg3ggUGpVj0XluC5R2AfWeZB2c5s96AUIRaELqUpUSZADZM4hAuQbN/fBCTZA8tNb6 hnuY4WxWZI9p5/9e82+K96iGO3cDLTqR9HPfd/C3SAL/bopxIYdMvXRaoTlkhAfOy6fr 6oAMDqTIbK9/X2hMnLw9esLnspJD2wS2QppOwXI21xRnS2pmS4tJgfNnk1QtYpYahrJl kv/TnSmHvBa5W2733/C6vz14/SXhAxEHXIjyU9fa3HpRs+rWX4yI+cr0j4U1l+xjOygm siKW+VmA2Bxyh/yUR1e5lHIEV6Fr/MjuuWL1CHvspW/wBxOKy8rLxiqKZfzAai7HudlP CF8Q== X-Gm-Message-State: APjAAAXLayojPmoVhBn/+71GfeRAEqdh11RIUBsnYcyNhNV77RzVwajR a9MlxIYGYan5S79bpjdYoJP76lalY7g= X-Google-Smtp-Source: APXvYqwf22tjxJ+dyaM6y04As89JU2anJ7HOFP9FTlSG+VVG2fzA0zu/ckULW5N+dUQHhKYgjU3fvw== X-Received: by 2002:a05:620a:2093:: with SMTP id e19mr4862927qka.355.1582902715300; Fri, 28 Feb 2020 07:11:55 -0800 (PST) Received: from raisin ([2607:fad8:4:6:235e:8579:8464:aacc]) by smtp.gmail.com with ESMTPSA id c10sm5231357qkb.4.2020.02.28.07.11.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 07:11:54 -0800 (PST) From: Maxim Cournoyer To: bug-gnu-emacs@gnu.org Subject: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 Date: Fri, 28 Feb 2020 10:11:54 -0500 Message-ID: <87zhd2lpad.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::734 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hello! After passing from Emacs 26 to Emacs 27, the following snippet of code doesn't behave the same: --8<---------------cut here---------------start------------->8--- emacs --quick --batch --eval "(progn ;(require 'autoload) (let ((backup-inhibited t) (generated-autoload-file \"/tmp/toto\")) (update-directory-autoloads \"/tmp\")))" --8<---------------cut here---------------end--------------->8--- Works on Emacs 26.3, but fails on Emacs 27.0.50, with the error message: Wrong type argument: stringp, nil If uncommenting the require line, like: --8<---------------cut here---------------start------------->8--- emacs --quick --batch --eval "(progn (require 'autoload) (let ((backup-inhibited t) (generated-autoload-file \"/tmp/toto\")) (update-directory-autoloads \"/tmp\")))" --8<---------------cut here---------------end--------------->8--- It now proceeds with the following output: INFO Scraping files for toto...=20 INFO Scraping files for toto...done I've isolated the autoload file containing the update-directory-autoloads definition to be /gnu/store/zpmsyn471y4hpgsbz652h4szyskzc2bm-profile/share/emacs/27.0.50/lis= p/emacs-lisp/autoload.elc, using: --8<---------------cut here---------------start------------->8--- strace emacs --quick --batch --eval "(progn ;(require 'autoload) (let ((backup-inhibited t) (generated-autoload-file \"/tmp/toto\")) (update-directory-autoloads \"/tmp\")))" |& grep -E 'autoload.elc.* =3D = 0' stat("/gnu/store/zpmsyn471y4hpgsbz652h4szyskzc2bm-profile/share/emacs/27.0.= 50/lisp/emacs-lisp/autoload.elc", {st_mode=3DS_IFREG|0444, st_size=3D29029,= ...}) =3D 0--8<---------------cut here---------------end--------------->8-= -- Its content is copied below: --8<---------------cut here---------------start------------->8--- cat /gnu/store/zpmsyn471y4hpgsbz652h4szyskzc2bm-profile/share/emacs/27.0.50= /lisp/emacs-lisp/autoload.elc ;ELC ;;; Compiled ;;; in Emacs version 27.0.50 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require lisp-mode lisp-mnt] 2) #@481 File into which to write autoload definitions. A Lisp file can set this in its local variables section to make its autoloads go somewhere else. If this is a relative file name, the directory is determined as follows: - If a Lisp file defined `generated-autoload-file' as a file-local variable, use its containing directory. - Otherwise use the "lisp" subdirectory of `source-directory'. The autoload file is assumed to contain a trailer starting with a FormFeed character. (defvar generated-autoload-file nil (#$ . 484)) (put 'generated-autoload-file 'safe-local-variable 'stringp) #@270 Load name for `autoload' statements generated from autoload cookies. If nil, this defaults to the file name, sans extension. Typically, you need to set this when the directory containing the file is not in `load-path'. This also affects the generated cus-load.el file. (defvar generated-autoload-load-name nil (#$ . 1080)) (put 'generated-autoload-load-name 'safe-local-variable 'stringp) #@447 Magic comment indicating the following form should be autoloaded. Used by \[update-file-autoloads]. This string should be meaningless to Lisp (e.g., a comment). This string is used: ;;;###autoload (defun function-to-be-autoloaded () ...) If this string appears alone on a line, the following form will be read and an autoload made for it. If there is further text on the line, that text will be copied verbatim to `generated-autoload-file'. (defvar generate-autoload-cookie ";;;###autoload" (#$ . 1476)) #@68 If non-nil, list of absolute file names not to scan for autoloads. (defvar autoload-excludes nil (#$ . 1991)) #@75 String that marks the form at the start of a new file's autoload secti= on. (defconst generate-autoload-section-header "\f\n;;;### " (#$ . 2107)) #@72 String which indicates the end of the section of autoloads for a file. (defconst generate-autoload-section-trailer "\n;;;***\n" (#$ . 2257)) #@64 String to add on each continuation of the section header form. (defconst generate-autoload-section-continuation ";;;;;; " (#$ . 2404)) #@52 Value to insert when `autoload-timestamps' is nil. (defconst autoload--non-timestamp '(0 0 0 0) (#$ . 2545)) #@892 Non-nil means insert a timestamp for each input file into the output. We use these in incremental updates of the output file to decide if we need to rescan an input file. If you set this to nil, then we use the timestamp of the output file instead. As a result: - for fixed inputs, the output will be the same every time - incremental updates of the output file might not be correct if: i) the timestamp of the output file cannot be trusted (at least relative to that of the input files) ii) any of the input files can be modified during the time it takes to create the output iii) only a subset of the input files are scanned These issues are unlikely to happen in practice, and would arguably represent bugs in the build system. Item iii) will happen if you use a command like `update-file-autoloads', though, since it only checks a single input file. (defvar autoload-timestamps nil (#$ . 2661)) #@343 Turn FORM into an autoload or defvar for source file FILE. Returns nil if FORM is not a special autoload form (i.e. a function definit= ion or macro definition or a defcustom). If EXPANSION is non-nil, we're processing the macro expansion of an expression, in which case we want to handle forms differently. (fn FORM FILE &optional EXPANSION) (defalias 'make-autoload #[770 "C\211\242\242\301\203\207\302=3D\203\207\24= 2A\211A\211@A\211\303:\203t@\211\304\267\202dA\211:\203\346\211@\211:\203\%= \262\202\261\240\f\30106A\211:\203\266\211@\211\306=3D\203\245A\211\204\224= A\211:\203\203\211@A\211\204r\n\307%\202~\n\301%\266\202\202\217 \301\f%\262\202\301\n\301 \301 %\262\202\361\f\30%\262\202oA\211:\203T\211@\211:\203D\211@\211\306= =3D\2034AA\211\204# = \307%\202/ \301 %\262\202_\f\30%\262\202o = \301\f%\266\202\202? \301\n%\262\202O \"\322\"\323\324%\242A\"\"\211\205\306\325B\262\262\202\372\326>\203\366\32= 7!\203\366\330\242!)\211\262\203\366\211@\331>\203\366\332\333#\202\372\334= \267\202\352\335>\242A@\336\267\202\337\2428\202\340\202\301\202\307\341\34= 2\"\206!\343\242\233\211@;\2051\211A\262\242<\203<\344\"\262\345<\203F\202I= \305D \n\346>\203W\307\202\\@\242\347=3D \205b\350\257\266\205\202= \372\242A@\337\2428\351\2428\352\305D\305D\n\257\266\203\202\372\242\243\24= 2\242\243\243\242\242\243\243\243\242\325\353F\354\305D \3551\262\356 \242>A= @?0\202\264\210\301FE\266\203\202\372\242A@\357\360\361\305D\362BBDC\363\36= 4\305\nD\365BB\301\366\305D\367\370\305D\371BBFFE\262\202\372\203\371\242:\= 203\371\242\202\372\301\266\202\207" [load-file-name nil defalias #[1285 "\= 211\242\300>\205\n\211A@\301:\203Z@\211\302=3D\203HA\211:\2036\211@A &\2= 66\202\202C \303\211&\262\\303\211&\262\202g\211\3= 03\211&\207" ['function #[1542 "\242;\203 @\202\242;\205@:\205l@\211:\203= M\211@\211\300=3D\203+\301\202HA\211:\205F\211@\211:\205D\211@\211\300=3D\2= 05B\301\262\262\262\262\202jA\211:\205h\211@\211:\205f\211@\211\300=3D\205d= \301\262\262\262\262:\203w\302\"\262\30\242A@ \257\207" [interactive t he= lp-add-fundoc-usage autoload] 14 "\n\n(fn FORM FILE REST TYPE BODY ARGS)"] = lambda t] 18 "\n\n(fn FORM FILE REST TYPE FUN)"] #s(hash-table size 2 test = eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (cons 41 quote 2= 46)) quote macro t (progn prog1) :autoload-end copy-sequence delq mapcar ma= ke-byte-code 257 "\302\300\301#\207" vconcat vector [make-autoload] 5 "\n\n= (fn FORM)" progn (easy-mmode-define-global-mode define-global-minor-mode de= fine-globalized-minor-mode defun defmacro easy-mmode-define-minor-mode defi= ne-minor-mode define-inline cl-defun cl-defmacro cl-defgeneric cl-defstruct= pcase-defmacro) macrop macroexpand (progn prog1 defalias) make-autoload ex= pansion #s(hash-table size 17 test eq rehash-size 1.5 rehash-threshold 0.81= 25 purecopy t data (define-skeleton 508 define-derived-mode 508 define-comp= ilation-mode 508 define-generic-mode 508 easy-mmode-define-global-mode 508 = define-global-minor-mode 508 define-globalized-minor-mode 508 easy-mmode-de= fine-minor-mode 508 define-minor-mode 508 cl-defun 508 defun* 508 cl-defmac= ro 508 defmacro* 508 define-overloadable-function 508 defclass 617 defcusto= m 646 defgroup 699)) (defmacro cl-defmacro defmacro*) #s(hash-table size 11= test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (define-ov= erloadable-function 521 cl-defmacro 521 cl-defun 521 defmacro* 521 defun* 5= 21 defmacro 521 defun 521 define-skeleton 528 define-compilation-mode 532 d= efine-derived-mode 532 define-generic-mode 532)) 2 (&optional str arg) func= tion-get doc-string-elt 3 help-add-fundoc-usage autoload (define-skeleton d= efine-derived-mode define-generic-mode easy-mmode-define-global-mode define= -global-minor-mode define-globalized-minor-mode easy-mmode-define-minor-mod= e define-minor-mode) interactive 'macro 4 eieio-defclass-autoload defvar cu= stom-autoload (error) :set let loads get ('custom-loads) if member (loads) = put 'custom-loads cons (loads)] 29 (#$ . 3604)]) #@72 Visit the autoload file for the current buffer, and return its buffer. (defalias 'autoload-find-generated-file #[0 "\303\304\305\306 r\307\310!!q\= 210\311 \312U\203!\313\304\305#c\210p,\207" [delay-mode-hooks enable-local-= eval enable-local-variables :safe nil t autoload-generated-file find-file-n= oselect autoload-ensure-file-writeable buffer-size 0 autoload-rubric] 8 (#$= . 8148)]) #@165 Return `generated-autoload-file' as an absolute name. If local to the current buffer, expand using the default directory; otherwise, using `source-directory'/lisp. \302\304s 'autol\"\"\207" [generated-autoload-file source-directory expand-= file-name local-variable-p "lisp"] 5 (#$ . 8546)]) #@174 Read a section header form. Since continuation lines have been marked as comments, we must copy the text of the form and remove those comment markers before we call `read'. (defalias 'autoload-read-section-header #[0 "\301 \302\303\304\305\306!\307= \"\310$\216`\311\312y\210\31!\203\312y\210\202`{\262r\314\315!q\210\316 \21= 0\211c\210eb\210\31\311\320#\203B\321\322!\210\2023eb\210\323p!)\266\202)\2= 07" [generate-autoload-section-continuation match-data make-byte-code 0 "\3= 01\300\302\"\207" vconcat vector [set-match-data evaporate] 3 nil 1 looking= -at get-buffer-create " *autoload*" erase-buffer search-forward t replace-m= atch " " read] 7 (#$ . 8897)]) #@56 Buffer which gets the output of `autoload-print-form'. (defvar autoload-print-form-outbuf nil (#$ . 9570)) #@159 Print FORM such that `make-docfile' will find the docstrings. The variable `autoload-print-form-outbuf' specifies the buffer to put the output in. (fn FORM) \306\307A\"\207\2119\203\310\207\311\242\312\\203\2548;\203\254S\233\211A\3= 10\241\210\313\314\"\210\315\211\211\211211\203V\211@\316\"\210\313\317\"\2= 10A\266\202\202=3D\210,\313\320\"\210rq\210`)\313\321\322@!\323\"\"\210rq\2= 10\212\324\325\315#\203\204\323u\210\326c\210\202s*A\204\222\313\327\"\210\= 202\242\313\317\"\210\313\321\322A!\323\"\"\210\330!\262\266\202\202\271\31= 5\211\211\211331\",\207" [autoload-print-form-outbuf print-escape-nonascii = print-quoted print-escape-control-characters print-escape-newlines progn ma= pcar autoload-print-form nil function-get doc-string-elt princ "\n(" t prin= 1 " " "\"\\\n" substring prin1-to-string 1 re-search-backward "\n[[(]" "\\"= ")" terpri print] 10 (#$ . 9684)]) #@430 Return a string giving the appropriate autoload rubric for FILE. TYPE (default "autoloads") is a string stating the type of information contained in FILE. TYPE "package" acts like the default, but adds an extra line to the output to modify `load-path'. If FEATURE is non-nil, FILE will provide a feature. FEATURE may be a string naming the feature, otherwise it will be based on FILE's name. (fn FILE &optional TYPE FEATURE) \302\211\262\303\304\206\302\305\205\306\307232\\2054\310\311 ;\203/ \2023\312 = !\"\313\n\314\260 = \207" [file-name-nondirectory "package" "autoloads" ";;; = " " --- automatically extracted " "\n;;\n;;; Code:\n\n" "(add-to-list 'load= -path (directory-file-name\n (or (file-name-directo= ry #$) (car load-path))))\n\n" "\f\n" format "(provide '%s)\n" file-name-sa= ns-extension ";; Local Variables:\n;; version-control: never\n;; no-byte-co= mpile: t\n;; no-update-autoloads: t\n;; coding: utf-8\n;; End:\n;;; " " end= s here\n"] 16 (#$ . 10666)]) #@76 Non-nil means `autoload-find-generated-file' makes existing file writa= ble. (defvar autoload-ensure-writable nil (#$ . 11728)) (put 'autoload-ensure-writable 'risky-local-variable t) #@13=20 (fn FILE) (defalias 'autoload-ensure-file-writeable #[257 \203)\301!\211\203(\302\303= \"\304U\203(\3051#\306\307\303\"\"0\202'\210\202(\210\210\207" [autoload-en= sure-writable file-modes logand 128 0 (error) set-file-modes logior] 7 (#$ = . 11916)]) #@138 Insert the section-header line, which lists the file name and which functions are in it, etc. (fn OUTBUF AUTOLOADS LOAD-NAME FILE TIME) (defalias 'autoload-insert-section-header #[1285 c\210\302\303!\211\203\304= \305!!\202\306\307\25\"\266\310!\210rq\210\212\311y\210l?\205H\312\313!\210= \314\315w\210l\204/\316 \261\210\202/*\207" [generate-autoload-section= -header generate-autoload-section-continuation getenv "SOURCE_DATE_EPOCH" s= econds-to-time string-to-number prin1 autoloads terpri -1 move-to-column 64= "^ \n" nil "\n"] 13 (#$ . 12183)]) #@72 Fetch file and put it in a temp buffer. Return the buffer. (fn FILE) (defalias 'autoload-find-file #[257 "\306!\262r\307\310!q\210\311 \210\312 = \210\313\314\315\302!\210\313\316 \210)\317!\320\314\"\210\321\314\322 \210= *p)\207" [buffer-undo-list buffer-read-only delay-mode-hooks default-direct= ory enable-local-eval enable-local-variables expand-file-name get-buffer-cr= eate " *autoload-file*" kill-all-local-variables erase-buffer t nil make-lo= cal-variable emacs-lisp-mode file-name-directory insert-file-contents :safe= hack-local-variables] 4 (#$ . 12758)]) #@73 File local variable to prevent scanning this file for autoload cookies. (defvar no-update-autoloads nil (#$ . 13335)) #@61 Compute the name that will be used to load FILE. (fn FILE) \204VA\2045@\262\202%\307\310\311\"!\203L\310\211A\262\242\"\262\202%\312\3= 13\314#\262\202%\315\316\"\203f\317\320\211\224#\202g\207" [default-value g= enerated-autoload-file file-relative-name file-name-directory nil directory= -file-name file-name-nondirectory file-exists-p expand-file-name "subdirs.e= l" mapconcat identity "/" string-match "\\.elc?\\(\\.\\|\\'\\)" substring 0= ] 9 (#$ . 13459)]) #@315 Insert at point a loaddefs autoload section for FILE. Autoloads are generated for defuns and defmacros in FILE marked by `generate-autoload-cookie' (which see). If FILE is being visited in a buffer, the contents of the buffer are used. Return non-nil in the case where no autoloads were added at point. (fn FILE) (defalias 'generate-file-autoloads #[257 \302p\")\207" [buffer-file-name ge= nerated-autoload-file autoload-generate-file-autoloads] 4 (#$ . 14064) "fGe= nerate autoloads for file: "]) #@276 If non-nil, autoload will add code to register the prefixes used in a= file. Standard prefixes won't be registered anyway. I.e. if a file "foo.el" defi= nes variables or functions that use "foo-" as prefix, that will not be register= ed. But all other prefixes will be included. (defvar autoload-compute-prefixes t (#$ . 14570)) (put 'autoload-compute-prefixes 'safe 'booleanp) #@305 Target length of the list of definition prefixes per file. If set too small, the prefixes will be too generic (i.e. they'll use little memory, we'll end up looking in too many files when we need a particular prefix), and if set too large, they will be too specific (i.e. they will cost more memory use). (defconst autoload-def-prefixes-max-entries 5 (#$ . 14951)) #@100 Target size of definition prefixes. Don't try to split prefixes that are already longer than that. (defconst autoload-def-prefixes-max-length 12 (#$ . 15322)) (require 'radix-tree) #@18=20 (fn DEFS FILE) (defalias 'autoload--make-defs-autoload #[514 \211\203\211@\301\302#\262A\2= 66\202\202\210\211\262\303C\304\305\306\307\310\311!\312\"\313\314%\"\210\2= 11\242\303\240\210\211\203}\211@\211@\211G\315V\203H\211\316\230\203W\317\3= 20\"\204W\321A\322\"\203a\242B\240\210\202u\304A\305\306\323\310\311\\"\312= \"\313\314%\"\210\210A\266\202\2023\210\211\242\205\247\324\305\325\326\310= \31!\327\"\330\331%\242\"\332\333\334\335\336\337\30\"\340\"DEE\262\207" [r= adix-tree-empty radix-tree-insert t nil radix-tree-iter-subtrees make-byte-= code 514 "\300B\300\242B\240\207" vconcat vector #1=3D[] 5 "\n\n(fn PREFIX = SUBTREE)" 2 "def" string-match ".[[:punct:]]\\'" radix-tree-lookup "" "\300= \301PB\300\242B\240\207" mapcar 257 "\211@\211G\301V\204\211G\301=3D\203302= \303\"\203211\202<\304C\305A\306\307\310\311\3\"\313\"\314\315%\"\210\316\3= 17\300\242$\210\304\262\207" [2 string-match "[[:punct:]]" nil radix-tree-i= ter-mappings make-byte-code 514 "\301\300P\301\242B\240\207" vconcat vector= #1# 5 "\n\n(fn S _)" message "Not registering prefix \"%s\" from %s. Affe= cts: %S"] 12 "\n\n(fn X)" if (fboundp 'register-definition-prefixes) regist= er-definition-prefixes quote sort delq string<] 16 (#$ . 15509)]) #@42=20 (fn OTHERBUF OUTBUF ABSFILE LOAD-NAME) (defalias 'autoload--setup-output #[1028 "\20\206\300\"\206\301\302\"r\211q= \210\303 )\207" [autoload-find-destination throw done point-marker] 7 (#$ .= 16789)]) #@36=20 (fn OUTPUT-START LOAD-NAME FILE) (defalias 'autoload--print-cookie-text #[771 "\303!\304 !\210\305\306w\210l= \203C\30715\310p!n\204\311y\210\312\"\211\204)\26\313!)\266\2020\202Z\314\3= 15\316e`\"$\262\202Z\317\320\306x\210`Tf\321U\203S\311u\210`\311y\210`{!)\2= 07" [standard-output generate-autoload-cookie autoload-print-form-outbuf ma= rker-buffer search-forward " " nil (debug error) read 1 make-autoload = autoload-print-form message "Autoload cookie error in %s:%s %S" count-lines= princ " \f " 32] 10 (#$ . 17008)]) (defvar autoload-builtin-package-versions nil) #@164 List of strings naming definitions to ignore for prefixes. More specifically those definitions will not be considered for the `register-definition-prefixes' call. (defvar autoload-ignored-definitions '("define-obsolete-function-alias" "de= fine-obsolete-variable-alias" "define-category" "define-key" "defgroup" "de= fface" "defadvice" "def-edebug-spec" "define-widget" "define-erc-module" "d= efine-erc-response-handler" "defun-rcirc-command") (#$ . 17600)) #@758 Insert an autoload section for FILE in the appropriate buffer. Autoloads are generated for defuns and defmacros in FILE marked by `generate-autoload-cookie' (which see). If FILE is being visited in a buffer, the contents of the buffer are used. OUTBUF is the buffer in which the autoload statements should be inserted. If OUTBUF is nil, it will be determined by `autoload-generated-file'. If provided, OUTFILE is expected to be the file name of OUTBUF. If OUTFILE is non-nil and FILE specifies a `generated-autoload-file' different from OUTFILE, then OUTBUF is ignored. Return non-nil if and only if FILE adds no autoloads to OUTFILE (or OUTBUF if OUTFILE is nil). The actual return value is FILE's modification time. (fn FILE &optional OUTBUF OUTFILE) (defalias 'autoload-generate-file-autoloads #[769 "\3061<\307\211\211\211\3= 10!\307\311 !\307\211\3122,r\206(\313\f!q\210 \202D\316!\262 \203g@\317>\203\\ \227\320 \227\232\202a \32= 0 \232\204g\321\262\212\214~\210A\203\315\322\323!\307\203\313\3241\203\325= !0\202\205\210\307\211\262\203\313\322\326!\206\227\327\330!!\211\262\203\3= 13\331$\211\262\203\313\332!\321BC\333\334\335\336\337!BDD\340BB!\210\347y\= 210\202\327E\350\232\203*\343\351!\203*\352\347!F\235\204*\353\354!B\262\35= 5\347!\210\347y\210\202\327*G\203\270\203\270\356\n\"\211\203\267\$)\332!H\= 357!\210r\332!q\210\212\211b\210\362!\363\332!\364I\203\245\365 !\3= 668\262\202\247J%\210\367\341\261\266)Kc\210*\210\210\211\203\205\301pr\\"\= 210\204$\375p!\210)\211?\206+0\2057\365!\3668\262+\266\2110\207\376\377@A$\= 207" [float-output-format print-level print-length no-update-autoloads noni= nteractive generated-autoload-load-name (error) nil get-file-buffer expand-= file-name done autoload-find-file message "Generating autoloads for %s..." = autoload-file-load-name (ms-dos windows-nt) autoload-generated-file t lm-he= ader "version" (error) version-to-list "package" file-name-sans-extension f= ile-name-nondirectory autoload--setup-output marker-buffer princ push purec= opy quote intern (package--builtin-versions) "\n" " \n\f" looking-at r= egexp-quote autoload--print-cookie-text 59 1 ";;;###autoload" "(\\(def[^ ]+= \\) ['(]*\\([^' ()\"\n]+\\)[\n ]" match-string match-string-no-prope= rties 2 forward-sexp autoload--make-defs-autoload autoload-print-form defau= lt-value generated-autoload-file file-relative-name autoload-insert-section= -header "actual autoloads are elsewhere" file-attributes 5 ";;; Generated a= utoloads from " cl--assertion-failed (> (point) output-start) md5 emacs-mul= e-unix "Generating autoloads for %s...done" kill-buffer error "%s:0:0: erro= r: %s: %s" system-type autoload-builtin-package-versions print-quoted stand= ard-output autoload-excludes generate-autoload-cookie autoload-ignored-defi= nitions autoload-compute-prefixes autoload-print-form-outbuf autoload-times= tamps autoload--non-timestamp generate-autoload-section-trailer] 24 (#$ . 1= 8060)]) #@46 Save current buffer to its file, atomically. (defalias 'autoload--save-buffer #[0 "\304\305 !\306 \307\310\"\307\311 = !\206\312\"\313\314\315\316\31!\320\"\321$\nBU\204/\322\"\210\323ed\32= 4\325%\210\326 \210\327 \330#\210*\266\331\324!\210\332 \210 \206S\3= 33\334 \"\207" [version-control buffer-file-name kill-emacs-hook noni= nteractive never make-temp-file default-file-modes logand 384 file-modes 43= 8 make-byte-code 0 "\3011 \302\300!0\207\210\303\207" vconcat vector [(erro= r) delete-file nil] 2 set-file-modes write-region nil 1 backup-buffer renam= e-file t set-buffer-modified-p set-visited-file-modtime message "Wrote %s"]= 10 (#$ . 21513)]) (defalias 'autoload-save-buffers #[0 \205\211A\242q\210\301 \210)\202\207" = [autoload-modified-buffers autoload--save-buffer] 2]) #@491 Update the autoloads for FILE. If prefix arg SAVE-AFTER is non-nil, save the buffer too. If FILE binds `generated-autoload-file' as a file-local variable, autoloads are written into that file. Otherwise, the autoloads file is determined by OUTFILE. If called interactively, prompt for OUTFILE; if called from Lisp with OUTFILE nil, use the existing value of `generated-autoload-file'. Return FILE if there was no autoload cookie in it, else nil. (fn FILE &optional SAVE-AFTER OUTFILE) (defalias 'update-file-autoloads #[769 "\211\20\303\304\305! \203203&\30= 6 \210\202&\307\310!\203&\311\312\"\210\211\205++\207" [generated-autoload-= file autoload-modified-buffers autoload-timestamps nil t autoload-generate-= file-autoloads autoload-save-buffers called-interactively-p interactive mes= sage "Autoload section for %s is up to date."] 7 (#$ . 22321) (byte-code "\= 301\302\301\303!E\207" [current-prefix-arg read-file-name "Update autoloads= for file: " "Write autoload definitions to file: "] 4)]) #@360 Find the destination point of the current buffer's autoloads. FILE is the file name of the current buffer. LOAD-NAME is the name as it appears in the output. Returns a buffer whose point is placed at the requested location. Returns nil if the file's autoloads are up-to-date, otherwise removes any prior now out-of-date autoload entries. (fn FILE LOAD-NAME) (defalias 'autoload-find-destination #[514 "\3052\360\205\n\211\306 \307!\2= 05\310!\3118\262\312r\313 q\210\314 !\315=3D\204,\316\317!\210\320 \315V\2= 048\321\32\"\210\32!\204C\321\32\"\210~\210eb\210\211\204\324\325\n\312\326= #\203\324\327 \3308\230\203\300\315\224\3318\310\n!\3118\262\203y\33!\204\2= 64\203\216\326 D\235\203\216\333\"?\202\251<\203\233\333\"?\202\251;\203= \264\334\n\312\211\335$\232\203\264\336\305\312\"\210\202\273\337!\210\326\= 262\266\202\320\3308\231\203\320\315\224b\210\326\262\210\202H\211\204\341d= b\210\340\341\312\326#\210p\f>\204\353p\fBp)\266\2050\207" [buffer-file-nam= e buffer-file-coding-system generate-autoload-section-header autoload--non-= timestamp autoload-modified-buffers up-to-date autoload-generated-file file= -exists-p file-attributes 5 nil autoload-find-generated-file coding-system-= eol-type 0 set-buffer-file-coding-system unix buffer-size error "Autoloads = file %s lacks boilerplate" file-writable-p "Autoloads file %s is not writab= le" search-forward t autoload-read-section-header 2 4 buffer-modified-p tim= e-less-p md5 emacs-mule throw autoload-remove-section search-backward "\f"]= 17 (#$ . 23343)]) #@14=20 (fn BEGIN) (defalias 'autoload-remove-section #[257 "\211b\210\30!\210\211`|\207" [gen= erate-autoload-section-trailer search-forward] 3 (#$ . 24914)]) #@757 Update autoload definitions for Lisp files in the directories DIRS. In an interactive call, you must give one argument, the name of a single directory. In a call from Lisp, you can supply multiple directories as separate arguments, but this usage is discouraged. The function does NOT recursively descend into subdirectories of the directory or directories specified. In an interactive call, prompt for a default output file for the autoload definitions, and temporarily bind the variable `generated-autoload-file' to this value. When called from Lisp, use the existing value of `generated-autoload-file'. If any Lisp file binds `generated-autoload-file' as a file-local variable, write its autoloads into the specified file instead. (fn &rest DIRS) (defalias 'update-directory-autoloads #[128 "\306\307 \211\203\211@\310\311= \"\204\211B\262A\266\202\202\210\312\313\314\"\315Q\262\316\317\320\321\322= \323\324\32!\326\"\327\330%\"\"\306\211\211\211\211\331\332!\203K\333\334!\= 202L \335 !\205[\336 !\3278\262r\337 q\210\212\340\341\n!\320\= 341 \"\"\262eb\210\342 \306\314#\2034\343 \3448\211:\203\321\211= @;\203\321\345\346\224!\210\3478\262\314\fD\235\203\235\262\211\211\203\315= \211@\336!\3278\262\211\203\305\35\"\204\305B\262\340\f\"\262 \210A\266\2= 02\202\236\210\202\"\211;\203\"\335!\203\343\211\235\203\356\314\262\345\34= 6\224!\210\202\"\350\3478\211\314\fD\235\203\376\202\377\211\262\336!\3278\= 262\"\203\"\314\262\345\346\224!\210\351p\n#\203\"\211B\262\211B\262\340 = \"\26\266\202p)\206:\352\353\354\355\341 !P!\346 G\306\356%\346\30= 6 \211\203\227\211@T\211\262\306\247\203f@Y\203l\357#\210\266\351\306\= n#\211\262\203\215\21B\26\350\"\203\220\262\202\220\314\262\nA\266\202\202M= \210\360!\210\203\306\361\362\"\262db\210\363\364\306\314#\210\\203\27\202\= 300\f%\2109c\210\266\204\323\366\306!\210\202\326\367 \210\370 +\207" [auto= load-modified-buffers generated-autoload-file buffer-file-name generate-aut= oload-section-header autoload--non-timestamp autoload-timestamps nil get-lo= ad-suffixes string-match "\\.\\(elc\\|so\\|dll\\)" "^[^=3D.].*" regexp-opt = t "\\'" apply nconc mapcar make-byte-code 257 "\301\302!\303\300#\207" vcon= cat vector [directory-files expand-file-name t] 5 "\n\n(fn DIR)" called-int= eractively-p interactive read-file-name "Write autoload definitions to file= : " file-exists-p file-attributes autoload-find-generated-file delete file-= relative-name search-forward autoload-read-section-header 3 autoload-remove= -section 0 4 time-less-p autoload-generate-file-autoloads (0 0 0 0) make-pr= ogress-reporter byte-compile-info-string "Scraping files for " 10 progress-= reporter-do-update progress-reporter-done sort string< search-backward "\f"= autoload-insert-section-header set-buffer-modified-p autoload--save-buffer= autoload-save-buffers generate-autoload-section-trailer] 21 (#$ . 25075) "= DUpdate autoloads from directory: "]) #@191 Update loaddefs.el autoloads in batch mode. Calls `update-directory-autoloads' on the command line arguments. Definitions are written to `generated-autoload-file' (which should be non-nil). (defalias 'batch-update-autoloads #[0 \204V\304 !\305\306\307!\203S\310\311= !r\211q\210\312\313\314\315\316!\317\"\320$\216\321\307!\210\322\323\305\32= 4#\203Q\325\326!\262\327\330\"\204A\331\332\"\262\327\333\"\204'\334B\202'*= \210)\266 = \305\335\336\"\207" [autoload-excludes generated-autoload-file = default-directory command-line-args-left file-name-directory nil file-reada= ble-p "loadup.el" generate-new-buffer " *temp*" make-byte-code 0 "\301\300!= \205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-= file-contents re-search-forward "^(load \"\\([^\"]+\\)\"" t match-string 1 = string-match "\\.el\\'" format "%s.el" "\\`site-" expand-file-name apply up= date-directory-autoloads] 9 (#$ . 28083)]) (provide 'autoload) --8<---------------cut here---------------end--------------->8--- Could it be a byte compilation bug? Thanks for the great editor :-) Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 12 20:43:19 2020 Received: (at 39823) by debbugs.gnu.org; 13 Mar 2020 00:43:19 +0000 Received: from localhost ([127.0.0.1]:57951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCYQ3-0008LO-1B for submit@debbugs.gnu.org; Thu, 12 Mar 2020 20:43:19 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:46974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCYQ1-0008L4-7K for 39823@debbugs.gnu.org; Thu, 12 Mar 2020 20:43:17 -0400 Received: by mail-qk1-f172.google.com with SMTP id f28so9684024qkk.13 for <39823@debbugs.gnu.org>; Thu, 12 Mar 2020 17:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=vgZc+gCSolKI8JCueGS/RSykfRH3d5T3aO4s8Jn9pWA=; b=SbF2lsydbv4UnD2msEpB1ZV2ZhB/jEhAuezZEV/urxGfkniSnvKfV1kUul3QIEjx/b sLgTNhOOSRN69vxRPNVJv11JhV7qokg1kFrCEgPk/sH27xxzGs3kaRJN9328U1l1QF4K pxTI1E8vzYgCO16Dt33k/mYlrCcVyoPSNw4qFZsB9NE+mEHplV4qSJ0uocS8e45NQ/id NYHt5qM66/Dc2VJOSsd7ncOAQV2dFgcsb3EvjkW38F17NC+tNBg7jCl46cQlpBw9EVr/ H5yIizAYKe3sIOHxR1etwkp847SeqTVwI2C8Uj1nUdpH05xg+xGVclDYUtswLYXsFVUG 0VnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=vgZc+gCSolKI8JCueGS/RSykfRH3d5T3aO4s8Jn9pWA=; b=t8kZfiOriF0RUz/HCz8PPp6r6y74/qkUGoHVnc2HKbv3vVDJiI3FubUBFMZGh+tFM4 wYie6HofHxxMPAxrZj/2ITUNru1Xb9Lcx7xLtzbXy/An6GKTO7gDgPZDtRNHkckFIB51 KxyOW0HQPF99oROr/iLqQzMOfkmMpZvzrFEfEcvsATZTxnCEv92FmMIUZoXF/aO/KQo4 sKbaKkCGfa+3v6+s8HwYNYkE/J6of1PSOBb+a0F58W2q1/YOhSYyKa6Ori5kqdmnyuEo akND2lUzqBP0JGKT/OJS3Hr9Cq67GLI9mMSns1B8GxMspjdUL5t5J3N1WiWd8DZMeZ0c vo9Q== X-Gm-Message-State: ANhLgQ2LPupHoY6Yl5tzY2hOC+dgqDzCvxNayaDwxJaj4T0pXuWCK6FS pyCT2OwRKCkcC/mnw9K6L6WmHNIl X-Google-Smtp-Source: ADFU+vsdndew0e5hKIt4/DTxF73q1NACzUdx/VIP/f2qP9Uji3Y5WGYQgRi+io4f0Nmdnv6Fu1mzEA== X-Received: by 2002:a37:9186:: with SMTP id t128mr9833700qkd.180.1584060191437; Thu, 12 Mar 2020 17:43:11 -0700 (PDT) Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id r40sm13137453qtc.39.2020.03.12.17.43.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Mar 2020 17:43:10 -0700 (PDT) From: Noam Postavsky To: Maxim Cournoyer Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> Date: Thu, 12 Mar 2020 20:43:09 -0400 In-Reply-To: <87zhd2lpad.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 28 Feb 2020 10:11:54 -0500") Message-ID: <87o8t16q5e.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: , 39823@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Maxim Cournoyer writes: > After passing from Emacs 26 to Emacs 27, the following snippet of code > doesn't behave the same: > > emacs --quick --batch --eval "(progn > ;(require 'autoload) > (let ((backup-inhibited t) > (generated-autoload-file \"/tmp/toto\")) > (update-directory-autoloads \"/tmp\")))" > > > Works on Emacs 26.3, but fails on Emacs 27.0.50, with the error message: > > Wrong type argument: stringp, nil The difference is that --eval now evaluates with lexical-binding enabled, so the let-binding of generated-autoload-file is lexical unless autoload.el, with its (defvar generated-autoload-file nil ...), has been loaded. Another way to demonstrate this: emacs -Q --batch -l bug-39823-autoload-regression.el fails with the same error, with bug-39823-autoload-regression.el as the attached file in both Emacs 26 and 27. Remove the lexical-binding setting, and it succeeds in both. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=bug-39823-autoload-regression.el Content-Description: File for demonstration ;;; -*- lexical-binding: t -*- (progn ;(require 'autoload) (let ((backup-inhibited t) (generated-autoload-file "/tmp/toto")) (update-directory-autoloads "/tmp"))) --=-=-= Content-Type: text/plain See also https://lists.gnu.org/r/emacs-devel/2020-03/msg00173.html for (much) more discussion on this. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 13 04:30:45 2020 Received: (at 39823) by debbugs.gnu.org; 13 Mar 2020 08:30:46 +0000 Received: from localhost ([127.0.0.1]:58103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCfiP-0001So-Lp for submit@debbugs.gnu.org; Fri, 13 Mar 2020 04:30:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCfiN-0001Sa-J6 for 39823@debbugs.gnu.org; Fri, 13 Mar 2020 04:30:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jCfiI-0000bu-EM; Fri, 13 Mar 2020 04:30:38 -0400 Received: from [176.228.60.248] (port=1526 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jCfiH-0005BG-Po; Fri, 13 Mar 2020 04:30:38 -0400 Date: Fri, 13 Mar 2020 10:30:46 +0200 Message-Id: <83v9n88xmx.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-Reply-To: <87o8t16q5e.fsf@gmail.com> (message from Noam Postavsky on Thu, 12 Mar 2020 20:43:09 -0400) Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39823 Cc: , 39823@debbugs.gnu.org, maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Noam Postavsky > Date: Thu, 12 Mar 2020 20:43:09 -0400 > Cc: , 39823@debbugs.gnu.org > > > Works on Emacs 26.3, but fails on Emacs 27.0.50, with the error message: > > > > Wrong type argument: stringp, nil > > The difference is that --eval now evaluates with lexical-binding > enabled, so the let-binding of generated-autoload-file is lexical unless > autoload.el, with its (defvar generated-autoload-file nil ...), has been > loaded. > [...] > See also https://lists.gnu.org/r/emacs-devel/2020-03/msg00173.html for > (much) more discussion on this. The "wrap with eval" trick suggested by Stefan in the latter discussion does work here: emacs --quick --batch --eval "(eval '(progn (let ((backup-inhibited t) (generated-autoload-file \"/tmp/toto\")) (update-directory-autoloads \"/tmp\"))))" =| INFO Scraping files for toto...75% INFO Scraping files for toto...done From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 13 19:01:50 2020 Received: (at 39823) by debbugs.gnu.org; 13 Mar 2020 23:01:50 +0000 Received: from localhost ([127.0.0.1]:60348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCtJN-0001CP-TH for submit@debbugs.gnu.org; Fri, 13 Mar 2020 19:01:50 -0400 Received: from mout.web.de ([212.227.17.12]:58851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCtJM-0001CD-So for 39823@debbugs.gnu.org; Fri, 13 Mar 2020 19:01:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1584140502; bh=x3HRCXH4i6tXdeiDzPyXdwQOv2GHZQKZ+bBBCOTCv0o=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=dxP6OuNyvQtYA/Tk129g/NMwSPni9jvxaFh4+4bNh6KXY/ctTgL1i5So3soKZqjYs dtIqHMsqe6qgp9PZAJc9C2jguhpg9woOTS6QxoZcwdKe66OX2QQKFQAY12++7BV+4s 88S9r28qmlyaVcyUs/TAAhun+EngmT508q1EbVhE= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([92.208.89.41]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lo0ZA-1joPuw0LgO-00fwiu; Sat, 14 Mar 2020 00:01:42 +0100 From: Michael Heerdegen To: Noam Postavsky Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> Date: Sat, 14 Mar 2020 00:01:49 +0100 In-Reply-To: <87o8t16q5e.fsf@gmail.com> (Noam Postavsky's message of "Thu, 12 Mar 2020 20:43:09 -0400") Message-ID: <87zhcjkgf6.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:qBLNcA/3uc/qQ7ZC8UfHUKZM9/AWYeuQE0WT7Ag3XNXFzHtwNKh 9sbybltmBSO8CPwIb5xBmH/KziWg+xqN0BFhrm9L+fiS6payALg7lGa/cIPHj9XzO2kd1ic u3APKi3F9uaXUqMzSBFdfH2wUuifgJSUnDfoQkx+/upoaQO15EOe58uQc5xgF+gfe85HTnF Wa1+wuHR5eqKVgryf5qkg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:aFsVBNqTSf4=:FVeLa5mpLsbEhlzT9Wp6Cq uxvwCvw+NDAt3ptVyzy7UYpxYtyEAKt6u8UlhFc6BdCM7VC4L3w0AlXfeFsk6h5NbjYyfvN0l rIGCwbjM/7pCiD6sb/CMjHwaJMUKnmGa9g/BfxXjBTQq87TXpFYk/AKEfR0ihOxCUasR299xL OsctaY3Hv5yEcMclX1B9/z2jHemDFnwQukRo1tJbc47Fq+aoN/pwJ3z3sLqKTUj2hMGh03i28 3ohaxFuPk9NXso+/khemPOSRM4AkMoFvqFb0QfnmQY74e3su5CkQxvzQCD1+3ummsqOM5tl/p Kgluy4h8orRGKO9+IwGZY/Pch1vTPzJ0zhs4q4DJIgBHrkRg74GQ8lTBw1TB5cnqDdUaMldX5 jRC1Mpq7WfUMlXql6ZC0xbz48IoE4TswbUzgUxo7dTNn34VXMvbTUGUrkVaW23kLd9+EkugBd nn79nLmy2TxPpJajEPzjKh8lCZel1er0CD8HkfeVKZXDKmxaUDwJzExLv2IcSDxjelkAY3VwC V+I8QiabZYLafXA7ZIOuzq6UK7JqWvESSdSnV1Oukj7S7oLTmcDJOdRZ+5vZinbzu7+oC7vRY k9q9Z5zA7ZAFCfSaXIx8uN04Zr1nzxlaMmTDfSBuGGUhbM070IwUL+Ktz7UwmMzLNFOBKUW8O hRSpV2/m7jd2Laao5sZukHsn3Ll2d/2M28kuH35g/r5NYjpi9Ta4vxbj1cT+iJ247q4I8DKQb vVWY4uG0mJIT6VxhL/GyEeSthZctZLw4eUgU4cfW3OR/rlKzhDA4DaKM6KR1SdXYUralTuHrZ VI2WS5pyU63PLMEeUR1m2jLPA91Fn7LcBvUBwK9ZR6IXZSFwKyyot752CX1Fz5GoYF4IXi8gY nt0ioUVT+VfAt+ycqbROE/zc+I0SC2hhu5rtPCAQBUN+JrBaPQTp34PnhHHocmnaYshsmo4U0 Mvh3R4tejkNLKmse8F6/15ZhBJQ/oaD5+CKvaha4NPHrmkurlAkSBkCbVqsX/Pru5FUWK5Adw 1pGUbMN4jwJas8/aIp1lO3fQDIZ+lQGqja/OxlLT+d4w6biL3Yqz/3axMrNzzVSxSu0sTc1h7 gb2wkT5kicUB24SrXPD8NBDzEFr7LYYIsyAQ/UNlm5aR+B/2AI9tU4YGrnZGxXFXTXjaLBXtM XVvMuRtghC9/IvsDKIx5Kqeh18x618eFqLAmtRfVA2KITLHaLRn6tXiNyoAvCncgftQ7J7kwH 5ZNw7MR7vY1QsPqlG X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Noam Postavsky writes: > The difference is that --eval now evaluates with lexical-binding > enabled, so the let-binding of generated-autoload-file is lexical unless > autoload.el, with its (defvar generated-autoload-file nil ...), has been > loaded. For a general solution, would it make sense to let emacs -Q know in advance which variables are dynamic, by generating some list when building? Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 13 22:03:46 2020 Received: (at 39823) by debbugs.gnu.org; 14 Mar 2020 02:03:46 +0000 Received: from localhost ([127.0.0.1]:60419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCw9R-0005Of-T2 for submit@debbugs.gnu.org; Fri, 13 Mar 2020 22:03:46 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:44164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCw9Q-0005OT-Lu for 39823@debbugs.gnu.org; Fri, 13 Mar 2020 22:03:44 -0400 Received: by mail-qk1-f172.google.com with SMTP id f198so16147447qke.11 for <39823@debbugs.gnu.org>; Fri, 13 Mar 2020 19:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Zd7Q/iNHUH/7p1j1dmVCpu3uHaW0juLWEI+fawi1y5g=; b=Gv01fnttIKE9ux7dJSA/+gh40Odywb+KgwTMJT2zpg1M81a2ZHh1YGdUah/EuQl+sB FLYmvFwy+2WHODpYIKi5ts3NoachiVmY3WyUDeJ/UaJ+AUQIdFJTD4cQ9lIu7JIg2Qt+ Q0V1El21U6WkNF/W5F70aErd+grImRx6TP56vWNbwye5QuXrUCuVh61f5uRBH1pMdosP B83nfazXm0hrn85kkAnE1LQaW7r528/vLYg/xrN7XbnBDLa1dgqLbpgZezmTPsnT/uP9 D7/flfjD5N3tThSqci+yvXoUN4h67wrNBnjfU2LJxdOMOWx7aEP89REpWe6WwcDkF3xy cHBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Zd7Q/iNHUH/7p1j1dmVCpu3uHaW0juLWEI+fawi1y5g=; b=iqAuyBqvaA/TexfUcPzYT1crZ1Lc6HTl9b/OW5naIbKgL9AhC2Vrr/LyFejvT25kJl kscT9+zJFceemvhMfDkD9sWhQwikY/JHjV9YSfgaWsNQ7Lzj2eF0XvFJjF6pEUuY8xAX CoqN+JHXTAD2dOQsb/KsbwJRSzAGgXmUJu/3BxwmtYQ7yJJYW1VG7gsFfztIE+qDJHUh L7f6RsTFGhKfzC13Yd0u/HtyEhSR/wQ6SU/aVCLuX3Co0061mSeTOsT5zKPmCij6694b tRBeYh37yzMrrr/cmcoNG16cLDVizS6PYUZ/kzjsX2mwLmgEGbD5s5bjalPxlVnxtGJk 6I3g== X-Gm-Message-State: ANhLgQ3I86SQx9S2Do5tAo6toCOdkXEIL/Pmi64cC8thNC5t2girtidk X0wkcYeXhh1tSDMcP8pTkSNAelp0 X-Google-Smtp-Source: ADFU+vsp6lfghKxcp7v6PTHVoTOZo41SEqQ9tx49krn0exmzASxprl6tP+EvMY6oH9JgSX7g3nVkQw== X-Received: by 2002:a37:4cd1:: with SMTP id z200mr7750475qka.324.1584151418788; Fri, 13 Mar 2020 19:03:38 -0700 (PDT) Received: from apteryx (dsl-10-128-88.b2b2c.ca. [72.10.128.88]) by smtp.gmail.com with ESMTPSA id h143sm1664548qke.58.2020.03.13.19.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 19:03:38 -0700 (PDT) From: Maxim Cournoyer To: Noam Postavsky Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> Date: Fri, 13 Mar 2020 22:03:36 -0400 In-Reply-To: <87o8t16q5e.fsf@gmail.com> (Noam Postavsky's message of "Thu, 12 Mar 2020 20:43:09 -0400") Message-ID: <87sgib3d6v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello! Noam Postavsky writes: > Maxim Cournoyer writes: > >> After passing from Emacs 26 to Emacs 27, the following snippet of code >> doesn't behave the same: >> >> emacs --quick --batch --eval "(progn >> ;(require 'autoload) >> (let ((backup-inhibited t) >> (generated-autoload-file \"/tmp/toto\")) >> (update-directory-autoloads \"/tmp\")))" >> >> >> Works on Emacs 26.3, but fails on Emacs 27.0.50, with the error message: >> >> Wrong type argument: stringp, nil > > The difference is that --eval now evaluates with lexical-binding > enabled, so the let-binding of generated-autoload-file is lexical unless > autoload.el, with its (defvar generated-autoload-file nil ...), has been > loaded. Another way to demonstrate this: > > emacs -Q --batch -l bug-39823-autoload-regression.el > > fails with the same error, with bug-39823-autoload-regression.el as the > attached file in both Emacs 26 and 27. Remove the lexical-binding > setting, and it succeeds in both. Thank you for opening my eyes on this; I was scratching my head a bit. > See also https://lists.gnu.org/r/emacs-devel/2020-03/msg00173.html for > (much) more discussion on this. Eh, indeed, that was a bit much :-). I have nothing against lexcal scoping (all to the contrary), and always found it strange that I had to dynamically bound values variable calling `update-directory-autoloads'. Perhaps a simple fix would be to allow passing the values it needs as arguments (while maintaining backward compatibility, i.e., make those arguments optional?). Maxim From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 13 22:06:35 2020 Received: (at 39823) by debbugs.gnu.org; 14 Mar 2020 02:06:35 +0000 Received: from localhost ([127.0.0.1]:60423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCwCB-0005Sh-Bt for submit@debbugs.gnu.org; Fri, 13 Mar 2020 22:06:35 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:40185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCwC9-0005SU-2M for 39823@debbugs.gnu.org; Fri, 13 Mar 2020 22:06:34 -0400 Received: by mail-qk1-f173.google.com with SMTP id j2so3318569qkl.7 for <39823@debbugs.gnu.org>; Fri, 13 Mar 2020 19:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=N0ecydpPvMtfgyyySCpQfR2dd8JMUNz6oZ86t3e9k2M=; b=EsT0w/vMiwfm2MqBFmiZBBQyU9pewXTePSH4OAeNaBRC8XMXy8iURaq5CCECQjwCxS D8BaEGI4qjuh3pkE2oZrYx4GCb3xJQfnfNu0UadfkGzVQN/bcWf7bSmRRUA/sD3r/E6Y hlCJfDklWOhdT5SWbcCrGN2x8eovHKDrcFtxFZgdV9IHkEWp6NcmJMxmg6P2DPTdFcK2 ggmyBumchi6cfG+Af1YZ+WcUnoYQ8iRmyrBgV4dugxQb6/9CNLqPIHj2i796ulQqAkeX jdikYhDbsOn5vsXvoK5rBkDqFjqMPcx605LnaehF9khWmkl05qqLSczCxLUNXL5mxfEg zeCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=N0ecydpPvMtfgyyySCpQfR2dd8JMUNz6oZ86t3e9k2M=; b=coTnT7/XolJ3cdchGfjovCJ3bFwc1QX2q6ABwaYoJlihHHg/DLaeC/yPlZXW5e4iwV xomeHZ6eBU9HFoDSTOg5QXofmh0CqwH2tssEb/W+wpQ0qK80sspG7aZVERDcuQ116NSa eIoY6UEoID7H/L7MGJ90NaelWH7OdNvA8UwsFXNnCuIzsD09vrjolYcfpxOt2M6LXtYg ILuc4q3HGpw0i3WBbRXpeWvWJSiXfgF4ckPQo8HttUn95/7rY/ansaszUCaSwxx1CX91 FrsoHaRjIWJGRIN3lNCdjapxtBg6/acO28DoTVOaJJ4AqHPn+3uivX8hiYjZSge649jl TWDQ== X-Gm-Message-State: ANhLgQ3mtdFOkFSesi2HSISZ9zpuMSQ0Nft9CJ8vndTw8WnLRPVYgUWK AAl7FbvbzfD/s0DSi8ycrBXHPx8d X-Google-Smtp-Source: ADFU+vtAAtV7JmeU75VNplY0GNZWL8taHLvacpxehqbTv/Sajptgw1A/oGvylzmHlt+LWVe+0q7etw== X-Received: by 2002:a37:95c6:: with SMTP id x189mr15444668qkd.19.1584151587536; Fri, 13 Mar 2020 19:06:27 -0700 (PDT) Received: from apteryx (dsl-10-128-88.b2b2c.ca. [72.10.128.88]) by smtp.gmail.com with ESMTPSA id g6sm4594479qtd.85.2020.03.13.19.06.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 19:06:27 -0700 (PDT) From: Maxim Cournoyer To: Eli Zaretskii Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <83v9n88xmx.fsf@gnu.org> Date: Fri, 13 Mar 2020 22:06:26 -0400 In-Reply-To: <83v9n88xmx.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Mar 2020 10:30:46 +0200") Message-ID: <87o8sz3d25.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Eli Zaretskii writes: >> From: Noam Postavsky >> Date: Thu, 12 Mar 2020 20:43:09 -0400 >> Cc: , 39823@debbugs.gnu.org >> >> > Works on Emacs 26.3, but fails on Emacs 27.0.50, with the error message: >> > >> > Wrong type argument: stringp, nil >> >> The difference is that --eval now evaluates with lexical-binding >> enabled, so the let-binding of generated-autoload-file is lexical unless >> autoload.el, with its (defvar generated-autoload-file nil ...), has been >> loaded. >> [...] >> See also https://lists.gnu.org/r/emacs-devel/2020-03/msg00173.html for >> (much) more discussion on this. > > The "wrap with eval" trick suggested by Stefan in the latter > discussion does work here: > > emacs --quick --batch --eval "(eval '(progn > (let ((backup-inhibited t) > (generated-autoload-file \"/tmp/toto\")) > (update-directory-autoloads \"/tmp\"))))" Oh, that's an interesting trick. I had not realized `eval' could be switched to either lexical or dynamic (the default). Thanks! Maxim From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 13 23:34:57 2020 Received: (at 39823) by debbugs.gnu.org; 14 Mar 2020 03:34:57 +0000 Received: from localhost ([127.0.0.1]:60464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCxZh-0001C5-8F for submit@debbugs.gnu.org; Fri, 13 Mar 2020 23:34:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCxZe-0001Bs-HT for 39823@debbugs.gnu.org; Fri, 13 Mar 2020 23:34:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jCxZZ-0002eD-CS; Fri, 13 Mar 2020 23:34:49 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jCxZY-0007qj-Iq; Fri, 13 Mar 2020 23:34:48 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Noam Postavsky In-Reply-To: <87o8t16q5e.fsf@gmail.com> (message from Noam Postavsky on Thu, 12 Mar 2020 20:43:09 -0400) Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> Message-Id: Date: Fri, 13 Mar 2020 23:34:48 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39823 Cc: , 39823@debbugs.gnu.org, maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] Is there any real use for lexical scoping in --eval? I suggest reverting the default for --eval to dynamic. We could introduce --evallex to specify lexical scoping and ask people to tell us if they find it useful. -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 16 22:16:15 2020 Received: (at 39823) by debbugs.gnu.org; 17 Mar 2020 02:16:15 +0000 Received: from localhost ([127.0.0.1]:37976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jE1mA-0003XF-Tm for submit@debbugs.gnu.org; Mon, 16 Mar 2020 22:16:15 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:35533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jE1m8-0003Wy-P5 for 39823@debbugs.gnu.org; Mon, 16 Mar 2020 22:16:13 -0400 Received: by mail-qk1-f180.google.com with SMTP id d8so30038474qka.2 for <39823@debbugs.gnu.org>; Mon, 16 Mar 2020 19:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=EhgeYNEy+tVh/7zsgq1lMmALZWHpNbR04IM4ERNDP2g=; b=pco/cHcmZijONtSe0L7xMBMUSRW6b3CNQlYHSHDQGOdbcia/I7XSUfQp8nkARF22Uz nvS3i55R1OkhkpX4juld/zgFg/KmPLS8N5oHBrD9lbI/GO7cmfxuUXPSvbx6/NZpGmKy RzbRCUjgBQbfbN/btG4DONGDBFAeyCKRGhCvhCvHfioNEzrK9pe/GwariosZZ9UaphT5 4C7oxxwh3EiCw//zvvGBCEb7x0/oImJO+AHuGkJV3G61VXs7nIckOnT/QXpwYvtDGUE+ amv3WK6FkRuoeCcb79uDoKZbF1IpKnFtAbEivXHYDDy54BnirBZV7PTrzXo2zP8dF3ts T/Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=EhgeYNEy+tVh/7zsgq1lMmALZWHpNbR04IM4ERNDP2g=; b=i8RbjcSm0HtzBAquzC4/GIOQRtKXqPuox0Nv8pLunVTy0co7j9tVmH1fyTTEwrU29M gmvx+V+8ywfY410x+vnzli4YorvtVLMWedo4k21Vlw3WnjPq0rCGXmYAaFPpjnRd9Nm/ 2on5MJtEooAA2xfFHyMcvOYxVT8AZvrMUaSdDfXqWiCrugpHT3I9Vvu/KWeS5SSfg4PT 3x3KcvS5ny4yqskrNhtK03NkZKSpIVKtbURlmwZB7tA0w1PXVlwO8fH2jN4K5P/2vU4G tFfhkrKb0iN3L6mRHGfZ/KfQBtLAGbmKJ8z6jzRNR7At2d39CWDD5/pbyqfwatL+E+kb L+Tg== X-Gm-Message-State: ANhLgQ1UkVqGKIOjtf0vtdxCuEqF4mS7tFSk4v/klcDt670+6vmmZQRv MUf1sUlmXTcMxOZYMVn2zGZO0uozxno= X-Google-Smtp-Source: ADFU+vsUY/DTGnXNsbiPOHQUOGUmbhPes8q4B0sb4Sn9rK+Zm6wm9h1y7OPe/gr6AwqmYDFyS3xM4g== X-Received: by 2002:a37:981:: with SMTP id 123mr2802115qkj.154.1584411366170; Mon, 16 Mar 2020 19:16:06 -0700 (PDT) Received: from apteryx (dsl-10-129-121.b2b2c.ca. [72.10.129.121]) by smtp.gmail.com with ESMTPSA id m10sm1178441qte.71.2020.03.16.19.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 19:16:05 -0700 (PDT) From: Maxim Cournoyer To: Richard Stallman Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> Date: Mon, 16 Mar 2020 22:16:04 -0400 In-Reply-To: (Richard Stallman's message of "Fri, 13 Mar 2020 23:34:48 -0400") Message-ID: <87y2rz4tgb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Is there any real use for lexical scoping in --eval? > I suggest reverting the default for --eval to dynamic. > We could introduce --evallex to specify lexical scoping > and ask people to tell us if they find it useful. Not a bad suggestion, but I actually embrace the change to lexical mode everywhere (I find it more forward looking, and like that it is consistently the default everywhere). I believe the reason for this bug report is two-fold: 1) I wasn't aware of the change to --eval (my bad -- I don't follow Emacs development very closely). 2) The API of some older code (such as the `update-directory-autoloads' procedure from the autoload library, as I found out) requires the use of dynamic evaluation for its API to function. Now that I know about 1), it's rather easy to work around 2). And I'd guess that with Elisp finally preferring lexical scope by default, 2) will tend to disappear over time. Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 17 07:48:57 2020 Received: (at 39823) by debbugs.gnu.org; 17 Mar 2020 11:48:57 +0000 Received: from localhost ([127.0.0.1]:38245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEAiO-0003ws-Tu for submit@debbugs.gnu.org; Tue, 17 Mar 2020 07:48:57 -0400 Received: from mail-qk1-f174.google.com ([209.85.222.174]:35764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEAiM-0003wZ-U7 for 39823@debbugs.gnu.org; Tue, 17 Mar 2020 07:48:55 -0400 Received: by mail-qk1-f174.google.com with SMTP id d8so31834938qka.2 for <39823@debbugs.gnu.org>; Tue, 17 Mar 2020 04:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=I2ZJnfppzMCKRYNT+12m0pS4nBbqu3QvLSjXYhIMe8c=; b=cqQK5AFR0Xk9Z3+0+wQBHSvHUVYU/pglUzJ2bNPWQw5ns5vWALuz7qf4+eA5L97I00 y7ISFrd0OlQEIiPY9lzD0ZB0TAdzLJM2fCKdTVEoZv/PEmg95WiCAQdIphF1OyFqTiIR AWTmQy7UrWtdPcton5NVePSoPcvHDFCT2qMaA+LW3ntXC5aQgPl/HP7xMLzPaZvaGZtu 3+7+ASAfyI6Yy8m20ZSn3d4RFLUZ0RnPkSSSGio74k7DP4JbMo81hFHdsMPu0nssNlQe UcZRWFCh5+0/B17SYatMRU/Um//ZBiY/5PSFRG1f62r4itEKtkmC79fO5k1RZQQB6ei3 1fJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=I2ZJnfppzMCKRYNT+12m0pS4nBbqu3QvLSjXYhIMe8c=; b=gLi4/6JV6R4rXDKeobyUawj35X36IzqocufIcgZLb4CL+/nWTFF40u0f9VWSzgOLur Hww4XICNbVcbZoxY99Dfvcjy6lzI5AZDWQ193TXsWuk+D+hcTzfdBgt6XYhKt2IBG3F7 KTV/iMLNY4MYYLxFzz+VJVnlz0fxg6A/NdAQl1g2N4Owcrm0+y9dLk/0kVWpG3eBcO0P vSvuLr4gP7mcSMIKufkgALuu0VU7n4ssDNa/QTXMmYHODtnGDTcuWjXN45NU3kzdg05x yaRqTREvQlgKeOtq4AcitAsYDHTpRismEIrBX+pqGwDtBus9yVztP5OGglM1B0cxenmt 7l/g== X-Gm-Message-State: ANhLgQ0HRO8H66tTpWujwOAWW5YY1jxwYt0W9tWRQYPA1XoJ39jYlZXB flu1SY/2docY2nm85P4LcIGTv+gz X-Google-Smtp-Source: ADFU+vtDlS6SmRFX2f+Csd+R1NoKDC9asCxPWt3gT5lwOHWme0PxfBru9XGXKQZAGf/EmoH9AuHCJg== X-Received: by 2002:a05:620a:4e:: with SMTP id t14mr4336317qkt.122.1584445728746; Tue, 17 Mar 2020 04:48:48 -0700 (PDT) Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id v1sm1736071qkd.74.2020.03.17.04.48.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Mar 2020 04:48:48 -0700 (PDT) From: Noam Postavsky To: Maxim Cournoyer Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87sgib3d6v.fsf@gmail.com> Date: Tue, 17 Mar 2020 07:48:47 -0400 In-Reply-To: <87sgib3d6v.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 13 Mar 2020 22:03:36 -0400") Message-ID: <871rpr6w2o.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Maxim Cournoyer writes: > I have nothing against lexcal scoping (all to the contrary), and > always found it strange that I had to dynamically bound values > variable calling `update-directory-autoloads'. Perhaps a simple fix > would be to allow passing the values it needs as arguments (while > maintaining backward compatibility, i.e., make those arguments > optional?). Hmm, I guess we could add a &key style arg (I don't think plain &optional would be possible in a backward compatible way because the current arg list is &rest DIRS; there wouldn't be any way to distinguish the optional directory argument). From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 18 21:46:26 2020 Received: (at 39823) by debbugs.gnu.org; 19 Mar 2020 01:46:26 +0000 Received: from localhost ([127.0.0.1]:41614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEkGP-0008QC-Um for submit@debbugs.gnu.org; Wed, 18 Mar 2020 21:46:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEkGO-0008Pz-HT for 39823@debbugs.gnu.org; Wed, 18 Mar 2020 21:46:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jEkGJ-0000Ui-BA; Wed, 18 Mar 2020 21:46:19 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jEkGH-0006vJ-CY; Wed, 18 Mar 2020 21:46:17 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Maxim Cournoyer In-Reply-To: <87y2rz4tgb.fsf@gmail.com> (message from Maxim Cournoyer on Mon, 16 Mar 2020 22:16:04 -0400) Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> Message-Id: Date: Wed, 18 Mar 2020 21:46:17 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] I still see no way in which lexical as default makes any sense for --eval. -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 23:55:28 2020 Received: (at 39823) by debbugs.gnu.org; 8 Apr 2020 03:55:28 +0000 Received: from localhost ([127.0.0.1]:51249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jM1oF-00006b-Vj for submit@debbugs.gnu.org; Tue, 07 Apr 2020 23:55:28 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:45046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jM1oE-00006F-0Q for 39823@debbugs.gnu.org; Tue, 07 Apr 2020 23:55:26 -0400 Received: by mail-qk1-f177.google.com with SMTP id j4so1807195qkc.11 for <39823@debbugs.gnu.org>; Tue, 07 Apr 2020 20:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RXI44dMcNFPioIolC1cSX7dLgBC8D4rfHoI6XUla8Sg=; b=Tgb5AQ1q/nZjdMKn4Vtyp+UbHAp6N8YxEkZOUo5amJw84juodk9vOGMIr5JWfBvh5G oNvMRK3z9hTcZiuWIpmldupsjuzqhxjJc4OtzdffqTQXSgNeMe6MguM5N8NGRmeEAymy DCkmgWNwJNJKtdRvSdp6X9MmpYNjFXjGeypFNPtYmNFtaCnHa83Yg34RfOwk3uGIDwEl M7GgswDARD20e+RFMBepEWqVvKg75wBBQ5EqUY3zPqPYdq5XN1wcE4Sa7Lx48prFlpQS zCdmFhPL2uqMSmLCuPTWR0bwkgu66TPqGf5yaT4Vn1DIt5F0G+VYV9FIofMeV5wswd93 ddvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=RXI44dMcNFPioIolC1cSX7dLgBC8D4rfHoI6XUla8Sg=; b=UHFZFnXyya47OosmM4D+/eeMXMZUiwKyMFgPc1rteW2Szj3ly2g3XIMVFD69yHnEVn jm4RTT/C49NiSN+TvE6CPlmcKhRliqYy2DWNhie2SCnpyY7ZAKuYtjvJf+IhLCeE3lJ2 g2A0GZq8PU3AUKjboxeMf2LIdWxENRhTcPqt0gX2c9S6GcxaI47Rp2hJs2uQ4uAkDR51 J3djxfq8K3q8Rl+Q36bAgLTNbO/yOsTkQkIt4zF7Ov+ItSrJUYXA6hQK3OBJ7AbgBVYn H8zS8vXFO5W9dFVU/hz1L30zSqdsBkMXbiXXre7wdqWZhOf8b11jUWtcZ954SOFrQp7S NkIw== X-Gm-Message-State: AGi0Pub3x35H63i0RCv98/6wHB0O05bFO6FqubEXQk70odVfklBl6qfh dMN94ZOLSyuEZkF+jzHcWjmG283tJmvrAw== X-Google-Smtp-Source: APiQypIHtJco3hLtvnDJzdIq5OvrBNGibzhPrZaaLo+WBpNj6UNjpkJW14vg4DOMT5RJA8z/GoAWyA== X-Received: by 2002:a37:86c6:: with SMTP id i189mr5506255qkd.274.1586318120159; Tue, 07 Apr 2020 20:55:20 -0700 (PDT) Received: from hurd (dsl-158-229.b2b2c.ca. [66.158.158.229]) by smtp.gmail.com with ESMTPSA id i25sm18011217qtq.86.2020.04.07.20.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 20:55:19 -0700 (PDT) From: Maxim Cournoyer To: Richard Stallman Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> Date: Tue, 07 Apr 2020 23:55:18 -0400 In-Reply-To: (Richard Stallman's message of "Wed, 18 Mar 2020 21:46:17 -0400") Message-ID: <87blo2k4wp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Richard, Richard Stallman writes: [...] > I still see no way in which lexical as default makes any sense for --eval. Why would it be different than for M-: (eval-expression)? It seem to be mostly a matter of consistency (moving to lexical scope by default, everywhere). For the record, this change of behavior was mitigated in GNU Guix with the following change, which was one of the suggestions made here (wrap in eval): https://git.savannah.gnu.org/cgit/guix.git/commit/?id=afc6b1c0b635e3268795c0f766be408c5e9858e7. I think it could be nice to update update-directory-autoloads to work in a lexical setting before closing this bug, though. Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 02:31:48 2020 Received: (at 39823) by debbugs.gnu.org; 8 Apr 2020 06:31:49 +0000 Received: from localhost ([127.0.0.1]:51272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jM4FY-0004EJ-Kk for submit@debbugs.gnu.org; Wed, 08 Apr 2020 02:31:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jM4FX-0004E2-2I for 39823@debbugs.gnu.org; Wed, 08 Apr 2020 02:31:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jM4FR-0006ku-UC; Wed, 08 Apr 2020 02:31:41 -0400 Received: from [176.228.60.248] (port=3814 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jM4FI-0004NI-E1; Wed, 08 Apr 2020 02:31:32 -0400 Date: Wed, 08 Apr 2020 09:31:32 +0300 Message-Id: <83369eqyij.fsf@gnu.org> From: Eli Zaretskii To: Maxim Cournoyer In-Reply-To: <87blo2k4wp.fsf@gmail.com> (message from Maxim Cournoyer on Tue, 07 Apr 2020 23:55:18 -0400) Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, rms@gnu.org, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Maxim Cournoyer > Date: Tue, 07 Apr 2020 23:55:18 -0400 > Cc: 39823@debbugs.gnu.org, npostavs@gmail.com > > I think it could be nice to update update-directory-autoloads to work in > a lexical setting before closing this bug, though. Update how? This discussion mentioned a way to turn off lexical-binding in --eval command-line arguments (which is also in NEWS), so why do we need to do anything else specifically for update-directory-autoloads? IOW, I think this bug can be closed now. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 12:41:35 2020 Received: (at 39823) by debbugs.gnu.org; 8 Apr 2020 16:41:35 +0000 Received: from localhost ([127.0.0.1]:52868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMDlf-0002hO-Js for submit@debbugs.gnu.org; Wed, 08 Apr 2020 12:41:35 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:34685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMDld-0002hC-O2 for 39823@debbugs.gnu.org; Wed, 08 Apr 2020 12:41:34 -0400 Received: by mail-qk1-f194.google.com with SMTP id i186so874805qke.1 for <39823@debbugs.gnu.org>; Wed, 08 Apr 2020 09:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=6GEq1JIIY9WvBZgydHMVxgB+vVdIXdRWaYjZpJmCC4s=; b=b6cUFOL62g1RJ0Qr0yN+74xCAEefGOGtLhZs8y+qVzorZhY4dAgZaJw/kpRteUGAEa JFT4RBeVUZ7W/SkrAvpNhRgHwXpTkUi5o20GjLjV2NBkvWe2Hb5lKXPvNKQ8M990xTzx uMgaXizbiPTp3xPYPFhphfYYdfQWrYACsOXypt0TXAuogajCqhpFvZpPUTbJJ8RLNlVa SppcTPZkJN6bRV2lKbM9aS/eVV4M3MDIXIWnmV1S4f4RYC5k2F3og8FlQfP/J3hPEOk9 BNhBlm2+dVZkCOTeLlm4ff+A0DJ9PXPvDp/+iW8fIIX8ZTHaxKbBjuBOFkgpG7ot18ix OxnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=6GEq1JIIY9WvBZgydHMVxgB+vVdIXdRWaYjZpJmCC4s=; b=tlSVoNh0dLIfjcu1yrjmylP7WDhEBvxJuIg4m9eHkCpA00JUVpfkakwT3MKyF7Z9XH fs/GetNms6zabWIZcpJv/dMqhJiizx9V7q2zfo04pjUStz5zA45gjhhyyHKbZU2vlwR7 5gjm37vOabTZFcIq4TwZ8oBHhKJKz2xdUADqfN4pJMuo4HAQ9fracZznKU2H7T6J9ix3 xIjnKjM7OlTERr5/sfttFqUM2xF82V8f+smzKjSSrRAxuIUzFBntGqZnHaP8gYEx6vHY ybE4PaMD4BPUVJNKTKUtgtpd8kWkYDOkln+zRDJJGUFLXS4GjXnsAj9HGtcnKqyDUvO2 C09A== X-Gm-Message-State: AGi0PubAF01a3XazYsfALee6XzGx7AnWr478ZEYM81MuT7NE+vCMohye iDo/5ODE0voplZeqvgW5LHE= X-Google-Smtp-Source: APiQypL8ScwUK1Y94O04dlOvCBZix7tuuzdQaw//YPCV63nAz2G/fbYbZT1QZQuThuko2PK19Z422w== X-Received: by 2002:a37:8b04:: with SMTP id n4mr8479101qkd.222.1586364088256; Wed, 08 Apr 2020 09:41:28 -0700 (PDT) Received: from hurd (dsl-158-229.b2b2c.ca. [66.158.158.229]) by smtp.gmail.com with ESMTPSA id m1sm20758070qtm.22.2020.04.08.09.41.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 09:41:27 -0700 (PDT) From: Maxim Cournoyer To: Eli Zaretskii Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> Date: Wed, 08 Apr 2020 12:41:26 -0400 In-Reply-To: <83369eqyij.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 Apr 2020 09:31:32 +0300") Message-ID: <87wo6qhqvd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, rms@gnu.org, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Eli, Eli Zaretskii writes: >> From: Maxim Cournoyer >> Date: Tue, 07 Apr 2020 23:55:18 -0400 >> Cc: 39823@debbugs.gnu.org, npostavs@gmail.com >>=20 >> I think it could be nice to update update-directory-autoloads to work in >> a lexical setting before closing this bug, though. > > Update how? Update `update-directory-autoloads' so that it accepts a &key style arg for the =E2=80=98generated-autoload-file=E2=80=99 file name. Currently it = must be dynamically bound prior to calling `update-directory-autoloads'. This was discussed earlier in this thread (see: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39823#29). > This discussion mentioned a way to turn off lexical-binding in --eval > command-line arguments (which is also in NEWS), so why do we need to > do anything else specifically for update-directory-autoloads? Because I suspect that 'update-directory-autoloads' is probably used most of the time with the command line --eval (in Makefiles and build scripts), and that the wrap in eval workaround, while it works, is rather obscure. Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 15:09:45 2020 Received: (at 39823) by debbugs.gnu.org; 8 Apr 2020 19:09:45 +0000 Received: from localhost ([127.0.0.1]:52914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMG52-0006cP-Pl for submit@debbugs.gnu.org; Wed, 08 Apr 2020 15:09:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMG50-0006bz-Gf for 39823@debbugs.gnu.org; Wed, 08 Apr 2020 15:09:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMG4v-0001Fc-CC; Wed, 08 Apr 2020 15:09:37 -0400 Received: from [176.228.60.248] (port=3679 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMG4f-0006dJ-PD; Wed, 08 Apr 2020 15:09:22 -0400 Date: Wed, 08 Apr 2020 22:09:13 +0300 Message-Id: <835ze9pzfq.fsf@gnu.org> From: Eli Zaretskii To: Maxim Cournoyer In-Reply-To: <87wo6qhqvd.fsf@gmail.com> (message from Maxim Cournoyer on Wed, 08 Apr 2020 12:41:26 -0400) Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, rms@gnu.org, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Maxim Cournoyer > Cc: 39823@debbugs.gnu.org, rms@gnu.org, npostavs@gmail.com > Date: Wed, 08 Apr 2020 12:41:26 -0400 > > >> I think it could be nice to update update-directory-autoloads to work in > >> a lexical setting before closing this bug, though. > > > > Update how? > > Update `update-directory-autoloads' so that it accepts a &key style arg > for the ‘generated-autoload-file’ file name. Currently it must be > dynamically bound prior to calling `update-directory-autoloads'. I don't think this is related to this bug report. It's a separate issue: you want to enhance the API of update-directory-autoloads. > > This discussion mentioned a way to turn off lexical-binding in --eval > > command-line arguments (which is also in NEWS), so why do we need to > > do anything else specifically for update-directory-autoloads? > > Because I suspect that 'update-directory-autoloads' is probably used > most of the time with the command line --eval (in Makefiles and build > scripts), and that the wrap in eval workaround, while it works, is > rather obscure. The Emacs build also uses it, it just uses "-l autoload" before --eval. It sounds like the right solution to me, something that people should use if they need to call this function from a Makefile. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 18 23:13:33 2020 Received: (at 39823) by debbugs.gnu.org; 19 Apr 2020 03:13:33 +0000 Received: from localhost ([127.0.0.1]:43921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQ0Oc-0005LA-31 for submit@debbugs.gnu.org; Sat, 18 Apr 2020 23:13:33 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:33872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQ0Oa-0005Kx-Fc for 39823@debbugs.gnu.org; Sat, 18 Apr 2020 23:13:24 -0400 Received: by mail-qt1-f178.google.com with SMTP id c16so5699476qtv.1 for <39823@debbugs.gnu.org>; Sat, 18 Apr 2020 20:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=74tgzawyCf+IPn7Evx3RfxK3i8aJ2rseDJagf7UCwLU=; b=dqI5WlKpXF/n9LxHBRbI8+WCl4FWYRu5eQ4vsOW09jIS+rSoUYH7oShIAcCkWtBhJ2 aQBI5jn+THQNJZhoSuXojggYYDoNYizXzvb+u6fgdcd5nJlgj4Swy6SjUdGBBRDbRvvx Fof0mVSDHTmfOaPG18/5BS1JQ+0gs7A87ypRitQvipObYz9NRJlQST2PUeW0tSujt60f dsG3f88cAn5FPyUIub/A0gBVwCSpwBhlEmpg3TS1WCJTel00AA96VsEBG048e32+1ine +1C+20aBLBqs8VeV/dIzaTKqAOX34oKNpbvJPhGC0UKwbmpkza8I2XsK2PYLmSBSkcBk sEBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=74tgzawyCf+IPn7Evx3RfxK3i8aJ2rseDJagf7UCwLU=; b=Tu2tLfDnoXkRR2LyU1etEcVmTDch0skH/vC8oDG5M9Oh70Z8Nv5O7iX/Gx0sWeahmq 9klAqZ9BwuIErTfN4stzkU8pJ5mVkVHe85YP1f1wRYGPvXR5mcT+SrZhPTqJL4h21RkI Yq/dAMwYxRSQYaXtIIMDTq5pRd2f/9KGWKWDPkSPdZnrwpAH5r8L78YoGxrlxKrb6FRA diAYBMo+tyKpwlTe1wxc8diqHppRY38cxugS0ZdUlAyxp1pnv3YqWD55AbOub0B/Q3dZ isKo4Apsc0mPqoQdol8f+O4oyLfoQ47qfKHb5tcST2y5/3Hyh5Jxf9JJoFTSukYgjxxu BBGg== X-Gm-Message-State: AGi0Pubw9sF2JYCGQrMt/UbR8Qi71MVOq4HxbOYv6BYLi1Yrutji3xQA QHjZ9VR1BcaNJ8He4LvSMEA= X-Google-Smtp-Source: APiQypLUMd59R5S9VfSp1h2KOBHlYwvtCeuqSVM7qn1zJfssu00IaoJ1OfL+17quEvEweWnae82Atg== X-Received: by 2002:ac8:76da:: with SMTP id q26mr9735642qtr.168.1587265998991; Sat, 18 Apr 2020 20:13:18 -0700 (PDT) Received: from hurd (dsl-10-133-84.b2b2c.ca. [72.10.133.84]) by smtp.gmail.com with ESMTPSA id p1sm1962064qkd.23.2020.04.18.20.13.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Apr 2020 20:13:18 -0700 (PDT) From: Maxim Cournoyer To: Eli Zaretskii Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> Date: Sat, 18 Apr 2020 23:13:16 -0400 In-Reply-To: <835ze9pzfq.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 Apr 2020 22:09:13 +0300") Message-ID: <87mu78jhgz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, rms@gnu.org, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Maxim Cournoyer >> Cc: 39823@debbugs.gnu.org, rms@gnu.org, npostavs@gmail.com >> Date: Wed, 08 Apr 2020 12:41:26 -0400 >>=20 >> >> I think it could be nice to update update-directory-autoloads to work= in >> >> a lexical setting before closing this bug, though. >> > >> > Update how? >>=20 >> Update `update-directory-autoloads' so that it accepts a &key style arg >> for the =E2=80=98generated-autoload-file=E2=80=99 file name. Currently = it must be >> dynamically bound prior to calling `update-directory-autoloads'. I investigated that path, but I fail to see how that could be done safely. &key is a Common Lisp thing that is made available in Emacs Lisp with `cl-defun'. The original signature of `update-directory-autoloads' file is: (defun update-directory-autoloads (&rest dirs) I don't see how &key can be combined with &rest without potentially causing problems. Feel free to close this issue. Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 19 08:19:15 2020 Received: (at 39823) by debbugs.gnu.org; 19 Apr 2020 12:19:16 +0000 Received: from localhost ([127.0.0.1]:44209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQ8up-0004ah-Nk for submit@debbugs.gnu.org; Sun, 19 Apr 2020 08:19:15 -0400 Received: from mail-qt1-f179.google.com ([209.85.160.179]:43699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQ8un-0004aT-BF for 39823@debbugs.gnu.org; Sun, 19 Apr 2020 08:19:14 -0400 Received: by mail-qt1-f179.google.com with SMTP id z90so6091192qtd.10 for <39823@debbugs.gnu.org>; Sun, 19 Apr 2020 05:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=HzelMBZrD5BTONiZJi+oUbY2DoMbGspwKY3J4Q5D8rM=; b=ty5ZE9NbRiAXQs2LRnpZKR2FgiaxekN032o0sfi4SjXMWBR54pmr/k8Y9ScoP1pn7I qn8okWodh5kKrRMHge8Y1POA1sC/LuCOvPLcvFmImqprhNFxgcajrA/sD7Cl0QywD3fX afRy2JktfkA+S34Hti5lckZ7+513GeO6v6Vv6ERbiXRZ/iCg/rjUVQlAQVrPc8WxGvES rFKNt306WF23pZyDgclCRVevdTOmf5Lb7xMteIS5sPYRCqotVz8CdquRZCYVkBEyCh85 Qf18fbrSxGyNxAeimraHu+WxXfuqjQ3vVbNqrNVbbYSe4B+gX96ofpKu4s1sH+t8iG8U +iKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=HzelMBZrD5BTONiZJi+oUbY2DoMbGspwKY3J4Q5D8rM=; b=m+zLtDJ9uEPk0OhHmyx8rEEbOHWDmyMnSiqMySMUKcvRhSyXj9jKLfm1pdg5Z+87XQ VP7EuY9kb7nPa6NHKtLeYJe0OdLTCLVQ4FD6p3/jaQvnvYj9qmcOdg/ZK8y3kjuwNnZf GwbI6TSgm/ffWwUggHVrTGsUR/SA7ZN60/IQA74ES1wxRVfY1+ky/oeX5FAf4+pAs6qe zHJ6pYqYxxAagVwjc4tVU/MvDSWaTa3SZQi6mobAx9d7oX4AbdDFJf8c/RX0Msahl8t+ 4atQcA1dBtlm5MLkvLVAKg9BBYOnJLNtJy7t2w01QBpg0PGLQ1hZUQDhScl5873RGnKw 2NRg== X-Gm-Message-State: AGi0PubWtyPun5cmX5kwnKeiQ0q8w2ISLbmfJ2+8GHCJxszlek6swFVO YiXTT3lktYfx33rRbeseveo= X-Google-Smtp-Source: APiQypJRE3fWPZlM6m1Xr9KD4YRcCySTIvG3Nt807ZtSnmewrVKt06UT6akSQy+Yf/XBy0KUKXRNOA== X-Received: by 2002:ac8:3808:: with SMTP id q8mr11648468qtb.245.1587298747423; Sun, 19 Apr 2020 05:19:07 -0700 (PDT) Received: from LAPTOP-5NDQIUP9 (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id h2sm6827241qkh.91.2020.04.19.05.19.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 19 Apr 2020 05:19:07 -0700 (PDT) From: Noam Postavsky To: Maxim Cournoyer Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> Date: Sun, 19 Apr 2020 08:19:06 -0400 In-Reply-To: <87mu78jhgz.fsf@gmail.com> (Maxim Cournoyer's message of "Sat, 18 Apr 2020 23:13:16 -0400") Message-ID: <868sir8y85.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: Eli Zaretskii , 39823@debbugs.gnu.org, rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Maxim Cournoyer writes: > (defun update-directory-autoloads (&rest dirs) > > I don't see how &key can be combined with &rest without potentially > causing problems. You can check if the first arg is a keyword like :generated-autoload-file (which can't be a directory, since it's not a string), and if it is, then handle the second arg specially. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 22 00:10:26 2020 Received: (at 39823) by debbugs.gnu.org; 22 Jun 2020 04:10:26 +0000 Received: from localhost ([127.0.0.1]:33033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnDmr-0007ig-Nk for submit@debbugs.gnu.org; Mon, 22 Jun 2020 00:10:26 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:46226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnDmm-0007iM-Ls for 39823@debbugs.gnu.org; Mon, 22 Jun 2020 00:10:24 -0400 Received: by mail-qk1-f194.google.com with SMTP id r22so12873767qke.13 for <39823@debbugs.gnu.org>; Sun, 21 Jun 2020 21:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=AA39I/Riz+ZKOTZts4PNrG1UTE0SrATuRq4kAp8DLDA=; b=TPx93A50mf9MCwjScjA6H4R4mqPlHFH9B3LVDD2Lp7M+D9shFqVD9KYYcDtlcOeesf oknDZ0PsbmQQSesvM7t3SsI/r6eJeRS3MDC1rwEcrwzKAaZn6Jvl0zsqmT+GMMuMxvTV D2e1WPRSUHZQcxYeRSELEn9kYoLcRE4zPbbd0+qiCA3yV9GcZAFgQo88GkJL8uZXMZGx xZKxKY0oqQqbZZ9a57U2zR6gQctnpfl02JkBRuvI4zWdv9pPBgKgiN+JihUc2Kfg5BTo URHECKvbF+tSrFofU31rhCwScmWQY4wyla2309rSxdudGl/0pt0ODA5ESusRISncdM4n e6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=AA39I/Riz+ZKOTZts4PNrG1UTE0SrATuRq4kAp8DLDA=; b=I1HniPlI5qDMYMD7SGDMA0jUtej6gpq/uvwKA5kqWadtr1iE2j0P0rcxhNgFynAXeZ nVwIBoyiKmGDIxS6zsQefse4PVLtGFIuTPzMnXlXdvcXy8QIKdgspkQUgcRXAYQlEDcx nmEsVPqSlaCIrF6as46LSr5sMZUhWYPlkI9cT6oj9qgKjEntwJkQfey+lXod9ntppcL4 LEUP2WTbP0VVYkq8Tt/tUmF399ErKulAJovIMJvkD4aaY+JPmLhZZGhviV7dmqwihWt6 29ntUOlp/uVMflW1dbiJCwX9iGNqn3VptSSTZ51cM8OFd8oWrzSm0Br1iUcluEu0o5bg 980Q== X-Gm-Message-State: AOAM533+p0oS3oYqm2A9JVIQTk3egmwb/9fmjYea9bn1hMr0TqK97iwl IPMcyEpg6bq5XPXzJ9hF4LM= X-Google-Smtp-Source: ABdhPJwKdgb8z/Zi7qYQGHrdITM16PURZh2DcNqLjG9LGKPHL7f9S/BxCRaz+ET6illSToAvIaAzug== X-Received: by 2002:a37:e509:: with SMTP id e9mr4357519qkg.367.1592799014922; Sun, 21 Jun 2020 21:10:14 -0700 (PDT) Received: from hurd (dsl-151-141.b2b2c.ca. [66.158.151.141]) by smtp.gmail.com with ESMTPSA id z3sm12423803qkl.111.2020.06.21.21.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 21:10:13 -0700 (PDT) From: Maxim Cournoyer To: Noam Postavsky Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> Date: Mon, 22 Jun 2020 00:10:04 -0400 In-Reply-To: <868sir8y85.fsf@gmail.com> (Noam Postavsky's message of "Sun, 19 Apr 2020 08:19:06 -0400") Message-ID: <87mu4vn3kz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: Eli Zaretskii , 39823@debbugs.gnu.org, rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hello Noam, Noam Postavsky writes: > Maxim Cournoyer writes: > >> (defun update-directory-autoloads (&rest dirs) >> >> I don't see how &key can be combined with &rest without potentially >> causing problems. > > You can check if the first arg is a keyword like > :generated-autoload-file (which can't be a directory, since it's not a > string), and if it is, then handle the second arg specially. I've given this idea a try with the attached patch. For some reason I can't seem to simply eval the definition to test it (Debugger entered--Lisp error: (void-function byte-compile-info-string). I'm rebuilding Emacs with the change right now. Consider it untested for now. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-autoload.el-Add-a-keyword-argument-to-update-di.patch >From 227fea1c404783b93540a1ca2c4c838f9c86ebba Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 21 Jun 2020 23:09:53 -0400 Subject: [PATCH] lisp: autoload.el: Add a keyword argument to update-directory-autoloads. This provides a way to explicitly specify the GENERATED-AUTOLOAD-FILE file name to use for the generated autoload definitions, which is more convenient when using lexical scoping. Previously, the user had to use dynamic scoping and bind the variable before calling `update-directory-autoloads'. This was discussed in . * lisp/emacs-lisp/autoload.el (update-directory-autoloads): Define the procedure using cl-defun, and add a :generated-autoload-file keyword argument. Update doc. Honor :generated-autoload-file keyword argument, and remove it and its associated value from DIRS, if present. --- lisp/emacs-lisp/autoload.el | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index ede4edcd57..423cc67e99 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -32,6 +32,8 @@ (require 'lisp-mode) ;for `doc-string-elt' properties. (require 'lisp-mnt) +(require 'seq) + (eval-when-compile (require 'cl-lib)) (defvar generated-autoload-file nil @@ -1023,7 +1025,10 @@ removes any prior now out-of-date autoload entries." (delete-region begin (point))) ;;;###autoload -(defun update-directory-autoloads (&rest dirs) +(cl-defun update-directory-autoloads (&rest dirs + &key (generated-autoload-file + generated-autoload-file) + &allow-other-keys) "Update autoload definitions for Lisp files in the directories DIRS. In an interactive call, you must give one argument, the name of a single directory. In a call from Lisp, you can supply multiple @@ -1035,11 +1040,26 @@ directory or directories specified. In an interactive call, prompt for a default output file for the autoload definitions, and temporarily bind the variable `generated-autoload-file' to this value. When called from Lisp, -use the existing value of `generated-autoload-file'. If any Lisp -file binds `generated-autoload-file' as a file-local variable, -write its autoloads into the specified file instead." +use the existing value of `generated-autoload-file'. +Alternatively, `generated-autoload-file' can also be provided +using a Common Lisp style keyword ':generated-autoload-file' +argument. If any Lisp file binds `generated-autoload-file' as a +file-local variable, write its autoloads into the specified file +instead." (interactive "DUpdate autoloads from directory: ") - (let* ((files-re (let ((tmp nil)) + (let* (;; Honor the :generated-autoload-file keyword argument. + (generated-autoload-file-arg (seq-position + dirs ':generated-autoload-file)) + (generated-autoload-file (if generated-autoload-file-arg + (elt dirs + (1+ generated-autoload-file-arg)) + generated-autoload-file)) + ;; Cleanup dirs from such keyword argument, if any. + (dirs (if generated-autoload-file-arg + (delete generated-autoload-file + (delete ':generated-autoload-file dirs)) + dirs)) + (files-re (let ((tmp nil)) (dolist (suf (get-load-suffixes)) ;; We don't use module-file-suffix below because ;; we don't want to depend on whether Emacs was -- 2.26.2 --=-=-= Content-Type: text/plain Thank you! Maxim --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 22 11:07:34 2020 Received: (at 39823) by debbugs.gnu.org; 22 Jun 2020 15:07:34 +0000 Received: from localhost ([127.0.0.1]:34308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnO2o-0001iM-1T for submit@debbugs.gnu.org; Mon, 22 Jun 2020 11:07:34 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:37532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnO2m-0001iA-ON for 39823@debbugs.gnu.org; Mon, 22 Jun 2020 11:07:33 -0400 Received: by mail-qk1-f181.google.com with SMTP id k18so6622328qke.4 for <39823@debbugs.gnu.org>; Mon, 22 Jun 2020 08:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KQEFQst7qlfKQGM3Vr3N2TkXws4yXDEAp0mcH79+nw8=; b=qi9RhI3albybUZTylO4UlEd4OaNqiPBSmavmmG3fPM4ZbFBW0NfKNO6v0mH9JTfknb N3otvP8W6T+UikSYPVz7jWOunFDMH2d3fVit0MKLjEVH7P/5TGA+b5KCf7ZYJvfbea1C WoeHSULvZ6rL9iRi4hmwbO1qVJS740xGFWVYnekqixdphSph02j8kHWkuPZnnt4KNwPz 9hdaMll19MnTkGOc69BZQTv8j26ufLCDRN1LSU3pKUWOGMqQKwBNNhw9GbW3t8WkvL7p 3RrIdArr0JF878X3DANZkTK40gG0mKzY6n69Ds8tmi9S/s+Bk4h6dIWkNnY0VK5FVEbh 4p0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KQEFQst7qlfKQGM3Vr3N2TkXws4yXDEAp0mcH79+nw8=; b=SRGiKDN1PxBPHYvCZbh0kD3Fm7eQ5I0v3EZJbYrswyIlozL+ig8+fhY7Eyhryo7hmu Lwt77gFb/XsbHmSesgLAMAh1AhW9ODNvSDSFBPOnd2oaFEe0jxuLsWa0oY2dgK3NpUYF kgi0tG+VVQbxI56mUTcb0FJg6YraOXVc3xn4g28sKPGrfFZE8dnqaKEioXTXE7zMt+Fo 0MgjACN9mqS2idT7n/K0Ouqk/nekHx59JEI3L4Sa09dZVpUT0v2vMA5/X/xYxB8UuEsa bLmXk8DiTqnhotL7crU+DzRDnyR8Lw8kzMYgDsLaV+P616RsBfqDwZTFfgIQNgmAtqt0 WmkA== X-Gm-Message-State: AOAM531mDVTl1sm8GBzK9PmESvXJpB1Y2yKgkU7IX1mmbPnFdDPsJgd4 a3n5ApbYn9sIxoBiBf0lF+A= X-Google-Smtp-Source: ABdhPJxRBSI9iyYVQSnfgs/dio0lVMOvewdZtOac+4/21vZn6DPLavDEdat1umrZXlnF87tD/xXdoQ== X-Received: by 2002:a37:9a06:: with SMTP id c6mr10376804qke.161.1592838447124; Mon, 22 Jun 2020 08:07:27 -0700 (PDT) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id c201sm14539931qkg.57.2020.06.22.08.07.25 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jun 2020 08:07:26 -0700 (PDT) From: Noam Postavsky To: Maxim Cournoyer Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> <87mu4vn3kz.fsf@gmail.com> Date: Mon, 22 Jun 2020 11:07:25 -0400 In-Reply-To: <87mu4vn3kz.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 22 Jun 2020 00:10:04 -0400") Message-ID: <85tuz3f8b6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: Eli Zaretskii , 39823@debbugs.gnu.org, rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Maxim Cournoyer writes: > + (let* (;; Honor the :generated-autoload-file keyword argument. > + (generated-autoload-file-arg (seq-position > + dirs ':generated-autoload-file)) > + (generated-autoload-file (if generated-autoload-file-arg > + (elt dirs > + (1+ generated-autoload-file-arg)) > + generated-autoload-file)) > + ;; Cleanup dirs from such keyword argument, if any. > + (dirs (if generated-autoload-file-arg > + (delete generated-autoload-file > + (delete ':generated-autoload-file dirs)) > + dirs)) How about (let* ((generated-autoload-file (if (eq (car dirs) :generated-autoload-file) (progn (pop dirs) (pop dirs)) generated-autoload-file)) From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 23 16:42:43 2020 Received: (at 39823) by debbugs.gnu.org; 23 Jun 2020 20:42:43 +0000 Received: from localhost ([127.0.0.1]:37158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnpkh-0002O2-Kr for submit@debbugs.gnu.org; Tue, 23 Jun 2020 16:42:43 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:39252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnpke-0002Nc-NI for 39823@debbugs.gnu.org; Tue, 23 Jun 2020 16:42:41 -0400 Received: by mail-qk1-f177.google.com with SMTP id l6so16521389qkc.6 for <39823@debbugs.gnu.org>; Tue, 23 Jun 2020 13:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=FjEBtuuaaZq38rf64zFYpWK2ozA4zUccxa8934+ZhvI=; b=nqfdGEZ2dJrGyRnOteawIXLpG+KWq25vTM1i043br3NarDq/uUiWz36Ofw74mmr9Fp CL4ZqMpqT3zRh4ExBtI9L2EN7GYYZDfoNslA4KDWlomweX3Pw0PmP5GkKf5N0qctMrId iuU9giTABn/QaWt/toxZrFozgbE650Q6HUSEjBCHLvFuugvVslFAnud8ikyjZigplfTo SRElrdJH1G9eQXP3kNOdKnltbx94JIWJ0+P7yvIuDiUoQiDDxOYmSSJL48F7R+QzQRPZ Dcftf64tlthEc3LlYr1eMvP6jvZpK1PJ9WclmfV5bUlSXESPlMhN4WVTAgZwW6XeS2i+ bQiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=FjEBtuuaaZq38rf64zFYpWK2ozA4zUccxa8934+ZhvI=; b=UebizITpUxn20Z4nYajvkG9XrAtGM8vI21NKUNi2fyxHyZm7QE/Rh+HU7m/ucC2cJd kPihVlMaDbkZGsTC2fX7+mS3a5Pxv+A9JBln1H/yqq1VFvFxvr2Lx/l3nqquSi1C8eJ8 MgOnvluxz0jBph6ucGOjhKonzbtPstuj+vF+7EQAJ26w6JP4zhYqm/C4QAHdFvcVmRDx B8ywrw5eaVbkZ/Jxa7kWtTTjs9RVFPf9T+euUCJ7aFrxe8nJpDpijzRnEbcCBY9PC6GM wWX8pP+HWkLD4Ih7RrjevnK3sM5cbWuDXDkKaWji0DULEXY2LqoU6OTHmRdZdk/YZwn1 G+Sw== X-Gm-Message-State: AOAM533Q7bTTVx2EAHWkM6UsCIy3vkImqKO+zAwe17vIRZcg7Zz8VKti pIT9QNGUT2m79dU168bjtLY= X-Google-Smtp-Source: ABdhPJy2qSbhgbbEDs8TMgKaBWu5+5hwOR0HRWRAw/zaR/gJp5zpGKlu6hqpO1vkF9Coa7aaismfQA== X-Received: by 2002:a05:620a:56c:: with SMTP id p12mr12518125qkp.433.1592944955158; Tue, 23 Jun 2020 13:42:35 -0700 (PDT) Received: from hurd (dsl-10-134-241.b2b2c.ca. [72.10.134.241]) by smtp.gmail.com with ESMTPSA id n64sm1374748qke.77.2020.06.23.13.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 13:42:34 -0700 (PDT) From: Maxim Cournoyer To: Noam Postavsky Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> <87mu4vn3kz.fsf@gmail.com> <85tuz3f8b6.fsf@gmail.com> Date: Tue, 23 Jun 2020 16:42:33 -0400 In-Reply-To: <85tuz3f8b6.fsf@gmail.com> (Noam Postavsky's message of "Mon, 22 Jun 2020 11:07:25 -0400") Message-ID: <87a70tms3q.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: Eli Zaretskii , 39823@debbugs.gnu.org, rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Noam, Noam Postavsky writes: > Maxim Cournoyer writes: > >> + (let* (;; Honor the :generated-autoload-file keyword argument. >> + (generated-autoload-file-arg (seq-position >> + dirs ':generated-autoload-file)) >> + (generated-autoload-file (if generated-autoload-file-arg >> + (elt dirs >> + (1+ generated-autoload-file-arg)) >> + generated-autoload-file)) >> + ;; Cleanup dirs from such keyword argument, if any. >> + (dirs (if generated-autoload-file-arg >> + (delete generated-autoload-file >> + (delete ':generated-autoload-file dirs)) >> + dirs)) > > How about > > (let* ((generated-autoload-file > (if (eq (car dirs) :generated-autoload-file) > (progn (pop dirs) (pop dirs)) > generated-autoload-file)) That's much simpler, which is nice! The only drawback is that it requires the keyword argument to be used as the first argument when provided (mine didn't have such restriction). Provided the docstring reflects this, I'm OK with it :-). Thank you, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 30 11:23:45 2020 Received: (at 39823) by debbugs.gnu.org; 30 Sep 2020 15:23:45 +0000 Received: from localhost ([127.0.0.1]:60814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNdxJ-0007Pi-3O for submit@debbugs.gnu.org; Wed, 30 Sep 2020 11:23:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNdxH-0007PU-DK for 39823@debbugs.gnu.org; Wed, 30 Sep 2020 11:23:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vGQkQ7fSClCfB2gtHKJ276Uqr7DPylyHP9Tos8n5psY=; b=H5kSzNlFuwf3Y244v97sJVXhX5 O3iCxr8wOsPcz9U2lYr7ukCVEjCFz0UJ9XOYnFY8gXTBBnNFdmfL31TPD+4PJ7gzapR9R0PMX0Vj2 NS166oRx2SCLVAzwXWfI4NnJVlR/YmZQaTetTXoMhzWFS+1Ype5kB6azoVa0GwZj3szE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNdwy-0002uj-D0; Wed, 30 Sep 2020 17:23:36 +0200 From: Lars Ingebrigtsen To: Maxim Cournoyer Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> <87mu4vn3kz.fsf@gmail.com> X-Now-Playing: Rhythm King And Her Friends's _Rhythm King And Her Friends_: "Freia" Date: Wed, 30 Sep 2020 17:23:21 +0200 In-Reply-To: <87mu4vn3kz.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 22 Jun 2020 00:10:04 -0400") Message-ID: <87a6x747bq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Maxim Cournoyer writes: > I've given this idea a try with the attached patch. For some reason I > can't seem to simply eval the definition to test it (Debugger > entered--Lisp error: (void-function byte-compile-info-string). [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, Eli Zaretskii , Noam Postavsky , rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Maxim Cournoyer writes: > I've given this idea a try with the attached patch. For some reason I > can't seem to simply eval the definition to test it (Debugger > entered--Lisp error: (void-function byte-compile-info-string). I'm > rebuilding Emacs with the change right now. [...] > This provides a way to explicitly specify the GENERATED-AUTOLOAD-FILE > file name to use for the generated autoload definitions, which is more > convenient when using lexical scoping. Previously, the user had to > use dynamic scoping and bind the variable before calling > `update-directory-autoloads'. This was discussed in > . This seems like a good change -- I'm all for explicit function arguments instead of binding variables around the call. [...] > ;;;###autoload > -(defun update-directory-autoloads (&rest dirs) > +(cl-defun update-directory-autoloads (&rest dirs > + &key (generated-autoload-file > + generated-autoload-file) > + &allow-other-keys) But I'm not really enthusiastic about this complicated function signature. The doc string to the function already goes on way too long to explain what the parameter means. I think it would make more sense to introduce a new function, say, `make-directory-autoloads' (because it doesn't so much update the autoloads as create an autoload file, I think?) with a sane function signature, and then deprecate update-directory-autoloads (which is only used a handful of place in the Emacs tree). Any comments? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 13:20:15 2020 Received: (at 39823) by debbugs.gnu.org; 1 Oct 2020 17:20:15 +0000 Received: from localhost ([127.0.0.1]:38154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO2Fa-0001mh-CX for submit@debbugs.gnu.org; Thu, 01 Oct 2020 13:20:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO2FY-0001mR-56 for 39823@debbugs.gnu.org; Thu, 01 Oct 2020 13:20:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tEaeG90NnSZerfxHeENYVG4CxC9XHeMUDMqZYgds8/A=; b=PszmLN69dLX8ou5SNfiRQAdmV8 +jJ/c7vrmfJoaEvRq3NY8VnnsRy4mcczibmfKfuRbcSciBVjizWXxuA9cXxUF+oFHTIRieCB21UV1 NXuLuRVyTHZ5mNAYuMOvpBsiFPDegk0MPrreUht+L0s8ffsquAHgURuLrdLwZ/Th8x0Q=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO2FO-0000xQ-Id; Thu, 01 Oct 2020 19:20:05 +0200 From: Lars Ingebrigtsen To: Maxim Cournoyer Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> <87mu4vn3kz.fsf@gmail.com> <87a6x747bq.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEWeojOusVi0sqPW 1NH29vFsaWH///9lFNI9AAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QKARA6Ge7pWTkAAAGkSURBVDjL nZJNetwgDIYhTffgpPtYwD6DNAcYUC9g1/e/SiX8h/NMs6gMLHiRvk8YY9bwMq0PfETbdW2YH8wX 4Lw33gm6gg9jRuu10hdwk/oOvKrYC9Dj/vZpXiT1/aIxeP8iU4YZeqDSw9jC2UuGdX70IwyDM54u dtWSXbt5v4Az7NtzYP0/gFjrXa0CK+jUzWcHehHzWK+8XbIVUHfAzvpDPQBn2sHDu0M+FsIDMG7A Om2wKqAGdvL6YeIG1gzmx2jdqOYQueIJxAiV0fy82T+y3wFGBFx+LW95RoBAJ6gAsCyLrNOUU+5A ntKSFg6BC0BqMg1wniFhZALmQJPUPjWmScyrqZxjxbq5oprCEokJZcDhqjmsQIRBjmKmE0gnNSDi PSNjPTNIwSQH7zmEHuj4PSsoMdS6/hLTrlJLiel7mWJl3DKUI5WZOUFhLryLU/tY2uJ7UtCCjFSJ CrRAggOgANLOMItfCIyFNiBNyBWAdJElQ5oNsmSM4qqdkR2orFxfQ0Uy518WT/P+3GoPEsBzELDE p6CPr6DiHvwdeBb1P8BfcTXhhZ9aEUQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMTAtMDFUMTY6 NTg6MjUrMDA6MDCI5DbiAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEwLTAxVDE2OjU4OjI1KzAw OjAw+bmOXgAAAABJRU5ErkJggg== X-Now-Playing: Static's _Re: Talking About Memories_: "Point Of Hope" Date: Thu, 01 Oct 2020 19:20:01 +0200 In-Reply-To: <87a6x747bq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 30 Sep 2020 17:23:21 +0200") Message-ID: <87h7rdq2wu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > I think it would make more sense to introduce a new function, say, > `make-directory-autoloads' (because it doesn't so much update the > autoloads as create an autoload file, I think?) with a sane f [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, rms@gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > I think it would make more sense to introduce a new function, say, > `make-directory-autoloads' (because it doesn't so much update the > autoloads as create an autoload file, I think?) with a sane function > signature, and then deprecate update-directory-autoloads (which is only > used a handful of place in the Emacs tree). Man, that was a lot more invasive than I thought, because the dynamically bound variable was used all over the place. But with the following patch (make-directory-autoloads "~/src/emacs/trunk/lisp/calc" "/tmp/autofoo.el") works. Emacs builds after applying the patch, and starts, and no tests fail. Does this look OK to everybody? diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 6833af9c26..aa6ef307b1 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -577,7 +577,7 @@ Autoload define function @var{function-name}"}. @findex update-file-autoloads -@findex update-directory-autoloads +@findex make-directory-autoloads @cindex magic autoload comment @cindex autoload cookie @anchor{autoload cookie} @@ -590,7 +590,7 @@ Autoload file generated by @code{update-file-autoloads} can be changed from the above defaults, see below.) Building Emacs loads @file{loaddefs.el} and thus calls @code{autoload}. -@kbd{M-x update-directory-autoloads} is even more powerful; it updates +@kbd{M-x make-directory-autoloads} is even more powerful; it updates autoloads for all files in the current directory. The same magic comment can copy any kind of form into diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 0bcd7b7dcd..fe6a72c0a1 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -254,13 +254,12 @@ make-autoload ;; the doc-string in FORM. ;; Those properties are now set in lisp-mode.el. -(defun autoload-find-generated-file () +(defun autoload-find-generated-file (file) "Visit the autoload file for the current buffer, and return its buffer." (let ((enable-local-variables :safe) (enable-local-eval nil) (find-file-hook nil) - (delay-mode-hooks t) - (file (autoload-generated-file))) + (delay-mode-hooks t)) ;; We used to use `raw-text' to read this file, but this causes ;; problems when the file contains non-ASCII characters. (with-current-buffer (find-file-noselect @@ -268,11 +267,13 @@ autoload-find-generated-file (if (zerop (buffer-size)) (insert (autoload-rubric file nil t))) (current-buffer)))) -(defun autoload-generated-file () +(defun autoload-generated-file (outfile) "Return `generated-autoload-file' as an absolute name. If local to the current buffer, expand using the default directory; otherwise, using `source-directory'/lisp." - (expand-file-name generated-autoload-file + (expand-file-name (if (local-variable-p 'generated-autoload-file) + generated-autoload-file + outfile) ;; File-local settings of generated-autoload-file should ;; be interpreted relative to the file's location, ;; of course. @@ -454,13 +455,12 @@ autoload-find-file (defvar no-update-autoloads nil "File local variable to prevent scanning this file for autoload cookies.") -(defun autoload-file-load-name (file) +(defun autoload-file-load-name (file outfile) "Compute the name that will be used to load FILE." ;; OUTFILE should be the name of the global loaddefs.el file, which ;; is expected to be at the root directory of the files we're ;; scanning for autoloads and will be in the `load-path'. - (let* ((outfile (default-value 'generated-autoload-file)) - (name (file-relative-name file (file-name-directory outfile))) + (let* ((name (file-relative-name file (file-name-directory outfile))) (names '()) (dir (file-name-directory outfile))) ;; If `name' has directory components, only keep the @@ -608,7 +608,7 @@ autoload--make-defs-autoload `(register-definition-prefixes ,file ',(sort (delq nil strings) 'string<)))))) -(defun autoload--setup-output (otherbuf outbuf absfile load-name) +(defun autoload--setup-output (otherbuf outbuf absfile load-name output-file) (let ((outbuf (or (if otherbuf ;; A file-local setting of @@ -616,7 +616,7 @@ autoload--setup-output ;; should ignore OUTBUF. nil outbuf) - (autoload-find-destination absfile load-name) + (autoload-find-destination absfile load-name output-file) ;; The file has autoload cookies, but they're ;; already up-to-date. If OUTFILE is nil, the ;; entries are in the expected OUTBUF, @@ -717,7 +717,7 @@ autoload-generate-file-autoloads (setq load-name (if (stringp generated-autoload-load-name) generated-autoload-load-name - (autoload-file-load-name absfile))) + (autoload-file-load-name absfile outfile))) ;; FIXME? Comparing file-names for equality with just equal ;; is fragile, eg if one has an automounter prefix and one ;; does not, but both refer to the same physical file. @@ -725,8 +725,10 @@ autoload-generate-file-autoloads (not (if (memq system-type '(ms-dos windows-nt)) (equal (downcase outfile) - (downcase (autoload-generated-file))) - (equal outfile (autoload-generated-file))))) + (downcase (autoload-generated-file + outfile))) + (equal outfile (autoload-generated-file + outfile))))) (setq otherbuf t)) (save-excursion (save-restriction @@ -740,7 +742,8 @@ autoload-generate-file-autoloads (file-name-sans-extension (file-name-nondirectory file)))) (setq output-start (autoload--setup-output - otherbuf outbuf absfile load-name)) + otherbuf outbuf absfile + load-name outfile)) (let ((standard-output (marker-buffer output-start)) (print-quoted t)) (princ `(push (purecopy @@ -758,7 +761,8 @@ autoload-generate-file-autoloads ;; If not done yet, figure out where to insert this text. (unless output-start (setq output-start (autoload--setup-output - otherbuf outbuf absfile load-name))) + otherbuf outbuf absfile + load-name outfile))) (autoload--print-cookie-text output-start load-name file)) ((= (following-char) ?\;) ;; Don't read the comment. @@ -789,7 +793,7 @@ autoload-generate-file-autoloads ((not otherbuf) (unless output-start (setq output-start (autoload--setup-output - nil outbuf absfile load-name))) + nil outbuf absfile load-name outfile))) (let ((autoload-print-form-outbuf (marker-buffer output-start))) (autoload-print-form form))) @@ -801,9 +805,8 @@ autoload-generate-file-autoloads ;; then passing otherbuf=nil is enough, but if ;; outbuf is nil, that won't cut it, so we ;; locally bind generated-autoload-file. - (let ((generated-autoload-file - (default-value 'generated-autoload-file))) - (autoload--setup-output nil outbuf absfile load-name))) + (autoload--setup-output nil outbuf absfile load-name + outfile)) (autoload-print-form-outbuf (marker-buffer other-output-start))) (autoload-print-form form) @@ -937,7 +940,7 @@ update-file-autoloads (message "Autoload section for %s is up to date." file))) (if no-autoloads file))) -(defun autoload-find-destination (file load-name) +(defun autoload-find-destination (file load-name output-file) "Find the destination point of the current buffer's autoloads. FILE is the file name of the current buffer. LOAD-NAME is the name as it appears in the output. @@ -947,12 +950,12 @@ autoload-find-destination (catch 'up-to-date (let* ((buf (current-buffer)) (existing-buffer (if buffer-file-name buf)) - (output-file (autoload-generated-file)) + (output-file (autoload-generated-file output-file)) (output-time (if (file-exists-p output-file) (file-attribute-modification-time (file-attributes output-file)))) (found nil)) - (with-current-buffer (autoload-find-generated-file) + (with-current-buffer (autoload-find-generated-file output-file) ;; This is to make generated-autoload-file have Unix EOLs, so ;; that it is portable to all platforms. (or (eq 0 (coding-system-eol-type buffer-file-coding-system)) @@ -1038,7 +1041,20 @@ update-directory-autoloads use the existing value of `generated-autoload-file'. If any Lisp file binds `generated-autoload-file' as a file-local variable, write its autoloads into the specified file instead." - (interactive "DUpdate autoloads from directory: ") + (declare (obsolete make-directory-autoloads "28.1")) + (make-directory-autoloads dirs generated-autoload-file)) + +;;;###autoload +(defun make-directory-autoloads (dir output-file) + "Update autoload definitions for Lisp files in the directories DIRS. +DIR can be either a single directory or a list of +directories. (The latter usage is discouraged.) + +The autoloads will be written to OUTPUT-FILE. + +The function does NOT recursively descend into subdirectories of the +directory or directories specified." + (interactive "DUpdate autoloads from directory: \nfWrite to file: ") (let* ((files-re (let ((tmp nil)) (dolist (suf (get-load-suffixes)) ;; We don't use module-file-suffix below because @@ -1049,10 +1065,10 @@ update-directory-autoloads (push suf tmp))) (concat "\\`[^=.].*" (regexp-opt tmp t) "\\'"))) (files (apply #'nconc - (mapcar (lambda (dir) - (directory-files (expand-file-name dir) - t files-re)) - dirs))) + (mapcar (lambda (d) + (directory-files (expand-file-name d) + t files-re)) + (if (consp dir) dir (list dir))))) (done ()) ;Files processed; to remove duplicates. (changed nil) ;Non-nil if some change occurred. (last-time) @@ -1060,16 +1076,12 @@ update-directory-autoloads ;; files because of file-local autoload-generated-file settings. (no-autoloads nil) (autoload-modified-buffers nil) - (generated-autoload-file - (if (called-interactively-p 'interactive) - (read-file-name "Write autoload definitions to file: ") - generated-autoload-file)) (output-time - (if (file-exists-p generated-autoload-file) - (file-attribute-modification-time - (file-attributes generated-autoload-file))))) + (and (file-exists-p output-file) + (file-attribute-modification-time + (file-attributes output-file))))) - (with-current-buffer (autoload-find-generated-file) + (with-current-buffer (autoload-find-generated-file output-file) (save-excursion ;; Canonicalize file names and remove the autoload file itself. (setq files (delete (file-relative-name buffer-file-name) @@ -1126,8 +1138,7 @@ update-directory-autoloads (progress (make-progress-reporter (byte-compile-info (concat "Scraping files for " - (file-relative-name - generated-autoload-file))) + (file-relative-name output-file))) 0 (length files) nil 10)) (file-count 0) file-time) @@ -1190,6 +1201,8 @@ batch-update-autoloads ;; Exclude those files that are preloaded on ALL platforms. ;; These are the ones in loadup.el where "(load" is at the start ;; of the line (crude, but it works). + (message "FOOOO") + (setq debug-on-error t) (unless autoload-excludes (let ((default-directory (file-name-directory generated-autoload-file)) file) @@ -1205,7 +1218,7 @@ batch-update-autoloads (let ((args command-line-args-left)) (batch-update-autoloads--summary args) (setq command-line-args-left nil) - (apply #'update-directory-autoloads args))) + (make-directory-autoloads args generated-autoload-file))) (provide 'autoload) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index a173fc060a..e77077fc52 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1013,7 +1013,6 @@ package-autoload-ensure-default-file (write-region (autoload-rubric file "package" nil) nil file nil 'silent)) file) -(defvar generated-autoload-file) (defvar autoload-timestamps) (defvar version-control) @@ -1021,14 +1020,14 @@ package-generate-autoloads "Generate autoloads in PKG-DIR for package named NAME." (let* ((auto-name (format "%s-autoloads.el" name)) ;;(ignore-name (concat name "-pkg.el")) - (generated-autoload-file (expand-file-name auto-name pkg-dir)) + (output-file (expand-file-name auto-name pkg-dir)) ;; We don't need 'em, and this makes the output reproducible. (autoload-timestamps nil) (backup-inhibited t) (version-control 'never)) - (package-autoload-ensure-default-file generated-autoload-file) - (update-directory-autoloads pkg-dir) - (let ((buf (find-buffer-visiting generated-autoload-file))) + (package-autoload-ensure-default-file output-file) + (make-directory-autoloads pkg-dir output-file) + (let ((buf (find-buffer-visiting output-file))) (when buf (kill-buffer buf))) auto-name)) diff --git a/test/lisp/vc/vc-bzr-tests.el b/test/lisp/vc/vc-bzr-tests.el index b68a694512..408d6e8e23 100644 --- a/test/lisp/vc/vc-bzr-tests.el +++ b/test/lisp/vc/vc-bzr-tests.el @@ -131,7 +131,6 @@ vc-bzr-test-faulty-bzr-autoloads (make-directory bzrdir) (expand-file-name "foo.el" bzrdir))) (default-directory (file-name-as-directory bzrdir)) - (generated-autoload-file (expand-file-name "loaddefs.el" bzrdir)) (process-environment (cons (format "HOME=%s" homedir) process-environment))) (unwind-protect @@ -148,7 +147,9 @@ vc-bzr-test-faulty-bzr-autoloads ;; causes bzr status to fail. This simulates a broken bzr ;; installation. (delete-file ".bzr/checkout/dirstate") - (should (progn (update-directory-autoloads default-directory) + (should (progn (make-directory-autoloads + default-directory + (expand-file-name "loaddefs.el" bzrdir)) t))) (delete-directory homedir t)))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 13:54:40 2020 Received: (at 39823) by debbugs.gnu.org; 1 Oct 2020 17:54:40 +0000 Received: from localhost ([127.0.0.1]:38226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO2mp-0002dU-TN for submit@debbugs.gnu.org; Thu, 01 Oct 2020 13:54:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO2mm-0002dH-H8 for 39823@debbugs.gnu.org; Thu, 01 Oct 2020 13:54:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58586) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kO2md-0007he-Jj; Thu, 01 Oct 2020 13:54:26 -0400 Received: from [176.228.60.248] (port=2357 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kO2mS-0002HW-N7; Thu, 01 Oct 2020 13:54:13 -0400 Date: Thu, 01 Oct 2020 20:54:07 +0300 Message-Id: <83blhlhlxc.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87h7rdq2wu.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 01 Oct 2020 19:20:01 +0200) Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> <87mu4vn3kz.fsf@gmail.com> <87a6x747bq.fsf@gnus.org> <87h7rdq2wu.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, rms@gnu.org, maxim.cournoyer@gmail.com, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Date: Thu, 01 Oct 2020 19:20:01 +0200 > Cc: 39823@debbugs.gnu.org, rms@gnu.org, Noam Postavsky > > Lars Ingebrigtsen writes: > > > I think it would make more sense to introduce a new function, say, > > `make-directory-autoloads' (because it doesn't so much update the > > autoloads as create an autoload file, I think?) with a sane function > > signature, and then deprecate update-directory-autoloads (which is only > > used a handful of place in the Emacs tree). > > Man, that was a lot more invasive than I thought, because the > dynamically bound variable was used all over the place. > > But with the following patch > > (make-directory-autoloads "~/src/emacs/trunk/lisp/calc" "/tmp/autofoo.el") > > works. Emacs builds after applying the patch, and starts, and no tests > fail. > > Does this look OK to everybody? Before we go and make all these changes, how about considering the solution I proposed up-thread, i.e. leave this alone? I mean, is it really worth all this? It's an obscure use case with a very easy solution/workaround. But feel free to ignore me. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 14:06:25 2020 Received: (at 39823) by debbugs.gnu.org; 1 Oct 2020 18:06:26 +0000 Received: from localhost ([127.0.0.1]:38248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO2yH-0002wS-Nd for submit@debbugs.gnu.org; Thu, 01 Oct 2020 14:06:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO2yG-0002wF-De for 39823@debbugs.gnu.org; Thu, 01 Oct 2020 14:06:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vHjiFSSuUzAoWDgprlqiHgvHNkASSg/247mj12a0eEc=; b=mI9ET0SkoYLcX2XErvriu0PZ8l jsPGf5i/+tpBshsTcO/TVr0bDNY7GGrcJxpMtoa6TYGfinvpt1ktGLbToSHiX55d539giwdT+0KQp U4PiXfpE9QqzQJMnuLLq6nXB5FSy9iUqYJRprOCsLdSZD0JqYTl2ul3gcoBYOn28KZFI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO2y7-0001Pj-VL; Thu, 01 Oct 2020 20:06:18 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> <87mu4vn3kz.fsf@gmail.com> <87a6x747bq.fsf@gnus.org> <87h7rdq2wu.fsf@gnus.org> <83blhlhlxc.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEWXbEaac0////9M TvLDAAAAAWJLR0QCZgt8ZAAAAAd0SU1FB+QKARIEM3cTX/wAAAEoSURBVCjPTZJNrsYgCEUxgblf AvvBpM41KfvfyrtXO3gd9VQ4/FiJ/YZKurVMifEQujZJccvuIq4tl8TEB+lltguwUkXKZpXYgGD1 sLEXwbRr4H1JH6kIA7yAeQA550SEEEUbwMSvIIY1u7IXoO3pQQFgMsdjDpzoEVjxEd1woQ6Stuia bXjEZI5uA9gFr1MUNd+Ch0XlCjA7Ic48D0ZviDztPO1C4zx+gXVg++W1nQ7af4BAjmAcYHMUIGec Ez+CVUpzGHeg46z8Cp5txpUjrCSXcak22cHahCBAgFTsvWpf2wUKZGkkNzrHhgAACfa2PpgQIAf3 hjBuBzmAen/fRrM/3wnC8G/EcrtXkj4JbOAKVp+I2p+gHcEW72L4G2oWij7OeSBAzh9gyF5AZeCr OQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMC0wMVQxODowNDo1MCswMDowMEGUUCAAAAAldEVY dGRhdGU6bW9kaWZ5ADIwMjAtMTAtMDFUMTg6MDQ6NTArMDA6MDAwyeicAAAAAElFTkSuQmCC X-Now-Playing: Nanang Tatang's _Muki_: "Wake Up Call" Date: Thu, 01 Oct 2020 20:06:14 +0200 In-Reply-To: <83blhlhlxc.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 01 Oct 2020 20:54:07 +0300") Message-ID: <871rih4y95.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Before we go and make all these changes, how about considering the > solution I proposed up-thread, i.e. leave this alone? I mean, is it > really worth all this? It's an obscure use case with a very [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, rms@gnu.org, maxim.cournoyer@gmail.com, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Before we go and make all these changes, how about considering the > solution I proposed up-thread, i.e. leave this alone? I mean, is it > really worth all this? It's an obscure use case with a very easy > solution/workaround. I just feel that the logic in these functions is kinda obscure, what with the mix of dynamically-bound variables, function parameters and local variables. The patch removes the former from the mix, making them easier to reason about (and read). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 22:36:26 2020 Received: (at 39823) by debbugs.gnu.org; 2 Oct 2020 02:36:26 +0000 Received: from localhost ([127.0.0.1]:38853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOAvp-0000pY-Vw for submit@debbugs.gnu.org; Thu, 01 Oct 2020 22:36:26 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOAvo-0000pM-EJ for 39823@debbugs.gnu.org; Thu, 01 Oct 2020 22:36:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+UXkMySsyufIuVD1d/udw3DTUqrXMP7qlBAIp/TweHQ=; b=ogaWePTrniJedlDUBqpkk+Lg3X PSX1saRfxWohRFa1YGJksVIZe9ApYf+TMTuG+7UBUHlqoruN+a4WVsy4kMitZSe7OOSrDSAr6Y2Sh r7pGFXsJmG1vKq61v0HEzfyobEUkNSg4GYAazIyhZW52xykLvD3vuGeaEPdQfoiWvjr8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOAvZ-0006Vl-Ib; Fri, 02 Oct 2020 04:36:17 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> <87mu4vn3kz.fsf@gmail.com> <87a6x747bq.fsf@gnus.org> <87h7rdq2wu.fsf@gnus.org> <83blhlhlxc.fsf@gnu.org> <871rih4y95.fsf@gnus.org> X-Now-Playing: Ass's _My Get Up and Go Just Got Up and Went_: "Vertical Spar" Date: Fri, 02 Oct 2020 04:36:08 +0200 In-Reply-To: <871rih4y95.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 01 Oct 2020 20:06:14 +0200") Message-ID: <878scpxskn.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > I just feel that the logic in these functions is kinda obscure, what > with the mix of dynamically-bound variables, function parameters and > local variables. The patch removes the former from the m [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: 39823@debbugs.gnu.org, rms@gnu.org, maxim.cournoyer@gmail.com, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > I just feel that the logic in these functions is kinda obscure, what > with the mix of dynamically-bound variables, function parameters and > local variables. The patch removes the former from the mix, making them > easier to reason about (and read). I went ahead and pushed this change (which also fixes bug#38694) even if it was more invasive than I'd have preferred. I think the new interface is better, and anyway: Sunk cost fallacy. Let me know if I broke anything. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 22:36:33 2020 Received: (at control) by debbugs.gnu.org; 2 Oct 2020 02:36:33 +0000 Received: from localhost ([127.0.0.1]:38856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOAvx-0000pt-8r for submit@debbugs.gnu.org; Thu, 01 Oct 2020 22:36:33 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOAvv-0000pg-U3 for control@debbugs.gnu.org; Thu, 01 Oct 2020 22:36:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=SR0mcqqI2z5+tXJ68ph4MWdFOA6kwtN+G9kMkVkL91w=; b=kR1FueTpCy025RHiMTxHuuF7Ye 1MjVGKc566J191/2MV7eyoDk2Nl3gVP1fiMzbb3ChIRnbQgD+cKm6bV3vOP06W5mqHrwuBID0RSFN WGp4EiDEuvEVihQIY/pT1JozjBceR7xgrFyJLyV4BW2UJgMMu3/2JZVHIES4HQcxT39w=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOAvo-0006Vv-AU for control@debbugs.gnu.org; Fri, 02 Oct 2020 04:36:26 +0200 Date: Fri, 02 Oct 2020 04:36:23 +0200 Message-Id: <877ds9xsk8.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #39823 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 39823 fixed close 39823 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 39823 fixed close 39823 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 02 13:52:39 2020 Received: (at 39823) by debbugs.gnu.org; 2 Oct 2020 17:52:39 +0000 Received: from localhost ([127.0.0.1]:42484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOPEV-0001Wq-5G for submit@debbugs.gnu.org; Fri, 02 Oct 2020 13:52:39 -0400 Received: from mail-qv1-f43.google.com ([209.85.219.43]:41202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOPES-0001Wd-C7 for 39823@debbugs.gnu.org; Fri, 02 Oct 2020 13:52:37 -0400 Received: by mail-qv1-f43.google.com with SMTP id ef16so1247557qvb.8 for <39823@debbugs.gnu.org>; Fri, 02 Oct 2020 10:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rcNkZEfEVWHhJ4q4oMlq93LJaD7FxyF9mgdIONd/eP0=; b=enzp3PrvRmeDWY9D9zdxSdSJzFgh8wh8Y1I77TMxf2a1Tc2xRJRi9ec5PlJkRpB4OW MY1JoWIOacL9cmzBa2SkUmdRAPlXs3Wssp/MH0ka87OPHBNthLogM7f2JLkdUJxUKhTr gTmdL1uVAaRQrfV+zWKayy2uJaHhsxuF+j402I2h+ShfF68/cz818mNqbkZD/iQ0BR2k C5iixvgq5KG5toPRkmHraTaxkAS75sUXjzWbwq3WsukcCQP7+xiWNc02xvWKnRR2zyxL YI2/1LFNlfWw9qnGnIQQJM0ihL08haN3YU4iacFZiuLAVrLZccENZcs4VnLi1JeT8dU6 LpKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rcNkZEfEVWHhJ4q4oMlq93LJaD7FxyF9mgdIONd/eP0=; b=SwtB39/xOEAoqM0gmzXFzOVj/0NYzItZe3bU28FBRbKNNIOa1c6SVGjHhFpFRr9SbI v69f9FYhESolqwvPCpfyw70ArGSrRTdDbmaOE+7prxtmpHNSGqDx4PI9XaZA21hUcw7U QOcODkQESSR9VFFu/8ImAmoTs15AnQm45v3Buazkj50/yG74lNO3ymiZ/8UI7oQSAVc1 mDrKXl1PbkAW61V3X/Qge/2/xs0jJaEe5PHs4ICI8NPwXvvYrXzmcX33xlEHOQF27cmv EOyTJjTBBi8b/4MwFJMrkcGklFZT8Kjc+IFC/nFEnp0UM/mr0p5N43+ccb55rAb7ixSl eK+A== X-Gm-Message-State: AOAM531unCt0CpzkU4tdWjVlRmVtRyXyUuOe/lREFvBLiv4lJXgi4zRO lOUwjwbl8q+LssYlAFsu+1w= X-Google-Smtp-Source: ABdhPJwJLtWrLQERChWblxedoUBpAPc4IOvZPQmRMOixmej52aUquNZWiPxosgD9oblHYJbW2hzdvg== X-Received: by 2002:a0c:e5cf:: with SMTP id u15mr3147387qvm.24.1601661150854; Fri, 02 Oct 2020 10:52:30 -0700 (PDT) Received: from hurd (dsl-10-135-18.b2b2c.ca. [72.10.135.18]) by smtp.gmail.com with ESMTPSA id c192sm1550387qke.78.2020.10.02.10.52.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:52:30 -0700 (PDT) From: Maxim Cournoyer To: Lars Ingebrigtsen Subject: Re: bug#39823: 26.3; update-directory-autoloads regression from Emacs 26 to Emacs 27 References: <87zhd2lpad.fsf@gmail.com> <87o8t16q5e.fsf@gmail.com> <87y2rz4tgb.fsf@gmail.com> <87blo2k4wp.fsf@gmail.com> <83369eqyij.fsf@gnu.org> <87wo6qhqvd.fsf@gmail.com> <835ze9pzfq.fsf@gnu.org> <87mu78jhgz.fsf@gmail.com> <868sir8y85.fsf@gmail.com> <87mu4vn3kz.fsf@gmail.com> <87a6x747bq.fsf@gnus.org> <87h7rdq2wu.fsf@gnus.org> <83blhlhlxc.fsf@gnu.org> <871rih4y95.fsf@gnus.org> <878scpxskn.fsf@gnus.org> Date: Fri, 02 Oct 2020 13:54:11 -0400 In-Reply-To: <878scpxskn.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 02 Oct 2020 04:36:08 +0200") Message-ID: <87v9fsms3g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39823 Cc: Eli Zaretskii , npostavs@gmail.com, 39823@debbugs.gnu.org, rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Lars Ingebrigtsen writes: > Lars Ingebrigtsen writes: > >> I just feel that the logic in these functions is kinda obscure, what >> with the mix of dynamically-bound variables, function parameters and >> local variables. The patch removes the former from the mix, making them >> easier to reason about (and read). > > I went ahead and pushed this change (which also fixes bug#38694) even if > it was more invasive than I'd have preferred. I think the new interface > is better, and anyway: Sunk cost fallacy. Thanks for this work! I look forward to use the improved, more functional `make-directory-autoloads' procedure. Maxim From unknown Sun Jun 22 03:58:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 31 Oct 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator