From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51550: 29.0.50; Customize Group INS buttons sometimes don't have a left box line Date: Mon, 27 Dec 2021 19:19:47 +0800 Message-ID: <87ilvaz44s.fsf@yahoo.com> References: <87ee80gezy.fsf.ref@yahoo.com> <87ee80gezy.fsf@yahoo.com> <83a6iolzjd.fsf@gnu.org> <87zgqnk74n.fsf@rub.de> <83ee7zll84.fsf@gnu.org> <87wnlrfhdk.fsf@yahoo.com> <831r3ylk6o.fsf@gnu.org> <87r1bxer97.fsf@yahoo.com> <83pmrhien9.fsf@gnu.org> <87mtkmz5ht.fsf@yahoo.com> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25651"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: Eli Zaretskii , stephen.berman@gmx.net, 51550@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 27 12:21:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1o3y-0006WA-PX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Dec 2021 12:21:10 +0100 Original-Received: from localhost ([::1]:42986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1o3x-0006jO-0H for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Dec 2021 06:21:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1o3q-0006jA-EO for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 06:21:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n1o3q-0002JS-5h for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 06:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n1o3q-0000Sq-3B for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 06:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Dec 2021 11:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51550 X-GNU-PR-Package: emacs Original-Received: via spool by 51550-submit@debbugs.gnu.org id=B51550.16406040051666 (code B ref 51550); Mon, 27 Dec 2021 11:21:02 +0000 Original-Received: (at 51550) by debbugs.gnu.org; 27 Dec 2021 11:20:05 +0000 Original-Received: from localhost ([127.0.0.1]:42253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1o2u-0000Qo-Lt for submit@debbugs.gnu.org; Mon, 27 Dec 2021 06:20:04 -0500 Original-Received: from sonic301-31.consmr.mail.ne1.yahoo.com ([66.163.184.200]:38828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1o2r-0000QA-EG for 51550@debbugs.gnu.org; Mon, 27 Dec 2021 06:20:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1640603995; bh=hnHpLwpxE1udbl5ME+I7RQIy03PY3ttyxxLb127DWvA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=DmXdSfD0bJpWDlNpyruT0JGvs2mRh6SABmHRCfCJAHcT/SR2u1KZac/6LDmufRpbGqYGIajD1gLWDMOUJ5T8T6ICXseZ/75lLge0MnJN+uEfRN5y7va07vhj9/4yY6uNZX7Tx8WSlW8K/nIFLHpSBnT6QiyqoI3+HkvoXNEDt4rSNTB158+cAn8BRK2X2bfsNuway57AlR+7Z3KRp1ji8ZBrl1HMleOKlOQkP01ge9TDu8cctMxh/YvV+AwriaRtXbcJ0z46wlmvRH4PqXG9llXyHA8X0NE1w/Ik/mCqZJSAPmx8RbJhbPNz0typHMHi5Eyc6nLf/eaEAY0qehfcvw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1640603995; bh=eBX8KLIVx2lerKrDEfNrHAtRtzJkTfxkt527CuD7a4T=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=rMJtHJDWSHVYIiKKig5OuUijUbPsxKncb3ea/ulFBSjrHeMmG+clKm+WCQ/dPvfCaanUH+BSReW/4tlvjjHz0Dd4/golrOV1LuzdhcwvtLMLFNKHRHpnEEFCsRjvzpj6p7H/2KMGySTSOFSSF1q4U42e4rk6Rz2cERcstnVlpMFcZJfo5xgFhHaYTwcPCjLAFcGxNxCYg0W+bYz8DXOaHuyneOoqvD4fh+4sm4ZJsn/EH2ypCkRx75hEbTROdnPditp/a+eYCgjtRZaZCweUT01A8Dy0cbBL75vL7svwNX9Oe2s6eukdLpOp0qgFEKyJfX5fFKt1/VxZOz0E5ESh9w== X-YMail-OSG: I6sFqkQVM1kEDBGQtcRRF9.4LWeUv71EKAdlyW.ofJxojjNkmIPPGtpD8AQ4kr2 U2gNV4JKRR12c.aRu3o55Inrh0dduxLL0GkXyZuHxXA51QoAIdGaiGha6PGfCb_pPRvRzx3T3hW. vzFlzO6CJDewbbYby5G4MQuW2GTj0GnpIwZ.SV1Wq8Lj3WeP9SEaUSYCSevkJpw.GAKb1YpcD1t3 VU7YhaFT.gasjsSOnJ9XAXfAZ7XZLQus1.P.rQtLEWnag0nj0MOWJHo4q9vkYtv8GutN8TIlqFZN YMEhjXFIq_yGColgr3VlLaDxsmUeGfFgwQYQZQef_IBLcwqfbXqEtXWu.o53JNqvmCid1s9dLzfB s2DqiCC3fBxF5qcw2z8T_sN7ROpiJMinZCb3yD9iYwJCUSnOhHUtJlTSzt0H5AiAWRmuXgClNhuq CfeMYoxhNGbFtzBFZncphe.ruLFBE7BTX4lLoUo62rnWWbUfDX1mAvKQNyPvDnyyqsdEtyxCtmKO N8ttrghujRAT0pSxIIzSox.MKlRkKotvyO0UxAGoQnuKg2bl7BKy543dJ.uI0gIUWgrrgK9ZmpCK tVvLC9joUHd_ZNQEZGpPpMOUcwk2xI31GTTpVOJsqq3VymLOXkPa2YN7HfvEso9RPRC3UITfRaQj iy3DKuDawRR7EPgkk6oNrYtO_KRcmaR24s1tQLeox6ypMjg69roj4MBWbxngQxfNWGK8obGhvsLA Jz2fUzZWlGLJ7a.BK0fzus7Vs7tzs.aMen8HLzoO9K_J1GV2rCDIryEryxqkvq4DtIYAsi7hUhcS 9t39jXPHdnKVG2xsB44RAJCu4QgEFZrKKyDxDwOphk X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Mon, 27 Dec 2021 11:19:55 +0000 Original-Received: by kubenode515.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 897b393846851593780aa7396afe4a4b; Mon, 27 Dec 2021 11:19:53 +0000 (UTC) In-Reply-To: <87mtkmz5ht.fsf@yahoo.com> (Po Lu's message of "Mon, 27 Dec 2021 18:50:22 +0800") X-Mailer: WebService/1.1.19498 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223183 Archived-At: Po Lu writes: > I think the solution is to save the face ID of the iterator after the > call to extend_face_to_end_of_line, then compare it to the face after > the iterator is reseated to the next line, and set > it->start_of_box_run_p to true if that face is different and also has a > box. I have this code mostly working now, but I don't understand why set_iterator_to_next doesn't seem to be updating it->face_id. AFAIU, set_iterator_to_next called with RESEAT set to true eventually calls reseat, which in turn calls handle_face_prop through handle_stop if the iterator was reseated past the stop position, which should be set to the beginning of the next line when the face property at that next line differs from the line whose face is being extended. However, handle_face_prop is never called, so I have to call it manually like this: /* Consume the line end. This skips over invisible lines. */ set_iterator_to_next (it, true); --> handle_face_prop (it); if (it->face_id != DEFAULT_FACE_ID && it->face_id != saved_face_id) { face = FACE_FROM_ID_OR_NULL (it->f, it->face_id); if (face && face->box != FACE_NO_BOX) { it->face_box_p = true; it->start_of_box_run_p = true; } } Any ideas? Thanks.