GNU bug report logs -
#28113
25.2; `ignore-errors' around `require'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Wed, 16 Aug 2017 20:13:02 UTC
Severity: minor
Tags: unreproducible
Found in version 25.2
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28113 in the body.
You can then email your comments to 28113 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28113
; Package
emacs
.
(Wed, 16 Aug 2017 20:13:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 16 Aug 2017 20:13:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm guessing that there is not a bug here, as this seems to happen for
all Emacs versions I have. But it seems like it should be a bug. I
would like to understand it, in any case.
In crosshairs.el I require vline.el and hl-line+.el:
(require 'vline)
(require 'hl-line+)
In start.el I wrap requiring crosshairs.el with `ignore-errors'
(`condition-case', for compatibility with older releases):
(condition-case nil
(require 'crosshairs nil t)
(error nil))
If I remove vline.el from my load-path and then try to load
crosshairs.el then I get this error:
Debugger entered--Lisp error: (file-error "Cannot open load file" "No such file or directory" "vline")
require(vline)
byte-code("..." [require vline custom-declare-group column-highlight nil "..."] 20)
require(col-highlight)
byte-code("..." [require hl-line+ col-highlight custom-declare-group crosshairs nil "..." ...] 20)
require(crosshairs nil t)
Why is that? Shouldn't the `condition-case' cause the load error for
vline.el to be ignored, since it occurs as part of the loading of
crosshairs.el?
In GNU Emacs 25.2.1 (x86_64-w64-mingw32)
of 2017-04-24 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
'configure --without-dbus --without-compress-install 'CFLAGS=-O2
-static -g3''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28113
; Package
emacs
.
(Wed, 16 Aug 2017 22:00:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 28113 <at> debbugs.gnu.org (full text, mbox):
tags 28113 + unreproducible
quit
On Wed, Aug 16, 2017 at 4:11 PM, Drew Adams <drew.adams <at> oracle.com> wrote:
> I'm guessing that there is not a bug here, as this seems to happen for
> all Emacs versions I have.
Works for me. I tried
emacs -Q -f toggle-debug-on-error -l start.el
where start.el has
(condition-case err
(let ((load-path (cons default-directory load-path)))
(require 'load-some-nonexistent-files))
(error (message "caught error: %S" err)))
And load-some-nonexistent-files.el has
(require 'there-is-no-such-file)
(provide 'load-some-nonexistent-files)
I get
Debug on Error enabled globally
caught error: (file-error "Cannot open load file"
"no such file or directory"
"there-is-no-such-file")
in *Messages*.
Tested in 24.3 and 25.1.
Added tag(s) unreproducible.
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Wed, 16 Aug 2017 22:00:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28113
; Package
emacs
.
(Wed, 16 Aug 2017 22:40:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 28113 <at> debbugs.gnu.org (full text, mbox):
> tags 28113 + unreproducible
> quit
>
> Works for me. I tried
> emacs -Q -f toggle-debug-on-error -l start.el
> where start.el has
> (condition-case err
> (let ((load-path (cons default-directory load-path)))
> (require 'load-some-nonexistent-files))
> (error (message "caught error: %S" err)))
> And load-some-nonexistent-files.el has
> (require 'there-is-no-such-file)
> (provide 'load-some-nonexistent-files)
>
> I get
> Debug on Error enabled globally
> caught error: (file-error "Cannot open load file"
> "no such file or directory"
> "there-is-no-such-file")
>
> in *Messages*.
> Tested in 24.3 and 25.1.
OK, I won't worry about it. It's actually more complicated, and I
don't have the time or worry to track it down more.
FYI - The files all exist and are in my load path, when I byte-compile
them. If I then start with emacs -Q and set the load-path so that it
can see all except vline.el (which is in a different dir) then the error
is raised.
I'm guessing that it is because of the files being compiled (no error
was raised when compiling because the load-path then was fuller, picking
up vline.el).
Also (perhaps relevant), the condition-case is itself not at top level
but is wrapped in a (when...) test for an emacs-major-version minimum.
Anyway, thanks for taking a look.
bug closed, send any further explanations to
28113 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com>
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Wed, 16 Aug 2017 23:18:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 14 Sep 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 339 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.