emacs-devel
[Top][All Lists]
Advanced

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

write-region & visit flag to shut the chatiness?


From: Arthur Miller
Subject: write-region & visit flag to shut the chatiness?
Date: Thu, 03 Dec 2020 20:52:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

I am building a file by appending lots of data to it. Write-region was
literally flooding the message buffer, slowing down Emacs and making
message buffer itself unuseful due to load of data.

When I looked into info about write-region, it says I can set 'visit'
option to something else then nil or t but not string to turn it off? :D :-)

"Normally, ‘write-region’ displays the message ‘Wrote FILENAME’ in
     the echo area.  This message is inhibited if VISIT is neither ‘t’
     nor ‘nil’ nor a string, or if Emacs is operating in batch mode
     (*note Batch Mode::).  This feature is useful for programs that use
     files for internal purposes, files that the user does not need to
     know about."

I tried and it works; but is that really a proper design? :-)
What if someone would like to use visit flag for something else? Mybe it
is never used for something else; i don't know :-).

I don't even understand why write-region has to echo everything to
message buffer by default? I don't expect a function to explicitly tell
me "Hey look, I did what I am suppose to do!". I mean (+ x y) does not
tell me "Added x and y!" Why that befaviour by default?

If it is of interest I can send in a patch and add an optional flag like
noverbose or similar; it is not über important, but I think it is ugly
and unnecessary convoluted design as it is now.




reply via email to

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