1

I want to disable Emacs from ever displaying text right-to-left (i.e. ignore Unicode control sequences to change text orientation). How to do it?

2 Answers 2

2

I think @Dan's answer is correct. But do consult the Elisp manual node he pointed to (Bidirectional Display). But consult first the Emacs manual node Bidirectional Editing.

However, I also think that the Emacs maintainer (Eli) has recommended against setting variable bidi-display-reordering to nil. I used to do that, but I switched to this (which I think Eli recommended at some point):

(setq-default bidi-paragraph-direction 'left-to-right)

You might try that instead. Since I've switched to doing this, and it seems to do the job - reduces or removes the (incredible) slowdown I experienced with buffers that display arbitrary Unicode chars. (I don't have a need to edit bidirectional text, but I provide some help commands that can display arbitrary Unicode chars - e.g. library Apropos Unicode (`apu.el).)

You might also want to pose your question to mailing list help-gnu-emacs@gnu.org. Eli and others who are experts on this might have better or more up-to-date recommendations or advice. (I'm no authority on bidi etc.)

1
  • The settings doesn't work. I keep seeing text RTL. bidi-paragraph-direction only sets the base orientation AFAIU. Once it sees an unicode control sequence it'll use that. I'll try the mailing list. Thanks. Jan 24 at 5:11
1

Set the variable bidi-display-reordering to nil.

Here's the docstring:

Documentation: Non-nil means reorder bidirectional text for display in the visual order. Setting this to nil is intended for use in debugging the display code. Don’t set to nil in normal sessions, as that is not supported. See also ‘bidi-paragraph-direction’; setting that non-nil might speed up redisplay.

I found out about this variable in the Bidirectional display node of the Emacs manual after doing a web search for "emacs bidi".

1
  • It doesn't work. Open file with RTL text and I still see the text RTL. Jan 24 at 5:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.