Eli Zaretskii <[email protected]> writes: >> From: Ze'ev Clementson <[email protected]> >> Date: Mon, 05 Jul 2010 12:35:28 -0700 >> >> It took me a little while to figure out how to turn on bidi and use it >> to input Hebrew in Emacs 24. It wasn't hard to figure it out, but it did >> require some investigative work. > > Did you find anything that is not already in the manual?
Which manual? The emacs info files don't appear to have anything bidi-related in them (at least a search for "bidi" didn't turn up any hits). > >> (if bidi-display-reordering >> (progn >> (setq bidi-display-reordering nil) >> (inactivate-input-method)) >> (setq bidi-display-reordering t) > > There's no need to turn bidi-display-reordering on and off. You can > turn it on by default and leave it that way. Typing plain L2R Latin > text should look the same with bidi-display-reordering non-nil as it > was before Emacs 24 (barring bugs). I know a few people who actually > run Emacs 24 like that, even though they don't read any bidi script, > and I've heard no complaints from them for quite some time, so doing > that should be pretty safe. Oh, that's easy than. I thought there was some reason for not having it on by default. If so, why isn't bidi-display-reordering defaulted to t in the emacs24 code? I assume it will be turned on by default when emacs24 is released? >> (if arg >> (setq bidi-paragraph-direction 'right-to-left) >> (setq bidi-paragraph-direction nil)) > > Likewise, toggling bidi-paragraph-direction doesn't make much sense, > IMO. This is a per-buffer variable, so once you've set it to R2L, > presumably because the buffer should display mostly R2L text, it > should stay that way. It's not like this variable has effect only on > the current paragraph. And in another buffer, the value will be > unaffected by any changes in other buffers. That makes sense now that you spell it out too. Looking at the docstrings for bidi-display-reordering and bidi-paragraph-direction, I had assumed a hierarchical relationship; however, I see that (once bidi-display-reordering is set to t by default) they will probably only be changed as an exceptional case. >> Does anyone else have any elisp snippets that they've found useful >> when working with bidi and/or hebrew? > > I basically just use "C-\" to switch into the Hebrew input method, and > that's all. > > What else is missing that you'd like a snippet for? I wasn't actually missing anything. However, I tend to write little snippets of elisp code that help my workflow and I was wondering whether others who had used bidi for a while might have accumulated a few. For example, I noticed that Yair has added Tiro and SIL and Yiddish input methods (http://lists.gnu.org/archive/html/emacs-bidi/2010-05/msg00025.html). This struck a chord with me as I recently created some Hebrew bookmarklets for Tiro, SIL, Hebrew-QWERTY, and my own Hebew-ZC keyboard layouts (http://bc.tech.coop/DavidKeyboard.html) and will probably add the latter keyboard layout to my own .emacs file. Since I haven't been doing any Hebrew stuff in emacs, I was curious as to whether others had their own snippets that they would like to share. - Ze'ev _______________________________________________ emacs-bidi mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-bidi
