From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#12679: 24.2.50; Can't font-at for the beginning of a string Date: Tue, 30 Oct 2012 20:45:55 +0900 Message-ID: <87d300uqrw.fsf@gnu.org> References: <87391an60a.wl%%xmue@d1.dion.ne.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351597785 26979 80.91.229.3 (30 Oct 2012 11:49:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2012 11:49:45 +0000 (UTC) Cc: kzhr@d1.dion.ne.jp, 12679@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 30 12:49:53 2012 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 1TTAKO-00045J-BD for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Oct 2012 12:49:52 +0100 Original-Received: from localhost ([::1]:36962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTAKG-0003iZ-4F for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Oct 2012 07:49:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTAJB-0000sB-LB for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 07:48:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTAJ5-0003zn-O7 for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 07:48:37 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTAJ5-0003zj-Ks for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 07:48:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TTALW-0006FC-Bd for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 07:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kenichi Handa Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Oct 2012 11:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12679 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12679-submit@debbugs.gnu.org id=B12679.135159781823951 (code B ref 12679); Tue, 30 Oct 2012 11:51:02 +0000 Original-Received: (at 12679) by debbugs.gnu.org; 30 Oct 2012 11:50:18 +0000 Original-Received: from localhost ([127.0.0.1]:39166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTAKo-0006EF-3N for submit@debbugs.gnu.org; Tue, 30 Oct 2012 07:50:18 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:49763) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTAKl-0006E7-2l for 12679@debbugs.gnu.org; Tue, 30 Oct 2012 07:50:16 -0400 Original-Received: from 253.240.accsnet.ne.jp ([202.220.240.253]:61542 helo=mongkok) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TTAII-0000JO-9u; Tue, 30 Oct 2012 07:47:42 -0400 In-Reply-To: <508296EA.60000@gmx.at> (message from martin rudalics on Sat, 20 Oct 2012 14:19:54 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:66233 Archived-At: In article <508296EA.60000@gmx.at>, martin rudalics writes: > Could you please also (1) add a description of the STRING argument in > the doc-string of `font-at', I added this statement to the docstring. Optional third arg STRING, if non-nil, is a string containing the target character at index specified by POSITION. > and (2) explain what happens when the > selected window or the window passed as argument do not show the current > buffer. > IIUC face_at_buffer_position expects the window passed to it to > show the current buffer but this might not be true when `font-at' calls > it. There's also this comment in face_at_buffer_position: > /* W must display the current buffer. We could write this function > to use the frame and buffer of W, but right now it doesn't. */ > /* eassert (XBUFFER (w->buffer) == current_buffer); */ > Later in the code of face_at_buffer_position I see that w->buffer is > sometimes used explicitly but get the impression that most other parts > of the code use the current buffer instead. I think your worrying is right. So, I changed font-at to signal an error when the specified window is not displaying the current buffer. --- Kenichi Handa handa@gnu.org