Subject: Re: bug#76131: 30.0.93; vlf: advice for abort-if-file-too-large seems broken in Emacs 30

From: Eli Zaretskii <[email-masked]>
Date: Sat, 08 Feb 2025 09:50:42 +0200

> Date: Fri, 7 Feb 2025 21:39:45 +0100
> From:  fap via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> After upgrading to Emacs 30 I couldn't open files anymore
> with (vlf-setup) applied / required.
> 
> The backtrace is as follows:
> 
> Debugger entered--Lisp error: (void-variable always)
>    ad-Advice-abort-if-file-too-large(#f(compiled-function (size op-type 
> filename &optional offer-raw) "If file SIZE larger than 
> `large-file-warning-threshold', allow user to abort.\nOP-TYPE specifies 
> the file operation being performed (for message\nto user).  If OFFER-RAW 
> is true, give user the additional option\nto open the file literally. 
> If the user chooses this option,\n`abort-if-file-too-large' returns the 
> symbol `raw'.  Otherwise,\nit returns nil or exits non-locally." 
> #<bytecode -0x118b121ca418257d>) 16007 "open" 
> "~/.local/share/chezmoi/emacs/github-pandoc.css" t)
>    apply(ad-Advice-abort-if-file-too-large #f(compiled-function (size 
> op-type filename &optional offer-raw) "If file SIZE larger than 
> `large-file-warning-threshold', allow user to abort.\nOP-TYPE specifies 
> the file operation being performed (for message\nto user).  If OFFER-RAW 
> is true, give user the additional option\nto open the file literally. 
> If the user chooses this option,\n`abort-if-file-too-large' returns the 
> symbol `raw'.  Otherwise,\nit returns nil or exits non-locally." 
> #<bytecode -0x118b121ca418257d>) (16007 "open" 
> "~/.local/share/chezmoi/emacs/github-pandoc.css" t))
>    abort-if-file-too-large(16007 "open" 
> "~/.local/share/chezmoi/emacs/github-pandoc.css" t)
>   
> find-file-noselect("/home/fap/.local/share/chezmoi/emacs/github-pandoc.css" 
> nil nil t)
>    find-file("/home/fap/.local/share/chezmoi/emacs/github-pandoc.css" t)
>    funcall-interactively(find-file 
> "/home/fap/.local/share/chezmoi/emacs/github-pandoc.css" t)
>    call-interactively(find-file nil nil)
>    command-execute(find-file)
> 
> I looked at the code, but I don't really get how 'always could get
> interpreted as a variable?

I cannot reproduce this.  Does the problem happen if you load
vlf-setup.el manually, as a Lisp (not compiled) file?

Also, which version of vlf do you have?