logo       
click here

Click Me!

ugly file size reported for files bigger than 256Mb: msg#00058

Subject: ugly file size reported for files bigger than 256Mb
If you try to visit a file that is bigger than 256Mb (and
large-file-warning-threshold's value is less than the size of the
file) you see a warning message like:

"File blah is large (286.102294921875MB), really open? (y or n)"

If the file is less than 256Mb the size is reported as an integer
number of megabytes.

I suggest that the '%d' format should be used to make sure an
integral value is always reported.  (And what's with the funny
indentation of the 2nd argument to 'format'?)

Chris.

-------cut-here-------8<--------cut-here--------8<-------cut-here-------
Index: files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.671
diff -c -r1.671 files.el
*** files.el    5 Nov 2003 04:06:27 -0000       1.671
--- files.el    14 Nov 2003 00:42:00 -0000
***************
*** 1240,1248 ****
                   (not (or buf nowarn))
                   (> (nth 7 attributes) large-file-warning-threshold)
                   (not (y-or-n-p
!                        (format "File %s is large (%sMB), really open? "
                                 (file-name-nondirectory filename)
!                                  (/ (nth 7 attributes) 1048576)))))
          (error "Aborted"))
        (if buf
            ;; We are using an existing buffer.
--- 1240,1248 ----
                   (not (or buf nowarn))
                   (> (nth 7 attributes) large-file-warning-threshold)
                   (not (y-or-n-p
!                        (format "File %s is large (%dMB), really open? "
                                 (file-name-nondirectory filename)
!                                (/ (nth 7 attributes) 1048576))))))
          (error "Aborted"))
        (if buf
            ;; We are using an existing buffer.
-------cut-here-------8<--------cut-here--------8<-------cut-here-------


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Click Me!
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.drivers.b...    security.firewa...    mathematics.lps...    web.zope.plone....    x25/2005-12/msg...    culture.tv.sout...    pld.user.polish...    qplus.devel/200...    version-control...    openbsd.bugs/20...    distributions.g...    gnu.chess.bugs/...    redhat.release....    emacs.bugs/2002...    java.bio.genera...    ataraid/2005-01...    finance.moneyda...    hardware.microc...    netbsd.ports.xe...    bug-tracking.gn...    text.xml.saxon....    kde.linux/2002-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo