From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: call-process and display-on-the-fly
Date: Wed, 13 Oct 2004 09:44:17 +0900 (JST) [thread overview]
Message-ID: <200410130044.JAA08736@etlken.m17n.org> (raw)
In-Reply-To: <m3zn2sui3v.fsf@kfs-l.imdomain.dk> (storm@cua.dk)
In article <m3zn2sui3v.fsf@kfs-l.imdomain.dk>, storm@cua.dk (Kim F. Storm) writes:
> While debugging the "call-process" output buffering problem
> I noticed that the display_on_the_fly flag is turned off
> if the coding system cannot be determined immediately.
> However, it seems bogus not to turn it back on when we actually
> succeeds determining a coding system.
I agree with that kind of change. But...
> What about the following patch to remedy this?
It seems that the patch doesn't work as expected because
once do_display is set back to 1, the following condition
hits again:
> + if (do_display
> && saved_coding.type == coding_type_undecided
> && process_coding.type != coding_type_undecided)
> {
so do_display is set to 0 again. And, why is it necessary
to introduce a new variable do_display? How about this
patch?
--- callproc.c 29 Sep 2004 23:40:53 -0000 1.203
+++ callproc.c 13 Oct 2004 00:42:36 -0000
@@ -823,12 +823,15 @@
{
/* We have detected some coding system. But,
there's a possibility that the detection was
- done by insufficient data. So, we give up
- displaying on the fly. */
+ done by insufficient data. So, we try the code
+ detection again with more data. */
xfree (decoding_buf);
display_on_the_fly = 0;
process_coding = saved_coding;
carryover = nread;
+ /* This is to make the above condition always
+ fails in the future. */
+ saved_coding.type = coding_type_no_conversion;
continue;
}
@@ -935,6 +938,10 @@
prepare_menu_bars ();
first = 0;
redisplay_preserve_echo_area (1);
+ /* This variable might have been set to 0 for code
+ detection. In that case, we set it back to 1 because
+ we should have already detected a coding system. */
+ display_on_the_fly = 1;
}
immediate_quit = 1;
QUIT;
next prev parent reply other threads:[~2004-10-13 0:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-12 14:27 call-process and display-on-the-fly Kim F. Storm
2004-10-13 0:44 ` Kenichi Handa [this message]
2004-10-13 9:16 ` Kim F. Storm
2004-10-13 11:32 ` Kenichi Handa
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200410130044.JAA08736@etlken.m17n.org \
--to=handa@m17n.org \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.