I'm interested in reading the part of the Emacs source code where the bidi (bidirectionality) algorithm is implemented. Where is it?

P.S. I've never looked at the Emacs source code before, and I'm a rather amateur programmer.

  • Your last phrase ("so please keep it as simple and user-friendly as possible") does not apply here. You are not asking for a presentation of the algorithm here. You are asking for a pointer to such a description elsewhere. I removed that phrase, to avoid confusion. – Drew Jun 27 '17 at 13:55

From what I can see, largely in src/bidi.c and src/xdisp.c. The latter implements the bulk of the redisplay, and there are numerous relevant comments about the bidi implementation in its header commentary (search for "Bidirectional display").

I've never looked at this code myself, so there may be additional files of interest, but these will make for a good start.

|improve this answer|||||

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.