help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs22 large file y-or-n-p


From: Tim X
Subject: Re: Emacs22 large file y-or-n-p
Date: Wed, 14 Jun 2006 18:20:25 +1000
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Pascal Bourguignon <pjb@informatimago.com> writes:

> Brendan Halpin <brendan.halpin@ul.ie> writes:
>
>> Emacs 22 has a check when visiting files for size, and a threshold
>> above which it queries the user whether s/he really wants to load
>> the file. Mostly this is a good idea, but I regularly want to load
>> my ~/RMAIL which gets ridiculously large.
>>
>> Is there a lightweight way to avoid the check for RMAIL? I've
>> looked at the code (for find-file-noselect) and that permits
>> different size thresholds (and turning the check off altogether). 
>>
>> Would defadvice around the rmail defun provide a handle? e.g.
>> temporarily raise the threshold variable's value to 100MB and
>> revert it afterwards?
>
> Really Brendan!  M-x apropos RET large.*file RET
>

while Pascal's answer certainly is where you would start looking, it
doesn't address the issue of how to temporarily change the value while
reading mail and leaving it for everything else. 

I would certainly give defadvice a go - its the quickest and easiest
way to change behavior which cannot be achieved through customize in
the way you want. 

However, sometimes defadvice may not quite give you what you want. For
example, what would be the behavior if your running under X and open
mail in one frame and then got to do some other work in another frame.
It is possible, since the defadvice may not have completed, the
temporary change you enabled for mail is still set. This probably
wouldn't be an issue in this case, but I cannot say for certain, so
mention it anyway. 

It should also be noted there are situations in which modifying a
setting via a non-customize means, such as a setq, may not have the
consistent affect you expect. in fact, you do sometimes see
documentation which says, "Do not modify this variable by hand - use
customize" or something similar. 

However, as defadvice is so easy to do, I'd just do it in *scratch*
and see if it works.

Tim
-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]