GNU bug report logs -
#32056
too many arguments for abort-if-file-too-large
Previous Next
Reported by: Gian Uberto Lauri <saint <at> eng.it>
Date: Thu, 5 Jul 2018 08:31:02 UTC
Severity: normal
Tags: notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 32056 in the body.
You can then email your comments to 32056 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#32056
; Package
emacs
.
(Thu, 05 Jul 2018 08:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gian Uberto Lauri <saint <at> eng.it>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 05 Jul 2018 08:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Good morning,
today I pulled the latest source, compiled the Editor and tried to run
it.
My .emacs file contains a (find-file ), and it failed.
Further investigation revealed that in line 2158 in files.el contains a
call to abort-if-file-too-large with an extra argument that cause the
find-file command to fail.
I attach my trivial fix.
By the way, I discovered that the focus-frame function disappeared.
I used it to give the focus to the special frame I use for e-mail.
--
ing. Gian Uberto Lauri
Senior Solution Developer
Dir. Tecnica Innovazione Ricerca / Tech. Innovation & Research Div.
GianUberto.Lauri <at> eng.it
Sun Java Certified Programmer
Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD)
Tel. +39-049.8283.533 | main(){printf(&unix["\021%six\012\0"],
Fax +39-049.8283.569 | (unix)["have"]+"fun"-0x60);}
http://www.eng.it | David Korn, AT&T Bell Labs
| ioccc best One Liner, 1987
[0001-Solves-a-compilation-error.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#32056
; Package
emacs
.
(Thu, 05 Jul 2018 10:24:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 32056 <at> debbugs.gnu.org (full text, mbox):
"Gian Uberto Lauri" <saint <at> eng.it> writes:
> Good morning,
>
> today I pulled the latest source, compiled the Editor and tried to run
> it.
>
> My .emacs file contains a (find-file ), and it failed.
>
> Further investigation revealed that in line 2158 in files.el contains a
> call to abort-if-file-too-large with an extra argument that cause the
> find-file command to fail.
>
The signature of that function is:
(defun abort-if-file-too-large (size op-type filename &optional offer-raw)
so the 4th argument should be ok. I suspect you have your own
definition of abort-if-file-too-large somewhere.
> I attach my trivial fix.
>
> By the way, I discovered that the focus-frame function disappeared.
> I used it to give the focus to the special frame I use for e-mail.
Hmm, that function was marked as doing nothing, and had been for some
time. 'select-frame' perhaps, or 'select-frame-set-input-focus' might
do what you want.
Regards
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#32056
; Package
emacs
.
(Thu, 05 Jul 2018 11:14:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 32056 <at> debbugs.gnu.org (full text, mbox):
retitle 32056 too many arguments for abort-if-file-too-large
tags 32056 + notabug
quit
Robert Pluim <rpluim <at> gmail.com> writes:
>>
>> Further investigation revealed that in line 2158 in files.el contains a
>> call to abort-if-file-too-large with an extra argument that cause the
>> find-file command to fail.
>>
>
> The signature of that function is:
>
> (defun abort-if-file-too-large (size op-type filename &optional offer-raw)
>
> so the 4th argument should be ok. I suspect you have your own
> definition of abort-if-file-too-large somewhere.
Specifically, the 4th argument was added recently in [1: 416ba369c4] for
both the function definition and caller.
[1: 416ba369c4]: 2018-06-07 22:05:33 -0700
Offer to open large files without modes
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=416ba369c4ee2592d226eef68aeb4ad35ffea61d
Changed bug title to 'too many arguments for abort-if-file-too-large' from 'Small patch'
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 05 Jul 2018 11:14:02 GMT)
Full text and
rfc822 format available.
Added tag(s) notabug.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 05 Jul 2018 11:14:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#32056
; Package
emacs
.
(Thu, 05 Jul 2018 12:22:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 32056 <at> debbugs.gnu.org (full text, mbox):
>>>>> "RP" == Robert Pluim <rpluim <at> gmail.com> writes:
RP> The signature of that function is:
RP> (defun abort-if-file-too-large (size op-type filename &optional
RP> offer-raw)
Indeed, it is in the 26.0.50 install. Going to check my .emacs.
My apologies for disturbing you all.
RP> so the 4th argument should be ok. I suspect you have your own
RP> definition of abort-if-file-too-large somewhere.
RP> Hmm, that function was marked as doing nothing, and had been for
RP> some time. 'select-frame' perhaps, or
RP> 'select-frame-set-input-focus' might do what you want.
Thank you.
--
ing. Gian Uberto Lauri
Senior Solution Developer
Dir. Tecnica Innovazione Ricerca / Tech. Innovation & Research Div.
GianUberto.Lauri <at> eng.it
Sun Java Certified Programmer
Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD)
Tel. +39-049.8283.533 | main(){printf(&unix["\021%six\012\0"],
Fax +39-049.8283.569 | (unix)["have"]+"fun"-0x60);}
http://www.eng.it | David Korn, AT&T Bell Labs
| ioccc best One Liner, 1987
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#32056
; Package
emacs
.
(Thu, 05 Jul 2018 14:01:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 32056 <at> debbugs.gnu.org (full text, mbox):
>>>>> "RP" == Robert Pluim <rpluim <at> gmail.com> writes:
RP> so the 4th argument should be ok. I suspect you have your own
RP> definition of abort-if-file-too-large somewhere.
Your suspects are correct.
I had a copy of the function in my .emacs with a patch [BAD THING ™]
to exclude some files from size check (it was used for RMAIL).
I don't think I triggered that patch for a long time, I changed my
habits because vm gets damn slow with large mailboxes. Therefore I
ask:
- could it be dangerous?
- could it be useful to others?
Thank you in advance.
--
ing. Gian Uberto Lauri
Senior Solution Developer
Dir. Tecnica Innovazione Ricerca / Tech. Innovation & Research Div.
GianUberto.Lauri <at> eng.it
Sun Java Certified Programmer
Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD)
Tel. +39-049.8283.533 | main(){printf(&unix["\021%six\012\0"],
Fax +39-049.8283.569 | (unix)["have"]+"fun"-0x60);}
http://www.eng.it | David Korn, AT&T Bell Labs
| ioccc best One Liner, 1987
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#32056
; Package
emacs
.
(Thu, 05 Jul 2018 14:42:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 32056 <at> debbugs.gnu.org (full text, mbox):
"Gian Uberto Lauri" <saint <at> eng.it> writes:
>>>>>> "RP" == Robert Pluim <rpluim <at> gmail.com> writes:
>
> RP> so the 4th argument should be ok. I suspect you have your own
> RP> definition of abort-if-file-too-large somewhere.
>
> Your suspects are correct.
>
> I had a copy of the function in my .emacs with a patch [BAD THING ™]
> to exclude some files from size check (it was used for RMAIL).
>
> I don't think I triggered that patch for a long time, I changed my
> habits because vm gets damn slow with large mailboxes. Therefore I
> ask:
>
> - could it be dangerous?
> - could it be useful to others?
Without seeing your patch, thatʼs hard to answer. The default value of
large-file-warning-threshold is 100MB, which these days might be too
low, but nothing prevents you from setting it higher (I have it set to
nil).
Regards
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#32056
; Package
emacs
.
(Thu, 05 Jul 2018 16:10:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 32056 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>>>>> "RP" == Robert Pluim <rpluim <at> gmail.com> writes:
RP> Without seeing your patch, thatʼs hard to answer.
This is the patch (attached). Your judgment holds.
Nevertheless, any suggestion is welcomed.
--
ing. Gian Uberto Lauri
Senior Solution Developer
Dir. Tecnica Innovazione Ricerca / Tech. Innovation & Research Div.
GianUberto.Lauri <at> eng.it
Sun Java Certified Programmer
Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD)
Tel. +39-049.8283.533 | main(){printf(&unix["\021%six\012\0"],
Fax +39-049.8283.569 | (unix)["have"]+"fun"-0x60);}
http://www.eng.it | David Korn, AT&T Bell Labs
| ioccc best One Liner, 1987
[0001-Do-not-warn-for-size-on-these-files.patch (text/plain, inline)]
From d7660a3dcead87f4c03b8c12452d02f9b576c338 Mon Sep 17 00:00:00 2001
From: Gian Uberto Lauri <saint <at> eng.it>
Date: Thu, 5 Jul 2018 18:06:05 +0200
Subject: [PATCH] Do not warn for size on these files
Added a list of file for which no warning is issued when their size
exceeds large-file-warning-threshold
Changes to be committed:
modified: lisp/files.el
---
lisp/files.el | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index 84e0304..e2a8055 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -219,6 +219,10 @@ small-temporary-file-directory
;; The system null device. (Should reference NULL_DEVICE from C.)
(defvar null-device (purecopy "/dev/null") "The system null device.")
+;; I am unsure if letting this customizable is a good idea.
+(defvar ignore-file-size-list '() "A list of file for which the user is
+not warned when the size exceeds `large-file-warning-threshold'." )
+
(declare-function msdos-long-file-names "msdos.c")
(declare-function w32-long-file-name "w32proc.c")
(declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
@@ -2070,6 +2074,12 @@ abort-if-file-too-large
(> size large-file-warning-threshold)
;; No point in warning if we can't read it.
(file-readable-p filename)
+ ;; The user does not want to be bothered for
+ ;; these files (full path).
+ (not (let (rv)
+ (dolist (test-file-name ignore-file-size-list rv)
+ (setq rv
+ (or rv (string= filename test-file-name))))))
(files--ask-user-about-large-file
size op-type filename offer-raw))))
(when (eq choice 'abort)
@@ -2134,7 +2144,7 @@ find-file-noselect
(find-file-wildcards nil))
(if (null files)
(find-file-noselect filename)
- (mapcar #'find-file-noselect files)))
+ (mapcar 'find-file-noselect files)))
(let* ((buf (get-file-buffer filename))
(truename (abbreviate-file-name (file-truename filename)))
(attributes (file-attributes truename))
@@ -2155,7 +2165,7 @@ find-file-noselect
;; Check to see if the file looks uncommonly large.
(when (not (or buf nowarn))
(when (eq (abort-if-file-too-large
- (nth 7 attributes) "open" filename );; t) fourth argument is in excess...
+ (nth 7 attributes) "open" filename t)
'raw)
(setf rawfile t))
(warn-maybe-out-of-memory (nth 7 attributes)))
--
2.7.4
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#32056
; Package
emacs
.
(Thu, 18 Apr 2019 00:15:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 32056 <at> debbugs.gnu.org (full text, mbox):
"Gian Uberto Lauri" <saint <at> eng.it> writes:
> +;; I am unsure if letting this customizable is a good idea.
> +(defvar ignore-file-size-list '() "A list of file for which the user is
> +not warned when the size exceeds `large-file-warning-threshold'." )
Hmm, this feels a bit unmotivated. I don't quite understand why the
user would choose only certain files to ignore the threshold instead of
just making the threshold higher.
> + ;; The user does not want to be bothered for
> + ;; these files (full path).
> + (not (let (rv)
> + (dolist (test-file-name ignore-file-size-list rv)
> + (setq rv
> + (or rv (string= filename test-file-name))))))
Though it might be more convenient to have a regexp rather than a
straight list.
> - (mapcar #'find-file-noselect files)))
> + (mapcar 'find-file-noselect files)))
No need for this. #' is fine.
bug closed, send any further explanations to
32056 <at> debbugs.gnu.org and Gian Uberto Lauri <saint <at> eng.it>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 13 Jul 2019 03:22: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
.
(Sat, 10 Aug 2019 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 253 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.