From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: [RFC] position caches Date: Thu, 14 Mar 2013 09:40:17 +0400 Message-ID: <514162C1.5060508@yandex.ru> References: <513EDFAA.8030803@yandex.ru> <83k3pck0kv.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363239635 29537 80.91.229.3 (14 Mar 2013 05:40:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2013 05:40:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 14 06:40:57 2013 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 1UG0uL-0002rI-0e for ged-emacs-devel@m.gmane.org; Thu, 14 Mar 2013 06:40:53 +0100 Original-Received: from localhost ([::1]:38655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG0tx-0008KN-WA for ged-emacs-devel@m.gmane.org; Thu, 14 Mar 2013 01:40:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG0tu-0008Jx-Ex for emacs-devel@gnu.org; Thu, 14 Mar 2013 01:40:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG0tt-00024b-32 for emacs-devel@gnu.org; Thu, 14 Mar 2013 01:40:26 -0400 Original-Received: from forward3h.mail.yandex.net ([84.201.187.148]:35199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG0tq-00023c-Nt; Thu, 14 Mar 2013 01:40:23 -0400 Original-Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward3h.mail.yandex.net (Yandex) with ESMTP id 3F38C1361658; Thu, 14 Mar 2013 09:40:18 +0400 (MSK) Original-Received: from smtp1h.mail.yandex.net (localhost [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id E2AD313402D1; Thu, 14 Mar 2013 09:40:17 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id eHhKD6se-eHhiGuCx; Thu, 14 Mar 2013 09:40:17 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1363239617; bh=EUa/JciML7l1hMhUYt7pTxVPWMHVUuu3MK1FJFQBg3I=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=iOC5zj2Ev8SYArsj5aNbsm1IzcQDSViMpEh7f/YHEuYLZ4qZWy2IeTC07eZQvQ7eW ff5FpyYLs3kldHKd9er6AJXb0nqCvQ/l1oblx/Ve9C53QtRpKrLf+CkJgGGdtcNjik ap0RMJtWZ6MdKbKxlOdTRrD+rW7Y5V/sR5vGTXHo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <83k3pck0kv.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.187.148 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:157836 Archived-At: On 03/12/2013 09:08 PM, Eli Zaretskii wrote: > Therefore, bidi.c needs to determine the paragraph start each time it > enters a new paragraph. It needs to do that even if the buffer didn't > change a bit, because a new paragraph can have a different base > direction. The bidi_it->new_paragraph flag is set when the iteration > goes out of a paragraph or when the iterator is re-seated far away of > its current position. In those cases, xdisp.c calls > bidi_paragraph_init, which in turn calls bidi_find_paragraph_start. > You cannot return the beginning of previously found paragraph just > because the buffer didn't change. I do not understand this. I'm trying to cache not just the previously find paragraph start, but the previously find paragraph start against [bidi_it->charpos, bidi_it->bytepos] buffer position; so if bidi_it is moved in any way, cache becomes invalid even if the buffer is not changed. Dmitry