emacs-devel
[Top][All Lists]
Advanced

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

Re: bidi at startup


From: Eli Zaretskii
Subject: Re: bidi at startup
Date: Tue, 21 Jun 2011 20:13:50 +0300

> From: Stefan Monnier <address@hidden>
> Cc: Kenichi Handa <address@hidden>,  address@hidden
> Date: Tue, 21 Jun 2011 11:12:12 -0400
> 
> >> Is it used when we run emacs with -batch?
> 
> That doesn't matter for preloading.

I think it does, because temacs is normally run with -batch.

> > I think in -batch mode Emacs should not reorder bidirectional text.
> > Mainly because if the underlying terminal is bidi-aware, it will
> > reorder it by itself, and if it isn't aware, most probably it doesn't
> > support the corresponding scripts anyway, and scripts that need
> > reordering will come out garbled.
> 
> > So I think bidi-display-reordering should be set early during startup,
> > but only in interactive sessions, i.e. dynamically.
> 
> As mentioned a few days ago in another thread, thinking in terms of
> "interactive/noninteractive" session is the wrong way to look at it.

Maybe in general, but not in this case, see below.

> Instead, you want to think about which terminal is used.  E.g. think of
> the case of an Emacs server that did not daemonize: some terminals will
> be GUIs, others will be ttys

The device where Emacs displays is of no importance, as long as the
display engine supports it, because the bidi reordering works on all
of them.

> and there'll be one more which is just
> stdin/stdout.  IIUC you're saying that the special initial terminal
> (bound to stdin/stdout) should not do bib-processing, which sounds fine.

No.  stdout is not a display device in this context; a text terminal
is.  When Emacs writes to stdout from `message' and such likes, the
result doesn't trigger redisplay, and thus doesn't invoke the
reordering.  Reordering happens when the result of `message' is
inserted into some buffer, like the minibuffer, because that triggers
redisplay, which reorders.

What I was saying was that "emacs -batch" does not need reordering
services, because text we write to stdout should not be reordered.
Therefore, I think bidi-display-reordering should be initialized to
nil in xdisp.c, then set to t during startup if Emacs is invoked
interactively or as a daemon.  Do you agree?



reply via email to

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