From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer Date: Sat, 11 Jan 2014 16:17:21 +0200 Message-ID: <83mwj2a9hq.fsf@gnu.org> References: <87mwj3fcal.fsf@nbtrap.com> <52D0C30D.9050305@dancol.org> <52D0C401.90208@dancol.org> <87eh4e677p.fsf@nbtrap.com> <83txdaacnp.fsf@gnu.org> <87eh4e1v8o.fsf@nbtrap.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1389449895 12479 80.91.229.3 (11 Jan 2014 14:18:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Jan 2014 14:18:15 +0000 (UTC) Cc: 16413@debbugs.gnu.org To: Nathan Trapuzzano Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 11 15:18:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1W1zOB-0007kh-Dd for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Jan 2014 15:18:15 +0100 Original-Received: from localhost ([::1]:34110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1zOA-0003am-Uu for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Jan 2014 09:18:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1zO3-0003a4-27 for bug-gnu-emacs@gnu.org; Sat, 11 Jan 2014 09:18:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1zNy-0008WH-25 for bug-gnu-emacs@gnu.org; Sat, 11 Jan 2014 09:18:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1zNx-0008WD-Um for bug-gnu-emacs@gnu.org; Sat, 11 Jan 2014 09:18:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W1zNx-0004Xx-Nr for bug-gnu-emacs@gnu.org; Sat, 11 Jan 2014 09:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Jan 2014 14:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16413 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16413-submit@debbugs.gnu.org id=B16413.138944986417440 (code B ref 16413); Sat, 11 Jan 2014 14:18:01 +0000 Original-Received: (at 16413) by debbugs.gnu.org; 11 Jan 2014 14:17:44 +0000 Original-Received: from localhost ([127.0.0.1]:46372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W1zNf-0004XE-Lc for submit@debbugs.gnu.org; Sat, 11 Jan 2014 09:17:43 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:43420) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W1zNc-0004X3-IR for 16413@debbugs.gnu.org; Sat, 11 Jan 2014 09:17:41 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MZ800400QDCZW00@a-mtaout20.012.net.il> for 16413@debbugs.gnu.org; Sat, 11 Jan 2014 16:17:39 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZ8004CTQDETQ60@a-mtaout20.012.net.il>; Sat, 11 Jan 2014 16:17:39 +0200 (IST) In-reply-to: <87eh4e1v8o.fsf@nbtrap.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83304 Archived-At: > From: Nathan Trapuzzano > Cc: dancol@dancol.org, 16413@debbugs.gnu.org > Date: Sat, 11 Jan 2014 08:52:23 -0500 > > Eli Zaretskii writes: > > >> Functions that I know to be problematic include: > >> > >> get-text-property > >> text-properties-at > >> previous-single-property-change > > > > The first two are low-level primitives that explicitly ignore the > > narrowing; don't use them if you want them to be limited to the > > narrowed region. > > char-after is a primitive, and it behaves intuitively at (point-max) on > narrowed buffers. Why shouldn't other functions behave consistently? I don't know. One reason could be that we might need a primitive that can report properties of characters that are not reachable. But I don't have any evidence to that effect. > Nevermind about the search functions. I was confused about the behavior > of previous-single-property-change. The problem lies in the functions > that fetch the properties. The usual paradigm is to search for a possible place where the you might have the property, then examine the properties at that point. With this paradigm, if you never look at the properties when the search hits the limit of the search, you will never have this problem.