* bug#54491: 27.2; left-margin variable breaks autoload generation
@ 2022-03-21 8:05 Will Tower
2022-03-21 12:43 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Will Tower @ 2022-03-21 8:05 UTC (permalink / raw)
To: 54491
[-- Attachment #1: Type: text/plain, Size: 13972 bytes --]
First message got cut off because yanked in the above the text follows
line in a mu4e buffer, sorry!
Setting left-margin variable breaks many autoload files when installing or updating packages.
Steps to reproduce (arch linux, GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.4) of 2022-03-11)
1. Delete all installed versions of magit (our test package)
a. for me this looks like calling M-x package-delete return magit until I can't delete anything else
2. from command line, emacs -Q
3. yank reproduction config file into a scratch buffer of clean emacs instance:
(custom-set-variables
'(left-margin 8)
)
(setq byte-compile-warnings '(cl-functions))
;;Initialize package sources
(require 'package)
(setq package-archives
'(
("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")
)
)
4. M-x eval-buffer return
5. M-x package-install return magit
6. Notice a bunch of a compiler warnings and errors, I usually receive something about autoloads 105
7. Examine magit-autoloads.el file
8. Notice that some of the generated autoloads have mismatched delimiters, (" appearing on the second line of an autoload, in a region that is supposed to be a comment is fairly common, like
(autoload 'magit-wip-before-change-mode "magit-wip" "\
("Commit to work-in-progress refs before certain destructive changes.
If called interactively, enable Magit-Wip-Before-Change
mode if ARG is positive, and disable it if ARG is zero or
negative. If called from Lisp, also enable the mode if
ARG is omitted or nil, and toggle it if ARG is `toggle';
disable the mode otherwise.
Before invoking a revert command or an \"apply variant\"
command (apply, stage, unstage, discard, and reverse) commit the
affected tracked files to the current wip refs. For each branch
there may be two wip refs; one contains snapshots of the files
as found in the worktree and the other contains snapshots of the
entries in the index.
Only changes to files which could potentially be affected by the
command which is about to be called are committed.
\(fn &optional ARG)" 69 70 (face default) 126 127 (face default) 185 186 (face default) 242 243 (face default) 300 301 (face default)) t nil)
face default mismatched paren occurs sometimes (I've only reproduced
that with my full init.el though). These mismatched delimiters do not
appear upstream!
9. This does not necessarily break the autoload it happens to, but it will tend to break all subsequent autoloads in the file, and it is fairly difficult for a user to understand why this would happen.
10. You can toggle this error on and off by following steps to reproduce and commenting or uncommenting the left-margin line.
a. it is important you start with a fresh instance of emacs each time, setting left-margin, commenting the line, then reevaluting the buffer will leave left-margin still set, and the error will still occur
11. This happens for a bunch of packages! org-roam, lsp-mode, magit, valign, some ivy packages, some ivy stuff, treemacs, company, the list is long.
william.emerson.tower@gmail.com writes:
> Steps to reproduce (arch linux, GNU Emacs 27.2 (build 1,
> x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.4) of
> 2022-03-11)
> 1. Delete all installed versions of magit (our test package)
> a. for me this looks like calling M-x package-delete return magit until I
> can't delete anything else
> 2. from command line, emacs -Q
> 3. yank reproduction config file into a scratch buffer of clean emacs
> instance:
> (custom-set-variables
> '(left-margin 8)
> )
> (setq byte-compile-warnings '(cl-functions))
> ;;Initialize package sources
> (require 'package)
> (setq package-archives
> '(
> ("melpa" . "https://melpa.org/packages/")
> ("org" . "https://orgmode.org/elpa/")
> ("elpa" . "https://elpa.gnu.org/packages/")
> )
> )
> 4. M-x eval-buffer return
> 5. M-x package-install return magit
> 6. Notice a bunch of a compiler warnings and errors, I usually receive
> something about autoloads 105
> 7. Examine magit-autoloads.el file
> 8. Notice that some of the generated autoloads have mismatched delimiters,
> (" appearing on the second line of an autoload, in a region that is
> supposed to be a comment is fairly common, like
> (autoload 'magit-wip-before-change-mode "magit-wip" "\
> ("Commit to work-in-progress refs before certain destructive changes.
> If called interactively, enable Magit-Wip-Before-Change
> mode if ARG is positive, and disable it if ARG is zero or
> negative. If called from Lisp, also enable the mode if
> ARG is omitted or nil, and toggle it if ARG is `toggle';
> disable the mode otherwise.
> Before invoking a revert command or an \"apply variant\"
> command (apply, stage, unstage, discard, and reverse) commit the
> affected tracked files to the current wip refs. For each branch
> there may be two wip refs; one contains snapshots of the files
> as found in the worktree and the other contains snapshots of the
> entries in the index.
> Only changes to files which could potentially be affected by the
> command which is about to be called are committed.
> \(fn &optional ARG)" 69 70 (face default) 126 127 (face default) 185 186
> (face default) 242 243 (face default) 300 301 (face default)) t nil)
> face default mismatched paren occurs sometimes (I've only reproduced that
> with my full init.el though).
> 9. This does not necessarily break the autoload it happens to, but it will
> tend to break all subsequent autoloads in the file, and it is fairly
> difficult for a user to understand why this would happen.
> 10. You can toggle this error on and off by following steps to reproduce
> and commenting or uncommenting the left-margin line.
> a. it is important you start with a fresh instance of emacs each time,
> setting left-margin, commenting the line, then reevaluting the buffer will
> leave left-margin still set, and the error will still occur
> 11. This happens for a bunch of packages! org-roam, lsp-mode, magit,
> valign, some ivy packages (all-the-icons), treemacs, company, etc.
> Date: Mon, 21 Mar 2022 03:55:59 -0400
> Message-ID: <87fsnbhh80.fsf@Gernn.i-did-not-set--mail-host-address--so-tickle-me>
>
> --=-=-=
> Content-Type: text/plain
>
>
>
>
>
> In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.4)
> of 2022-03-11 built on arojas
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
> System Description: Arch Linux
>
> Recent messages:
> next-line: End of buffer [29 times]
> previous-line: Beginning of buffer [5 times]
> next-line: End of buffer [6 times]
> Quit
> previous-line: Beginning of buffer [11 times]
> C-' is undefined
> next-line: End of buffer [3 times]
> Mark set
> previous-line: Beginning of buffer [9 times]
> Saved text until "ff, treemacs, company, the list is long."
>
> Configured using:
> 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
> --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-wide-int
> --with-modules --with-cairo --with-harfbuzz 'CFLAGS=-march=x86-64
> -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2
> -Wformat -Werror=format-security -fstack-clash-protection
> -fcf-protection -flto=auto'
> 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto''
>
> Configured features:
> XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
> INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
> TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
> PDUMPER LCMS2 GMP
>
> Important settings:
> value of $LANG: en_US.UTF-8
> locale-coding-system: utf-8-unix
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
> which-key-mode: t
> doom-modeline-mode: t
> openwith-mode: t
> rainbow-delimiters-mode: t
> shell-dirtrack-mode: t
> ivy-prescient-mode: t
> override-global-mode: t
> counsel-mode: t
> org-roam-db-autosync-mode: t
> ivy-rich-mode: t
> ivy-mode: t
> global-whitespace-mode: t
> global-display-line-numbers-mode: t
> display-line-numbers-mode: t
> global-eldoc-mode: t
> eldoc-mode: t
> electric-indent-mode: t
> mouse-wheel-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> auto-composition-mode: t
> auto-encryption-mode: t
> auto-compression-mode: t
> column-number-mode: t
> line-number-mode: t
> global-visual-line-mode: t
> visual-line-mode: t
> transient-mark-mode: t
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug face-remap which-key all-the-icons-dired
> dired-aux dired-hide-dotfiles doom-modeline doom-modeline-segments
> doom-modeline-env doom-modeline-core shrink-path f s smtpmail sendmail
> openwith elfeed-goodies-logging elfeed-goodies-new-entry-hooks mm-url
> gnus nnheader elfeed-goodies-split-pane popwin elfeed-goodies-show-mode
> link-hint ffap goto-addr avy elfeed-goodies-search-mode powerline
> powerline-separators powerline-themes elfeed-goodies elfeed-show
> elfeed-search wid-edit vc-git diff-mode rainbow-delimiters bookmark
> message rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
> rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev mail-utils
> gmm-utils mailheader shr text-property-search svg dom elfeed-csv elfeed
> elfeed-curl elfeed-log elfeed-db elfeed-lib thingatpt url-queue
> xml-query xml flyspell ispell org-roam-ui org-roam-dailies simple-httpd
> pp websocket bindat org-roam-protocol org-protocol org-tempo tempo
> ob-shell ob-R ob-makefile ob-C cc-mode cc-fonts cc-guess cc-menus
> cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-latex ob-matlab
> ob-octave ob-sqlite ob-sql ob-python python tramp-sh tramp
> tramp-loaddefs trampver tramp-integration files-x tramp-compat shell
> parse-time iso8601 ls-lisp org-habit org-agenda visual-fill-column hydra
> lv ivy-prescient prescient doom-palenight-theme doom-themes
> doom-themes-base all-the-icons all-the-icons-faces data-material
> data-weathericons data-octicons data-fileicons data-faicons
> data-alltheicons server no-littering diary-lib diary-loaddefs
> auto-package-update use-package use-package-ensure use-package-delight
> use-package-diminish use-package-bind-key bind-key use-package-core
> finder-inf counsel xdg xref project dired dired-loaddefs compile swiper
> cl-extra help-mode disp-table org-roam-migrate org-roam-mode
> org-roam-capture org-roam-id org-roam-node org-roam-db org-roam-utils
> org-roam-compat org-roam org-capture org-element avl-tree generator
> org-id org-refile org ob ob-tangle ob-ref ob-lob ob-table ob-exp
> org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint
> ansi-color org-list org-faces org-entities time-date noutline outline
> easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table ol
> org-keys org-compat org-macs org-loaddefs format-spec find-func cal-menu
> calendar cal-loaddefs emacsql-sqlite url-http url-auth mail-parse
> rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc
> puny url url-proxy url-privacy url-expand url-methods url-history
> url-cookie url-domsuf url-util mailcap advice emacsql emacsql-compiler
> magit-section rx dash ivy-rich ivy delsel ring ivy-faces ivy-overlay
> colir color whitespace display-line-numbers cus-start cus-load info
> edmacro kmacro package easymenu browse-url url-handlers url-parse
> auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
> password-cache json subr-x map url-vars seq byte-opt gv bytecomp
> byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
> ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
> term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
> tabulated-list replace newcomment text-mode elisp-mode lisp-mode
> prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
> select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
> term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
> misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
> cp51932 hebrew greek romanian slovak czech european ethiopic indian
> cyrillic chinese composite charscript charprop case-table epa-hook
> jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
> button faces cus-face macroexp files text-properties overlay sha1 md5
> base64 format env code-pages mule custom widget hashtable-print-readable
> backquote threads dbusbind inotify lcms2 dynamic-setting
> system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
> x multi-tty make-network-process emacs)
>
> Memory information:
> ((conses 16 500182 165828)
> (symbols 48 38330 1)
> (strings 32 158772 24996)
> (string-bytes 1 4768332)
> (vectors 16 52189)
> (vector-slots 8 728383 236036)
> (floats 8 1031 859)
> (intervals 56 1543 2656)
> (buffers 1000 13))
>
> --=-=-=
> Content-Type: application/pgp-signature; name="signature.asc"
>
> -----BEGIN PGP SIGNATURE-----
>
> iQIzBAEBCAAdFiEEiSbLQ+ckl/gKHXxrb5GFhP3P650FAmI4L6UACgkQb5GFhP3P
> 653aww/9Gy1Zq7xUfL9hI7iuBEfcSQb+KJM7Mnb6+zDL3OTBT0cdzQtGqkJQ4icH
> wKp/ioGdg8RpopzlSIPHyEMNrUWoaGpbmEuYsvaODH0ZIakTPO6NQqJnUI9lwHE3
> LL4/x9xDlQb2wo1CgGLjxPtXnZpBUosReGWWVmzoJYaFBhjXFWCj10NWuVlcygs7
> wTAljQls3O8wM0AoEn5bnEJoI514VnmQFAtrA8bFT2+Q3k8dxwxtFqbhalMO4+Rr
> NnEqVtHyYmZy+6Oa7zrSAZy1ejsJIfymSpaHjJ/Yc+vslGCfpNoUSU6n8uGUIyqf
> uTgaqBpRtuLL96/06zysEbv6VVowxmcTZccd/MnP3K0z0OE/jWUnx3oEm/mzDDJh
> DT/e0huPb3s5Gx6CpSgZoRu/XuOXZXpEzmNLwQOdrVck+GQMtWFr1H8jkvPlJ0dU
> GlbuKRx7LhbNgI3VJISzLfNUmDidRNes7gHDjswJ6x9alFKczV1zQKrE0YUIB6dt
> lH4yM7XwGAapEoKhhoNlWVrxU2zVZ0E0j+USUKCjYYapjDuseMuc0GjIlrHIJKmA
> MYk+3Yz9aL1tTt3GR/zRMLhv4NUoZmYER5u0+EwiagNecUaP2MQXQseWZsDq013w
> aUWIkSZphRzbCAOJiTS9/VR7D1gImCMZHA9hj26mbMjZlDfA+60=
> =Cp1E
> -----END PGP SIGNATURE-----
> --=-=-=--
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#54491: 27.2; left-margin variable breaks autoload generation
2022-03-21 8:05 bug#54491: 27.2; left-margin variable breaks autoload generation Will Tower
@ 2022-03-21 12:43 ` Eli Zaretskii
2022-03-21 13:48 ` Andreas Schwab
2022-03-21 15:19 ` Lars Ingebrigtsen
2022-06-12 14:33 ` chris
2 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-03-21 12:43 UTC (permalink / raw)
To: Will Tower; +Cc: 54491
> From: Will Tower <william.emerson.tower@gmail.com>
> Date: Mon, 21 Mar 2022 04:05:52 -0400
>
> Steps to reproduce (arch linux, GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.4) of 2022-03-11)
> 1. Delete all installed versions of magit (our test package)
> a. for me this looks like calling M-x package-delete return magit until I can't delete anything else
> 2. from command line, emacs -Q
> 3. yank reproduction config file into a scratch buffer of clean emacs instance:
>
> (custom-set-variables
> '(left-margin 8)
> )
> (setq byte-compile-warnings '(cl-functions))
>
> ;;Initialize package sources
> (require 'package)
> (setq package-archives
> '(
> ("melpa" . "https://melpa.org/packages/")
> ("org" . "https://orgmode.org/elpa/")
> ("elpa" . "https://elpa.gnu.org/packages/")
> )
> )
>
> 4. M-x eval-buffer return
> 5. M-x package-install return magit
> 6. Notice a bunch of a compiler warnings and errors, I usually receive something about autoloads 105
> 7. Examine magit-autoloads.el file
> 8. Notice that some of the generated autoloads have mismatched delimiters, (" appearing on the second line of an autoload, in a region that is supposed to be a comment is fairly common, like
I have hard time imagining how display margins, which are purely a
display feature, could ever affect the results of byte compilation or
any other processing of Lisp programs.
Could you perhaps show a simpler reproduction recipe, one that
wouldn't require installing 3rd-part packages from the various ELPAs?
We use autoloading in many Lisp files in the core, so if the problem
is real and general enough, any Lisp file that uses autoloading should
do, right?
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#54491: 27.2; left-margin variable breaks autoload generation
2022-03-21 12:43 ` Eli Zaretskii
@ 2022-03-21 13:48 ` Andreas Schwab
2022-03-21 14:49 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2022-03-21 13:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 54491, Will Tower
On Mär 21 2022, Eli Zaretskii wrote:
> I have hard time imagining how display margins, which are purely a
> display feature,
left-margin isn't a display feature, you've probably confused it with
left-margin-width.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#54491: 27.2; left-margin variable breaks autoload generation
2022-03-21 13:48 ` Andreas Schwab
@ 2022-03-21 14:49 ` Eli Zaretskii
0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-03-21 14:49 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 54491, william.emerson.tower
> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Will Tower <william.emerson.tower@gmail.com>, 54491@debbugs.gnu.org
> Date: Mon, 21 Mar 2022 14:48:25 +0100 (CET)
>
> On Mär 21 2022, Eli Zaretskii wrote:
>
> > I have hard time imagining how display margins, which are purely a
> > display feature,
>
> left-margin isn't a display feature, you've probably confused it with
> left-margin-width.
Yes, I did. Sorry about my confusion.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#54491: 27.2; left-margin variable breaks autoload generation
2022-03-21 8:05 bug#54491: 27.2; left-margin variable breaks autoload generation Will Tower
2022-03-21 12:43 ` Eli Zaretskii
@ 2022-03-21 15:19 ` Lars Ingebrigtsen
2022-03-21 17:27 ` Eli Zaretskii
2022-06-12 14:33 ` chris
2 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-21 15:19 UTC (permalink / raw)
To: Will Tower; +Cc: 54491
Will Tower <william.emerson.tower@gmail.com> writes:
> Setting left-margin variable breaks many autoload files when
> installing or updating packages.
Easier reproduction (well, if you're in the development tree):
diff --git a/src/buffer.c b/src/buffer.c
index f8a7a4f510..e567a8e23c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5334,7 +5334,7 @@ init_buffer_once (void)
bset_enable_multibyte_characters (&buffer_defaults, Qt);
bset_buffer_file_coding_system (&buffer_defaults, Qnil);
XSETFASTINT (BVAR (&buffer_defaults, fill_column), 70);
- XSETFASTINT (BVAR (&buffer_defaults, left_margin), 0);
+ XSETFASTINT (BVAR (&buffer_defaults, left_margin), 8);
bset_cache_long_scans (&buffer_defaults, Qt);
bset_file_truename (&buffer_defaults, Qnil);
XSETFASTINT (BVAR (&buffer_defaults, display_count), 0);
and then "make ldefs-boot.el", and observe that ldefs-boot.el is broken:
(autoload 'allout-widgets-mode "allout-widgets" "\
("Toggle Allout Widgets mode.
This is a minor mode. If called interactively, toggle the
`Allout-Widgets mode' mode. If the prefix argument is
positive, enable the mode, and if it is zero or negative,
disable the mode.
instead of
(autoload 'allout-mode "allout" "\
Toggle Allout outline mode.
This is a minor mode. If called interactively, toggle the `Allout
mode' mode. If the prefix argument is positive, enable the mode, and
if it is zero or negative, disable the mode.
(Although you may find it difficult to then actually build Emacs
afterwards.)
I haven't tried debugging further -- is it obvious to anybody else
what's breaking here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#54491: 27.2; left-margin variable breaks autoload generation
2022-03-21 15:19 ` Lars Ingebrigtsen
@ 2022-03-21 17:27 ` Eli Zaretskii
2022-03-21 18:17 ` Lars Ingebrigtsen
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-03-21 17:27 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 54491, william.emerson.tower
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 21 Mar 2022 16:19:20 +0100
> Cc: 54491@debbugs.gnu.org
>
> (autoload 'allout-widgets-mode "allout-widgets" "\
> ("Toggle Allout Widgets mode.
>
> This is a minor mode. If called interactively, toggle the
> `Allout-Widgets mode' mode. If the prefix argument is
> positive, enable the mode, and if it is zero or negative,
> disable the mode.
>
>
>
> instead of
>
>
> (autoload 'allout-mode "allout" "\
> Toggle Allout outline mode.
>
> This is a minor mode. If called interactively, toggle the `Allout
> mode' mode. If the prefix argument is positive, enable the mode, and
> if it is zero or negative, disable the mode.
>
>
> (Although you may find it difficult to then actually build Emacs
> afterwards.)
>
> I haven't tried debugging further -- is it obvious to anybody else
> what's breaking here?
Looks like adaptive-fill? lisp-mode defines various indent-* and
fill-* functions, so perhaps the extra open parenthesis is the
"prefix" it decides to use when filling/indenting?
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#54491: 27.2; left-margin variable breaks autoload generation
2022-03-21 17:27 ` Eli Zaretskii
@ 2022-03-21 18:17 ` Lars Ingebrigtsen
0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-21 18:17 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 54491, william.emerson.tower
Eli Zaretskii <eliz@gnu.org> writes:
> Looks like adaptive-fill? lisp-mode defines various indent-* and
> fill-* functions, so perhaps the extra open parenthesis is the
> "prefix" it decides to use when filling/indenting?
Sounds likely. I've now fixed this in the most straight-forward way I
could think of in Emacs 29 (i.e., by just binding left-margin to zero
before doing any of this stuff), and that seems to fix the problem.
Here's the reproducer I used:
(let ((left-margin 8)) (make-directory-autoloads "~/src/emacs/trunk/lisp/" "/tmp/out.el"))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#54491: 27.2; left-margin variable breaks autoload generation
2022-03-21 8:05 bug#54491: 27.2; left-margin variable breaks autoload generation Will Tower
2022-03-21 12:43 ` Eli Zaretskii
2022-03-21 15:19 ` Lars Ingebrigtsen
@ 2022-06-12 14:33 ` chris
2 siblings, 0 replies; 8+ messages in thread
From: chris @ 2022-06-12 14:33 UTC (permalink / raw)
To: 54491
I've just recomplied emacs with latest master:
```
$ git --no-pager grep "left-margin 0" 8c252e2326:lisp/emacs-lisp/autoload.el
8c252e2326:lisp/emacs-lisp/autoload.el: (left-margin 0)
```
Build emacs with:
```
git pull; git clean -dfx; git checkout master; ./autogen.sh; ./configure --prefix="$HOME/.local" --with-pgtk; make -j$(nproc)
```
Start emacs with:
`/path_to_emacs_clone/emacs/src/emacs -Q --load ~/.emacs.d/myinit-dev.el --daemon; /path_to_emacs_clone/emacs/lib-src/emacsclient --create-frame --alternate-editor="" &`
Right after that I do:
```
(make-directory-autoloads "~/.emacs.d/straight/repos/minimap/" "/tmp/minimap-autoloads-left-margin-0.el")
```
on input:
```
$ git -C ~/.emacs.d/straight/repos/minimap/ rev-parse --short HEAD
ed74906
```
And it gives:
```
;;; minimap-autoloads-left-margin-0.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate--rubric' function.
;; This file is part of GNU Emacs.
;;; Code:
\f
;;;### (autoloads nil "../home/chris/.emacs.d/straight/repos/minimap/minimap"
;;;;;; "../home/chris/.emacs.d/straight/repos/minimap/minimap.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from ../home/chris/.emacs.d/straight/repos/minimap/minimap.el
(defvar minimap-mode nil "\
Non-nil if Minimap mode is enabled.
See the `minimap-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `minimap-mode'.")
(custom-autoload 'minimap-mode "../home/chris/.emacs.d/straight/repos/minimap/minimap" nil)
(autoload 'minimap-mode "../home/chris/.emacs.d/straight/repos/minimap/minimap" "\
("Toggle minimap mode.
This is a global minor mode. If called interactively, toggle the
`Minimap mode' mode. If the prefix argument is positive, enable
the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is `toggle'. Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate `(default-value \\='minimap-mode)'.
The mode's hook is called both when the mode is enabled and when
it is disabled.
\(fn &optional ARG)" 335 336 (fill-space " ")) t nil)
(register-definition-prefixes "../home/chris/.emacs.d/straight/repos/minimap/minimap" '("minimap-"))
;;;***
\f
;;; End of scraped data
(provide 'minimap-autoloads-left-margin-0)
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8-emacs-unix
;; End:
;;; minimap-autoloads-left-margin-0.el ends here
```
This grep shows the error is present:
```
$ grep -A2 "(autoload 'minimap-mode" /tmp/minimap-autoloads-left-margin-0.el
(autoload 'minimap-mode "../home/chris/.emacs.d/straight/repos/minimap/minimap" "\
("Toggle minimap mode.
```
Initially I stumbled on that from `straight.el`:
`(straight-use-package 'minimap)` sort of command fails most of the time. With:
`Debugger entered--Lisp error: (invalid-read-syntax "." 29 56)`
```
$ sed -n '20,29p' ~/.emacs.d/straight/build/minimap/minimap-autoloads.el
(custom-autoload 'minimap-mode "minimap" nil)
(autoload 'minimap-mode "minimap" "\
("Toggle minimap mode.
This is a global minor mode. If called interactively, toggle the
`Minimap mode' mode. If the prefix argument is positive, enable
the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is `toggle'. Enable
```
I have no idea how to fix this issue which is presenting itself very often.
Thanks
Chris
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-06-12 14:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-21 8:05 bug#54491: 27.2; left-margin variable breaks autoload generation Will Tower
2022-03-21 12:43 ` Eli Zaretskii
2022-03-21 13:48 ` Andreas Schwab
2022-03-21 14:49 ` Eli Zaretskii
2022-03-21 15:19 ` Lars Ingebrigtsen
2022-03-21 17:27 ` Eli Zaretskii
2022-03-21 18:17 ` Lars Ingebrigtsen
2022-06-12 14:33 ` chris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.