[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix do
From: |
Eli Zaretskii |
Subject: |
Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text. |
Date: |
Wed, 14 Aug 2024 09:42:26 +0300 |
> Date: Wed, 14 Aug 2024 05:56:21 +0000
> From: Pip Cet <pipcet@protonmail.com>
> Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca
>
> "Eli Zaretskii" <eliz@gnu.org> writes:
>
> >> + ((and fn (memq feature features))
> >> + (funcall (if noerror #'warn #'error)
> >> + "Feature `%S' is now provided by a different file %s"
> >> + feature fn))
> >> + ((funcall (if noerror #'warn #'error)
> >> + "Could not load file %s to provide feature `%S'"
> >> + (or filename (symbol-name feature))
> >> + feature)))))
> >
> > The second message is not accurate, AFAIU.
>
> Can you provide an example for a case in which the message is emitted
> but is not accurate?
When fn is nil.
> > If NOEROR is equal to
> > 'reload', and the file for FEATURE could not be found,
> > require-with-check will signal an error from here:
> >
> > (let ((lh load-history)
> > (res (require feature filename (if (eq noerror 'reload) nil
> > noerror))))
>
> Correct, so we would never reach the code emitting the new message.
But the message text mainly describes this situation: "Could not load
file".
> > Also, if FILENAME was found, but it doesn't provide FEATURE, the
> > message text again doesn't provide accurate diagnostic.
>
> If FILENAME exists and is loadable, but doesn't provide FEATURE,
> 'require' will throw an error (even if NOERROR is t). So, again, we'd
> never reach the code emitting the new message.
And again, the error message will not describe the situation.
> > So I think we need 3 different messages, not 2.
>
> I don't understand what the third message would be.
For starters, that no FILENAME could be found for FEATURE.
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Pip Cet, 2024/08/12
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Eli Zaretskii, 2024/08/12
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Pip Cet, 2024/08/13
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Eli Zaretskii, 2024/08/13
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Pip Cet, 2024/08/13
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Eli Zaretskii, 2024/08/13
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Pip Cet, 2024/08/13
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Eli Zaretskii, 2024/08/13
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Pip Cet, 2024/08/14
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text.,
Eli Zaretskii <=
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Pip Cet, 2024/08/14
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Eli Zaretskii, 2024/08/14
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Pip Cet, 2024/08/15
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Eli Zaretskii, 2024/08/15
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Pip Cet, 2024/08/15
- Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text., Eli Zaretskii, 2024/08/15