From: "Gian Uberto Lauri" <saint@eng.it>
To: Robert Pluim <rpluim@gmail.com>
Cc: 32056@debbugs.gnu.org, Gian Uberto Lauri <saint@eng.it>
Subject: bug#32056: Small patch
Date: Thu, 5 Jul 2018 18:09:33 +0200 [thread overview]
Message-ID: <23358.17085.759649.529099@mail.eng.it> (raw)
In-Reply-To: <87efghpwww.fsf@gmail.com>
[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 749 bytes --]
>>>>> "RP" == Robert Pluim <rpluim@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@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
[-- Attachment #2: a patch for files.el --]
[-- Type: text/plain, Size: 2689 bytes --]
From d7660a3dcead87f4c03b8c12452d02f9b576c338 Mon Sep 17 00:00:00 2001
From: Gian Uberto Lauri <saint@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
next prev parent reply other threads:[~2018-07-05 16:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 8:30 bug#32056: Small patch Gian Uberto Lauri
2018-07-05 10:22 ` Robert Pluim
2018-07-05 11:13 ` Noam Postavsky
2018-07-05 12:20 ` Gian Uberto Lauri
2018-07-05 14:00 ` Gian Uberto Lauri
2018-07-05 14:41 ` Robert Pluim
2018-07-05 16:09 ` Gian Uberto Lauri [this message]
2019-04-18 0:13 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23358.17085.759649.529099@mail.eng.it \
--to=saint@eng.it \
--cc=32056@debbugs.gnu.org \
--cc=rpluim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).