Stephen Gildea <gildea@...> wrote:
> I'm confused by how the function mh-spamassassin-blacklist uses the
> variable mh-junk-background. The function calls call-process three
> times, and it uses mh-junk-background only for the one call that seems
> least appropriate to me.
> It uses mh-junk-background when calling "scan"; but the only point of
> calling scan that I can see is to use the output, so you have to save
> it and wait for it. I find that setting mh-junk-background to nil
> (the default) doesn't work and setting it to t does work.
That's the way it used to be. It appears that I added mh-junk-background
inappropriately here :-(. I didn't catch it because I've always had
mh-junk-background turned on. Can you please add a bug report and commit
your change (using t instead of mh-junk-background) to it?
I don't remember why I didn't replace mh-log-buffer with
mh-junk-background in the other two calls. How fast are those calls? If
they are slow, consider replacing mh-log-buffer with mh-junk-background.
> The way mh-junk-background is used in other functions in mh-junk.el
> seems more consistent with naming this variable "mh-junk-foreground",
> thus furthering my confusion.
Take another look at the definition of call-process and the code for
mh-junk-background. When passed to call-process, a value of nil discards
the output and waits for the process to finish (foreground,
mh-junk-background off) while a value of 0 discards the output and
doesn't wait (background, mh-junk-background on)
I suppose it is pretty funky to set the variable to 0 when turning it on
Is it worth renaming mh-junk-background to mh-junk-background-flag and
changing the argument to call-process from "mh-junk-background" to "(or
mh-junk-background-flag 0)"? (We would not be able to fully delete
mh-junk-background until version 9.0.)
Bill Wohler <wohler@...> http://www.newt.com/wohler/ GnuPG ID:610BD9AD