From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Changes in frame/window code Date: Tue, 29 Jul 2014 11:20:24 +0200 Message-ID: <53D76758.2030707@gmx.at> References: <53CE6A44.1010708@gmx.at> <53D4FF76.1060804@gmx.at> <8338dmj1of.fsf@gnu.org> <83wqayhe0o.fsf@gnu.org> <53D542B3.20206@gmx.at> <83tx62hane.fsf@gnu.org> <53D6172A.5010909@gmx.at> <83fvhlhad5.fsf@gnu.org> <53D656BB.3010201@gmx.at> <83egx5h86z.fsf@gnu.org> <53D68806.9080101@gmx.at> <838undgxiu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406625684 28262 80.91.229.3 (29 Jul 2014 09:21:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2014 09:21:24 +0000 (UTC) Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 29 11:21:16 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XC3aj-0008Pb-4M for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 11:21:05 +0200 Original-Received: from localhost ([::1]:44369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC3ai-0001pl-N6 for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 05:21:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC3aY-0001jR-7T for emacs-devel@gnu.org; Tue, 29 Jul 2014 05:21:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC3aP-0007Ex-Nm for emacs-devel@gnu.org; Tue, 29 Jul 2014 05:20:54 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:60812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC3aG-0007BQ-HS; Tue, 29 Jul 2014 05:20:36 -0400 Original-Received: from [93.82.14.115] ([93.82.14.115]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Ln8Tl-1WZRVC256b-00hMBC; Tue, 29 Jul 2014 11:20:31 +0200 In-Reply-To: <838undgxiu.fsf@gnu.org> X-Provags-ID: V03:K0:TnbQh107nOAVdzvwKUMmBRzouJd6G2Y26PSPFWtMOafjWxnRJPv nQz63fIgYFKaWG6MJeMwYmnZNn1C0N76pcCXgf9/gr2bUCMHs1+9hxjz6LtsNiomAFmPu3W 4HY2ttxHraT8C1zo+bUn2A04Zkyyo0ndxMPTba9ceGmBNZAZkobq4GAKJFNXVP52qaclTOu Wgll81JcWG61h20ntNCNw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173237 Archived-At: >> I still have no feeling for how hscrolling works with bidi text. IIUC >> with L2R and R2L paragraphs in the same window, like >> >> LLLLLLLLLLLLLLLLLLLLLL2RRRRRRRRRRRRRRRRRRR >> >> RRRRRRR2LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL >> >> hscrolling will NOT preserve the aspect that the two "2" visually appear >> above each other. Correct? > > Yes. As the hscroll amount grows, the characters in the L2R lines > will move to the left, while characters in the R2L lines will move to > the right. I have to think about the possible implications of this. Maybe there are none but putting this model into my brain will take some time. > It's a hard problem primarily because it's hard to know what is TRT, > and there's no "prior art" to follow. Because all the others keep the "2"s from my example fixed above each other, I presume. >> Did you check with a window containg say one huge L2R line and all >> other lines short and one huge R2L line and all other lines short? > > Yes. Again, this is just normal hscroll, which works with > bidirectional text since v24.1. The fact that hscroll is triggered by > clicking the scroll bar does not matter, as long as the direction of > the scroll is interpreted correctly. The changes I made simply took > care of translating the scroll-bar clicks to hscroll amount. I didn't mean that you should check whether hscroll works. What I meant was to check whether the slider/thumb size really relates to the size of the longest line of text, disregarding the fact that it is L2R or R2L. > You need to reverse the meaning of START and END for the R2L case: > > end = whole - w->hscroll * FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)); > start = end - box_width; > > (Note that current-bidi-paragraph-direction returns the results at > buffer's point, so you will need to temporarily go to the window's > point marker.) As soon as you have some spare time (I know you never do) please try it. martin