From unknown Fri Jun 20 19:49:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11068 <11068@debbugs.gnu.org> To: bug#11068 <11068@debbugs.gnu.org> Subject: Status: 24.0.94; Face-remapped background does not extend to end of window Reply-To: bug#11068 <11068@debbugs.gnu.org> Date: Sat, 21 Jun 2025 02:49:32 +0000 retitle 11068 24.0.94; Face-remapped background does not extend to end of w= indow reassign 11068 emacs submitter 11068 Ivan Andrus severity 11068 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 17:20:27 2012 Received: (at submit) by debbugs.gnu.org; 22 Mar 2012 21:20:27 +0000 Received: from localhost ([127.0.0.1]:33562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SApQn-0001uh-Oy for submit@debbugs.gnu.org; Thu, 22 Mar 2012 17:20:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47188) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SApQl-0001uZ-4L for submit@debbugs.gnu.org; Thu, 22 Mar 2012 17:20:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAowu-0007ct-B5 for submit@debbugs.gnu.org; Thu, 22 Mar 2012 16:49:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:34322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAowu-0007co-5P for submit@debbugs.gnu.org; Thu, 22 Mar 2012 16:49:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAows-0005Vs-5Y for bug-gnu-emacs@gnu.org; Thu, 22 Mar 2012 16:49:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAowo-0007c5-MI for bug-gnu-emacs@gnu.org; Thu, 22 Mar 2012 16:49:29 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:34771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAowo-0007bR-AP for bug-gnu-emacs@gnu.org; Thu, 22 Mar 2012 16:49:26 -0400 Received: by wibhj13 with SMTP id hj13so951845wib.12 for ; Thu, 22 Mar 2012 13:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; bh=Z5nhBuL9fHXVv8N4p5Q8EDcaUVr6STeKt8su02b/8HE=; b=La+VHS7AIMqcGrVPQT8rSB5K6IDrjnZoY/OPI+2MrE8R1Sfk+Hd+M1a3ZBJWs2A5G9 MSZjMiD9VkvydH1Ma89YC7T6GwAE35WbuZE04GtjNsN4p6Wk+1/8zgC9l3MBwxXjSnfX K+3kUktlvCJAVpuERT4q0sixGMXylgi+Rx9HS51Pj/vbChFHBjcskkhBP0ukJOE262lI TouPyh6Mim/ZZriNp9wWEWLJTG07Y4xOjo30fYwncW8emVoSgPzdgDMByiKUueSW0v66 do/Osle12T1++SmtBAWasQforImR2hLTJ3hdhF1IMC4l+VUFf/Lud41MSne2BrQRy3QI asiA== Received: by 10.216.135.66 with SMTP id t44mr5470846wei.8.1332449363401; Thu, 22 Mar 2012 13:49:23 -0700 (PDT) Received: from [10.0.2.16] (catv-80-99-177-93.catv.broadband.hu. [80.99.177.93]) by mx.google.com with ESMTPS id gd4sm733866wib.6.2012.03.22.13.49.20 (version=SSLv3 cipher=OTHER); Thu, 22 Mar 2012 13:49:22 -0700 (PDT) From: Ivan Andrus Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: 24.0.94; Face-remapped background does not extend to end of window Date: Thu, 22 Mar 2012 21:49:10 +0100 Message-Id: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> To: bug-gnu-emacs@gnu.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Run emacs -Q and then evaluate (e.g. in *scratch*) the following (face-remap-add-relative 'default '(:background "dark green")) Notice that the dark green background only appears on the lines which actually contain text. Most of the window still has the white background since the buffer only consists of a few lines. This is annoying for my use case of different backgrounds to signify different modes (e.g. read only). It is also a problem when using :stipple e.g. (face-remap-add-relative 'default '(:stipple = "/Users/gvol/.emacs.d/local/pic/b-rock-grey.jpg")) Thanks, Ivan Andrus In GNU Emacs 24.0.94.6 (i386-apple-darwin10.8.0, NS = apple-appkit-1038.36) of 2012-03-19 on oroszlan.local Windowing system distributor `Apple', version 10.3.1038 Configured using: `configure '--with-ns' '-C'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: UTF-8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x C-g s-` =20 C-x C-e =20 =20 =20 C-k C-y =20 C-y C-u =20 s t i p p l e =20 C-d =20 C-y C-e C-x C-e =20 =20 C-e =20 =20 =20 C-e C-a I t SPC i s SPC=20 a l o s o SPC a SPC p r o b l e m SPC w=20 i h e n SPC u s i n g SPC s t i p p l e=20 : C-e SPC e . g . SPC w h i c h SPC m =20 =20 =20 C-SPC =20 C-w C-/ C-c C-c n o =20 =20 C-e =20 d a r t h=20 a n d r u s @ g m a i l . c o m =20 C-w C-/=20 C-c C-c C-c C-c =20 =20 =20 C-h e =20 =20 =20 =20 M-x r e p o r Recent messages: Making completion list... Load-path shadows: None found. Features: (newcomment shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu view face-remap vc-hg time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 17:49:15 2012 Received: (at 11068) by debbugs.gnu.org; 22 Mar 2012 21:49:15 +0000 Received: from localhost ([127.0.0.1]:33584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SApsg-0002bp-H3 for submit@debbugs.gnu.org; Thu, 22 Mar 2012 17:49:14 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:64753) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SApsd-0002bg-1U for 11068@debbugs.gnu.org; Thu, 22 Mar 2012 17:49:12 -0400 Received: by werb10 with SMTP id b10so2587977wer.3 for <11068@debbugs.gnu.org>; Thu, 22 Mar 2012 14:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=S/z2XKJWRFjq9D85+lLSFhl6VVsJm3nS1yTxF6bvs/o=; b=qwI6nSYdy78yry4w0+HkN8TUwI49Y5B/dZ11bn9KNamr8AxH12UPgQV0id+dU/uc0e vx/WOMZZLYA0/wCXDv5d/QlluiFdH/8lpS9nYYaq0pd4F0ZttbQ1vyuWZwrwIQkHn0KX eQ+7eR7T6+LZYbgfsvAdJIdt/5HTIU5WSEvqWhRwPKRlU6AiZ2tMdeszV+7FZDUkj0Tk uykSRmGdwFnVhyCkAZroRXS1XqZYCj3vF83FEGECHlFnfjaN6D1MuRJwLvnYIrdVykSA y69cES4Fkq7jFukmuIJKQQjZ2wdZS+8stJ/r9/nlvpXuPzrcg534W/DQb7NJrmrXWqk2 8sCA== Received: by 10.216.194.81 with SMTP id l59mr5105067wen.42.1332451100911; Thu, 22 Mar 2012 14:18:20 -0700 (PDT) Received: from [10.0.2.16] (catv-80-99-177-93.catv.broadband.hu. [80.99.177.93]) by mx.google.com with ESMTPS id 17sm8666914wis.0.2012.03.22.14.18.19 (version=SSLv3 cipher=OTHER); Thu, 22 Mar 2012 14:18:20 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: bug#11068: Acknowledgement (24.0.94; Face-remapped background does not extend to end of window) From: Ivan Andrus In-Reply-To: Date: Thu, 22 Mar 2012 22:18:18 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <37D73617-CEBF-43BD-BE92-ADAAD2CA30A5@gmail.com> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> To: 11068@debbugs.gnu.org X-Mailer: Apple Mail (2.1084) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11068 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Sorry, somehow this got sent twice. #11069 is a duplicate of this (or = vice versa). -Ivan On Mar 22, 2012, at 10:21 PM, GNU bug Tracking System wrote: > Thank you for filing a new bug report with debbugs.gnu.org. >=20 > This is an automatically generated reply to let you know your message > has been received. >=20 > Your message is being forwarded to the package maintainers and other > interested parties for their attention; they will reply in due course. >=20 > Your message has been sent to the package maintainer(s): > bug-gnu-emacs@gnu.org >=20 > If you wish to submit further information on this problem, please > send it to 11068@debbugs.gnu.org. >=20 > Please do not send mail to help-debbugs@gnu.org unless you wish > to report a problem with the Bug-tracking system. >=20 > --=20 > 11068: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11068 > GNU Bug Tracking System > Contact help-debbugs@gnu.org with problems From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 18:04:08 2012 Received: (at 11068) by debbugs.gnu.org; 22 Mar 2012 22:04:08 +0000 Received: from localhost ([127.0.0.1]:33604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAq75-0002zA-SS for submit@debbugs.gnu.org; Thu, 22 Mar 2012 18:04:08 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42237) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAq74-0002z3-4w for 11068@debbugs.gnu.org; Thu, 22 Mar 2012 18:04:06 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SApdD-0006yx-LU; Thu, 22 Mar 2012 17:33:15 -0400 From: Glenn Morris To: Ivan Andrus Subject: Re: bug#11068: Acknowledgement (24.0.94; Face-remapped background does not extend to end of window) References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <37D73617-CEBF-43BD-BE92-ADAAD2CA30A5@gmail.com> X-Spook: World Trade Center SRI red noise Marxist NWO EuroFed X-Ran: +VLXu^Dz>C3@DNQX#8MZ*q2YUgjehCRt+%|zxVZ[-wL'rNFzP*_Vrd=^cB7ErP7jL6yfy< X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 22 Mar 2012 17:33:15 -0400 In-Reply-To: <37D73617-CEBF-43BD-BE92-ADAAD2CA30A5@gmail.com> (Ivan Andrus's message of "Thu, 22 Mar 2012 22:18:18 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11068 Cc: 11068@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Ivan Andrus wrote: > Sorry, somehow this got sent twice. #11069 is a duplicate of this (or vice versa). No problem, I removed #11069. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 23 07:07:21 2012 Received: (at 11068) by debbugs.gnu.org; 23 Mar 2012 11:07:21 +0000 Received: from localhost ([127.0.0.1]:34206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SB2L3-0004Zd-1l for submit@debbugs.gnu.org; Fri, 23 Mar 2012 07:07:21 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:34595) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SB2L0-0004ZV-Ga for 11068@debbugs.gnu.org; Fri, 23 Mar 2012 07:07:19 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M1C00E002O8F400@a-mtaout23.012.net.il> for 11068@debbugs.gnu.org; Fri, 23 Mar 2012 12:36:25 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.241.151]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1C00EBA2SO7TI0@a-mtaout23.012.net.il>; Fri, 23 Mar 2012 12:36:25 +0200 (IST) Date: Fri, 23 Mar 2012 12:36:31 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> X-012-Sender: halo1@inter.net.il To: Ivan Andrus Message-id: <83ty1fvc28.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: 11068@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Ivan Andrus > Date: Thu, 22 Mar 2012 21:49:10 +0100 > > Run emacs -Q and then evaluate (e.g. in *scratch*) the following > > (face-remap-add-relative 'default '(:background "dark green")) > > Notice that the dark green background only appears on the lines which > actually contain text. Most of the window still has the white > background since the buffer only consists of a few lines. This is > annoying for my use case of different backgrounds to signify different > modes (e.g. read only). > > It is also a problem when using :stipple e.g. > > (face-remap-add-relative 'default '(:stipple "/Users/gvol/.emacs.d/local/pic/b-rock-grey.jpg")) Thanks. This is how Emacs display engine always worked: the non-text parts of the window display are drawn in the default face. (Remapping does not change the default face, as far as Emacs internals are concerned, it just substitutes a different face in its stead, leaving the literal DEFAULT_FACE_ID intact.) So this bug has rather low priority at this time, as it's not a regression wrt Emacs 23. Time permitting, I will at the very least try to figure out what changes are needed to make this work as expected. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 23 07:19:17 2012 Received: (at 11068) by debbugs.gnu.org; 23 Mar 2012 11:19:17 +0000 Received: from localhost ([127.0.0.1]:34225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SB2WW-0004t7-K1 for submit@debbugs.gnu.org; Fri, 23 Mar 2012 07:19:16 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:61328) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SB2WT-0004sn-HV for 11068@debbugs.gnu.org; Fri, 23 Mar 2012 07:19:10 -0400 Received: by bkuw5 with SMTP id w5so2389074bku.3 for <11068@debbugs.gnu.org>; Fri, 23 Mar 2012 03:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=yIQoeq43YSx33k+VopsmrSqV8pcI1btn8hKkkoVWVCM=; b=ZXBOc4VSULVgg+NE6ujpY/J7f470x7uSjzbQkzjsyBxBTOQ+FbZYMnHdu/nRmnAR/M KQwUF19pvr39cWWT8/SVX+VeebOsLks1XxPFKSQO/xPDgGW9otQwfM0IKapPrNDObAXe rnxq+1djzslVk5c+CeEvCFTJF8+PNA8UNJCBNPoQnSRCSaMZcDp+GuhKb2h7UbKaIU/a 1qNxpMuhftKuI2oNQdTOqq2rb4YwxtXJejJ+QKHF7dIlLamFA7F/OmtussSxA7gf2j50 5OTOezqWLkR5aLpO9e+6gmQmaX+W6+p2EguhIZa8ojWqWhZlF9Gb2CyU7DM0VzhpNiHv itsg== Received: by 10.204.152.12 with SMTP id e12mr4476439bkw.29.1332499696378; Fri, 23 Mar 2012 03:48:16 -0700 (PDT) Received: from [10.0.2.16] (catv-80-99-177-93.catv.broadband.hu. [80.99.177.93]) by mx.google.com with ESMTPS id zx16sm15293767bkb.13.2012.03.23.03.48.14 (version=SSLv3 cipher=OTHER); Fri, 23 Mar 2012 03:48:15 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window From: Ivan Andrus In-Reply-To: <83ty1fvc28.fsf@gnu.org> Date: Fri, 23 Mar 2012 11:48:12 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <9D3EE118-9398-438C-99A8-B73887FDCC66@gmail.com> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> To: 11068@debbugs.gnu.org X-Mailer: Apple Mail (2.1084) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11068 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Mar 23, 2012, at 11:36 AM, Eli Zaretskii wrote: From: Ivan Andrus >> Date: Thu, 22 Mar 2012 21:49:10 +0100 >>=20 >> Run emacs -Q and then evaluate (e.g. in *scratch*) the following >>=20 >> (face-remap-add-relative 'default '(:background "dark green")) >>=20 >> Notice that the dark green background only appears on the lines which >> actually contain text. Most of the window still has the white >> background since the buffer only consists of a few lines. This is >> annoying for my use case of different backgrounds to signify = different >> modes (e.g. read only). >>=20 >> It is also a problem when using :stipple e.g. >>=20 >> (face-remap-add-relative 'default '(:stipple = "/Users/gvol/.emacs.d/local/pic/b-rock-grey.jpg")) >=20 > Thanks. >=20 > This is how Emacs display engine always worked: the non-text parts of > the window display are drawn in the default face. (Remapping does not > change the default face, as far as Emacs internals are concerned, it > just substitutes a different face in its stead, leaving the literal > DEFAULT_FACE_ID intact.) > So this bug has rather low priority at this time, as it's not a > regression wrt Emacs 23. Time permitting, I will at the very least > try to figure out what changes are needed to make this work as > expected. I completely understand about priorities right now. In fact, it's taken = me a while to finally get around to reporting it. -Ivan= From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 23 15:38:08 2012 Received: (at control) by debbugs.gnu.org; 23 Mar 2012 19:38:08 +0000 Received: from localhost ([127.0.0.1]:35731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBAJJ-0000rC-CV for submit@debbugs.gnu.org; Fri, 23 Mar 2012 15:38:07 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34052) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBAJG-0000r4-RB for control@debbugs.gnu.org; Fri, 23 Mar 2012 15:38:03 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SB9pM-0003sy-28 for control@debbugs.gnu.org; Fri, 23 Mar 2012 15:07:08 -0400 Date: Fri, 23 Mar 2012 15:07:08 -0400 Message-Id: Subject: control message for bug 11068 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) severity 11068 wishlist From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 09:08:21 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 13:08:21 +0000 Received: from localhost ([127.0.0.1]:36397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBQhg-0006Jv-IQ for submit@debbugs.gnu.org; Sat, 24 Mar 2012 09:08:21 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:35018) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBQhd-0006Jm-T8 for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 09:08:19 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1E00F002V6ZA00@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 14:37:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.241.151]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1E00F2Q325Z420@a-mtaout22.012.net.il>; Sat, 24 Mar 2012 14:37:18 +0200 (IST) Date: Sat, 24 Mar 2012 14:37:17 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <83ty1fvc28.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: darthandrus@gmail.com, Stefan Monnier , Chong Yidong Message-id: <83obrmtbsy.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: 11068@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Fri, 23 Mar 2012 12:36:31 +0200 > From: Eli Zaretskii > Cc: 11068@debbugs.gnu.org > > This is how Emacs display engine always worked: the non-text parts of > the window display are drawn in the default face. (Remapping does not > change the default face, as far as Emacs internals are concerned, it > just substitutes a different face in its stead, leaving the literal > DEFAULT_FACE_ID intact.) > > So this bug has rather low priority at this time, as it's not a > regression wrt Emacs 23. Time permitting, I will at the very least > try to figure out what changes are needed to make this work as > expected. The patch below makes Emacs work as expected in this case. Whether to install this now or wait until after Emacs 24.1, is up to Stefan and Chong. === modified file 'src/xdisp.c' --- a/src/xdisp.c 2012-03-24 12:33:40 +0000 +++ b/src/xdisp.c 2012-03-24 12:34:53 +0000 @@ -18173,7 +18173,12 @@ it->len = 1; if (default_face_p) - it->face_id = DEFAULT_FACE_ID; + { + if (NILP (Vface_remapping_alist)) + it->face_id = DEFAULT_FACE_ID; + else + it->face_id = lookup_basic_face (it->f, DEFAULT_FACE_ID); + } else if (it->face_before_selective_p) it->face_id = it->saved_face_id; face = FACE_FROM_ID (it->f, it->face_id); @@ -18209,7 +18214,7 @@ static void extend_face_to_end_of_line (struct it *it) { - struct face *face; + struct face *face, *default_face; struct frame *f = it->f; /* If line is already filled, do nothing. Non window-system frames @@ -18223,11 +18228,16 @@ && !it->glyph_row->continued_p)) return; + /* The default face, possibly remapped. */ + default_face = FACE_FROM_ID (f, lookup_basic_face (f, DEFAULT_FACE_ID)); + /* Face extension extends the background and box of IT->face_id to the end of the line. If the background equals the background of the frame, we don't have to do anything. */ if (it->face_before_selective_p) face = FACE_FROM_ID (f, it->saved_face_id); + else if (it->face_id == DEFAULT_FACE_ID) + face = default_face; else face = FACE_FROM_ID (f, it->face_id); @@ -18260,7 +18270,7 @@ if (it->glyph_row->used[TEXT_AREA] == 0) { it->glyph_row->glyphs[TEXT_AREA][0] = space_glyph; - it->glyph_row->glyphs[TEXT_AREA][0].face_id = it->face_id; + it->glyph_row->glyphs[TEXT_AREA][0].face_id = face->id; it->glyph_row->used[TEXT_AREA] = 1; } #ifdef HAVE_WINDOW_SYSTEM @@ -18296,7 +18306,7 @@ face, to avoid painting the rest of the window with the region face, if the region ends at ZV. */ if (it->glyph_row->ends_at_zv_p) - it->face_id = DEFAULT_FACE_ID; + it->face_id = default_face->id; else it->face_id = face->id; append_stretch_glyph (it, make_number (0), stretch_width, @@ -18329,7 +18339,7 @@ avoid painting the rest of the window with the region face, if the region ends at ZV. */ if (it->glyph_row->ends_at_zv_p) - it->face_id = DEFAULT_FACE_ID; + it->face_id = default_face->id; else it->face_id = face->id; @@ -18993,8 +19003,13 @@ /* A row that displays right-to-left text must always have its last face extended all the way to the end of line, even if this row ends in ZV, because we still write to - the screen left to right. */ - if (row->reversed_p) + the screen left to right. We also need to extend the + last face if the default face is remapped to some + different face, otherwise the functions that clear + portions of the screen will clear with the default face's + background color. */ + if (row->reversed_p + || lookup_basic_face (it->f, DEFAULT_FACE_ID) != DEFAULT_FACE_ID) extend_face_to_end_of_line (it); break; } From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 10:13:02 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 14:13:02 +0000 Received: from localhost ([127.0.0.1]:36990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBRiH-0007vT-FV for submit@debbugs.gnu.org; Sat, 24 Mar 2012 10:13:02 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:53449) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBRi1-0007uy-0c for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 10:13:00 -0400 Received: (qmail invoked by alias); 24 Mar 2012 13:41:45 -0000 Received: from 62-47-43-39.adsl.highway.telekom.at (EHLO [62.47.43.39]) [62.47.43.39] by mail.gmx.net (mp017) with SMTP; 24 Mar 2012 14:41:45 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/yNglTjPDyEr7hOD9RLG8FB6nHpSkrRJtsO06D4A Sr423ppINX5aOV Message-ID: <4F6DCF31.3060609@gmx.at> Date: Sat, 24 Mar 2012 14:42:09 +0100 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> In-Reply-To: <83obrmtbsy.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, Chong Yidong , 11068@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > The patch below makes Emacs work as expected in this case. Whether to > install this now or wait until after Emacs 24.1, is up to Stefan and > Chong. Excellent! This feature has been requested a number of times over the past years (though nobody bothered to write a bug report before Ivan helped out) and I'd strongly vote for including it in Emacs 24.1. There's just one detail missing: A number of people asked for highlighting _only_ the selected window and if a buffer appears in more than one window the present mechanism won't help in this regard. So couldn't we have the mechanism also respect a window parameter specifying some face as default window face with higher priority than the face specified for the buffer? Thanks for getting us this far, martin From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 10:43:44 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 14:43:44 +0000 Received: from localhost ([127.0.0.1]:37003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBSBx-0000Bf-BQ for submit@debbugs.gnu.org; Sat, 24 Mar 2012 10:43:44 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:55714) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBSBP-0000B0-4Q for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 10:43:40 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M1E00H006UZXW00@a-mtaout23.012.net.il> for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 16:12:05 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1E00HJS7G3SSC0@a-mtaout23.012.net.il>; Sat, 24 Mar 2012 16:12:04 +0200 (IST) Date: Sat, 24 Mar 2012 16:12:03 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F6DCF31.3060609@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83fwcyt7f0.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sat, 24 Mar 2012 14:42:09 +0100 > From: martin rudalics > CC: darthandrus@gmail.com, Stefan Monnier , > Chong Yidong , > 11068@debbugs.gnu.org > > There's just one detail missing: A number of people asked for > highlighting _only_ the selected window and if a buffer appears in more > than one window the present mechanism won't help in this regard. So > couldn't we have the mechanism also respect a window parameter > specifying some face as default window face with higher priority than > the face specified for the buffer? I don't know, I would need to see some details, like how will this preference be visible to the display engine. Please note that the changes I've shown only notice when the `default' face is being remapped, they change nothing in how that default face is computed. So I suspect we won't be able to use the same mechanism to do what you want, because what you want changes the way the default face is computed (IIUC). From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 10:48:59 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 14:48:59 +0000 Received: from localhost ([127.0.0.1]:37007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBSH4-0000JP-Mm for submit@debbugs.gnu.org; Sat, 24 Mar 2012 10:48:59 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:46876) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBSGz-0000JE-3U for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 10:48:57 -0400 Received: from bb121-6-68-206.singnet.com.sg ([121.6.68.206]:34522 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SBRmx-0000PO-Mz; Sat, 24 Mar 2012 10:17:52 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> Date: Sat, 24 Mar 2012 22:17:41 +0800 In-Reply-To: <83obrmtbsy.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Mar 2012 14:37:17 +0200") Message-ID: <87ty1ekrqy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Eli Zaretskii writes: > /* Face extension extends the background and box of IT->face_id > to the end of the line. If the background equals the background > of the frame, we don't have to do anything. */ > if (it->face_before_selective_p) > face = FACE_FROM_ID (f, it->saved_face_id); > + else if (it->face_id == DEFAULT_FACE_ID) > + face = default_face; > else > face = FACE_FROM_ID (f, it->face_id); This looks a bit strange. Why is DEFAULT_FACE_ID handled specially here? Shouldn't we be checking for face remapping no matter what the face_id is? From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 11:12:14 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 15:12:14 +0000 Received: from localhost ([127.0.0.1]:37013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBSdZ-0000tF-ID for submit@debbugs.gnu.org; Sat, 24 Mar 2012 11:12:14 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:63773) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBSd0-0000sG-9N for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 11:12:11 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1E00G0089HW300@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 16:40:38 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1E00G8O8RPAZF0@a-mtaout22.012.net.il>; Sat, 24 Mar 2012 16:40:38 +0200 (IST) Date: Sat, 24 Mar 2012 16:40:37 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <87ty1ekrqy.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83ehsit63e.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Cc: darthandrus@gmail.com, Stefan Monnier , 11068@debbugs.gnu.org > Date: Sat, 24 Mar 2012 22:17:41 +0800 > > Eli Zaretskii writes: > > > /* Face extension extends the background and box of IT->face_id > > to the end of the line. If the background equals the background > > of the frame, we don't have to do anything. */ > > if (it->face_before_selective_p) > > face = FACE_FROM_ID (f, it->saved_face_id); > > + else if (it->face_id == DEFAULT_FACE_ID) > > + face = default_face; > > else > > face = FACE_FROM_ID (f, it->face_id); > > This looks a bit strange. Why is DEFAULT_FACE_ID handled specially > here? In my testing, I didn't see the need to do it even for the default face, because it->face_id is already set to the ID of the remapped face. So it's just me being paranoiac. Because of this condition, immediately below the fragment you cited: if (FRAME_WINDOW_P (f) && it->glyph_row->displays_text_p && face->box == FACE_NO_BOX && face->background == FRAME_BACKGROUND_PIXEL (f) && !face->stipple && !it->glyph_row->reversed_p) return; Any non-default face would already penetrate this condition > Shouldn't we be checking for face remapping no matter what the > face_id is? The remapping takes place before we hit this function, which is at the end of displaying a line. So the face is already remapped. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 14:35:22 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 18:35:22 +0000 Received: from localhost ([127.0.0.1]:37151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBVo9-0006S2-O2 for submit@debbugs.gnu.org; Sat, 24 Mar 2012 14:35:22 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:62848) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBVnu-0006Rh-2T for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 14:35:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9FpYqr/2dsb2JhbACBX5x7eYhwnhmGGQSbGYQJ X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="169895464" Received: from 69-165-138-171.dsl.teksavvy.com (HELO pastel.home) ([69.165.138.171]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Mar 2012 14:04:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id 3E7DF58F52; Sat, 24 Mar 2012 14:04:05 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window Message-ID: References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> Date: Sat, 24 Mar 2012 14:04:05 -0400 In-Reply-To: <4F6DCF31.3060609@gmx.at> (martin rudalics's message of "Sat, 24 Mar 2012 14:42:09 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, Eli Zaretskii , 11068@debbugs.gnu.org, Chong Yidong X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > There's just one detail missing: A number of people asked for > highlighting _only_ the selected window and if a buffer appears in more > than one window the present mechanism won't help in this regard. So > couldn't we have the mechanism also respect a window parameter > specifying some face as default window face with higher priority than > the face specified for the buffer? If you want such a feature, I'd suggest you start by looking at every place that observes Vface_remapping_alist and change it to also consider Fwindow_parameter (selected_window, Qface_remapping_alist). I can't guarantee this will be sufficient, but it should be a good starting point. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 16:19:57 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 20:19:57 +0000 Received: from localhost ([127.0.0.1]:37222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBXRJ-0000T9-Cp for submit@debbugs.gnu.org; Sat, 24 Mar 2012 16:19:57 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:40027) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBXQl-0000SR-KB for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 16:19:52 -0400 Received: (qmail invoked by alias); 24 Mar 2012 19:48:18 -0000 Received: from 62-47-49-137.adsl.highway.telekom.at (EHLO [62.47.49.137]) [62.47.49.137] by mail.gmx.net (mp024) with SMTP; 24 Mar 2012 20:48:18 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18LQYYrScoLxVdReJyWOcZwBqoN1EiL9VOwvHSi+n r7ZwQ//+Euae/+ Message-ID: <4F6E24FD.2070907@gmx.at> Date: Sat, 24 Mar 2012 20:48:13 +0100 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> In-Reply-To: <83fwcyt7f0.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > I don't know, I would need to see some details, like how will this > preference be visible to the display engine. Via some function that extracts a valid face from a window parameter. Actually, the only interesting thing IMO is the background attribute. I don't think that changing any other attributes would make sense. But the same holds for the current patch as well: You simply fill up the rest of the window with the background of the remapped default face. Or am I missing something? > Please note that the changes I've shown only notice when the `default' > face is being remapped, they change nothing in how that default face > is computed. So I suspect we won't be able to use the same mechanism > to do what you want, because what you want changes the way the default > face is computed (IIUC). I don't know how face remapping works so I can't tell. I thought that remapping does recompute the default face. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 16:19:59 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 20:19:59 +0000 Received: from localhost ([127.0.0.1]:37224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBXRO-0000TO-Lc for submit@debbugs.gnu.org; Sat, 24 Mar 2012 16:19:59 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:38898) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBXR2-0000Sm-Ch for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 16:19:56 -0400 Received: (qmail invoked by alias); 24 Mar 2012 19:48:36 -0000 Received: from 62-47-49-137.adsl.highway.telekom.at (EHLO [62.47.49.137]) [62.47.49.137] by mail.gmx.net (mp012) with SMTP; 24 Mar 2012 20:48:36 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/j/aMqAw/jzRVduBEY/sEZHtCNXoB93+Ea0G11jS u4uMb2GIY/vRGu Message-ID: <4F6E250F.3080906@gmx.at> Date: Sat, 24 Mar 2012 20:48:31 +0100 From: martin rudalics MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, Eli Zaretskii , 11068@debbugs.gnu.org, Chong Yidong X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > If you want such a feature, Personally I'd have no use for it. But the request for such a feature reappears from time to time on help-gnu-emacs. > I'd suggest you start by looking at every > place that observes Vface_remapping_alist and change it to also consider > Fwindow_parameter (selected_window, Qface_remapping_alist). > I can't guarantee this will be sufficient, but it should be a good > starting point. These are all in xfaces.c and I doubt they have any idea about the window currently drawn. Anyway, I'll rather redraw my request - the feature as Eli currently implements it is all I need (for more than 10 years, meanwhile). martin From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 17:18:35 2012 Received: (at 11068) by debbugs.gnu.org; 24 Mar 2012 21:18:35 +0000 Received: from localhost ([127.0.0.1]:37256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBYM5-0001rn-PA for submit@debbugs.gnu.org; Sat, 24 Mar 2012 17:18:35 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:60718) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBYLo-0001rN-Fs for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 17:18:31 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1E00J00PN6G800@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 22:47:14 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1E00J3WPQPA860@a-mtaout22.012.net.il>; Sat, 24 Mar 2012 22:47:14 +0200 (IST) Date: Sat, 24 Mar 2012 22:47:13 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F6E24FD.2070907@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83wr69sp4e.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sat, 24 Mar 2012 20:48:13 +0100 > From: martin rudalics > CC: darthandrus@gmail.com, monnier@iro.umontreal.ca, > cyd@stupidchicken.com, 11068@debbugs.gnu.org > > > I don't know, I would need to see some details, like how will this > > preference be visible to the display engine. > > Via some function that extracts a valid face from a window parameter. > Actually, the only interesting thing IMO is the background attribute. I > don't think that changing any other attributes would make sense. You might be surprised what the users night want ... > But the same holds for the current patch as well: You simply fill up > the rest of the window with the background of the remapped default > face. No, not only background. The entire face with all its attributes is used. E.g., stipple (which doesn't work on MS-Windows), font (i.e. the size of each line in pixels), etc. And you cannot "fill the rest of the window" with some color, at least not on the device-independent level of the display engine where I made the changes. The only way the display engine can dictate colors (and other face attributes) is by creating glyphs which have these attributes and adding those glyphs to the current glyph matrix. What the changes I suggested do is add stretch glyphs of a suitably computed width to each glyph row that has no text in it. The changes are small because the code that does that was already written for the bidirectional display, which needs to display R2L lines flushed all the way to the right margin of the window; it does that by prepending such a stretch glyph to the R2L glyph rows, ahead (i.e to the left) of the text. All I needed was to activate that code for the case of remapped default face, in addition to R2L lines. > > Please note that the changes I've shown only notice when the `default' > > face is being remapped, they change nothing in how that default face > > is computed. So I suspect we won't be able to use the same mechanism > > to do what you want, because what you want changes the way the default > > face is computed (IIUC). > > I don't know how face remapping works so I can't tell. I thought that > remapping does recompute the default face. It does, indeed, but I didn't touch that part. I only used the already computed remapped face in a couple of places. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 23:33:12 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 03:33:12 +0000 Received: from localhost ([127.0.0.1]:37317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBeCc-00027E-Ld for submit@debbugs.gnu.org; Sat, 24 Mar 2012 23:33:12 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:54656) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBeC2-00026D-Su for 11068@debbugs.gnu.org; Sat, 24 Mar 2012 23:33:08 -0400 Received: from bb121-6-68-206.singnet.com.sg ([121.6.68.206]:36259 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SBdhx-00025B-S0; Sat, 24 Mar 2012 23:01:30 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> Date: Sun, 25 Mar 2012 11:01:17 +0800 In-Reply-To: <83ehsit63e.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Mar 2012 16:40:37 +0200") Message-ID: <87mx75z8n6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Eli Zaretskii writes: >> This looks a bit strange. Why is DEFAULT_FACE_ID handled specially >> here? > > In my testing, I didn't see the need to do it even for the default > face, because it->face_id is already set to the ID of the remapped > face. So it's just me being paranoiac. I'd just leave that bit out. Also, in this hunk @@ -18173,7 +18173,12 @@ it->len = 1; if (default_face_p) - it->face_id = DEFAULT_FACE_ID; + { + if (NILP (Vface_remapping_alist)) + it->face_id = DEFAULT_FACE_ID; + else + it->face_id = lookup_basic_face (it->f, DEFAULT_FACE_ID); + } else if (it->face_before_selective_p) it->face_id = it->saved_face_id; face = FACE_FROM_ID (it->f, it->face_id); You should call lookup_basic_face without the surrounding if statement, because lookup_basic_face returns its second arg immediately if face-remapping-alist is nil, making the extra check redundant. And here + if (row->reversed_p + || lookup_basic_face (it->f, DEFAULT_FACE_ID) != DEFAULT_FACE_ID) shouldn't you just compare default_face->id to DEFAULT_FACE_ID instead of making another lookup_basic_face call? With these changes, the patch seems pretty safe; even if something screws up, it will only affect how remapped faces extend to the end of the buffer, which was broken before anyway. So feel free to commit. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 00:34:27 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 04:34:27 +0000 Received: from localhost ([127.0.0.1]:37381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBf9u-0003X1-Mk for submit@debbugs.gnu.org; Sun, 25 Mar 2012 00:34:27 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:48202) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBf9N-0003Vy-7O for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 00:34:26 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1F00M009S29500@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 06:02:50 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1F00L2Y9WPQAF0@a-mtaout22.012.net.il>; Sun, 25 Mar 2012 06:02:50 +0200 (IST) Date: Sun, 25 Mar 2012 06:02:49 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <87mx75z8n6.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83ty1ds4ye.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Cc: darthandrus@gmail.com, monnier@iro.umontreal.ca, 11068@debbugs.gnu.org > Date: Sun, 25 Mar 2012 11:01:17 +0800 > > Eli Zaretskii writes: > > >> This looks a bit strange. Why is DEFAULT_FACE_ID handled specially > >> here? > > > > In my testing, I didn't see the need to do it even for the default > > face, because it->face_id is already set to the ID of the remapped > > face. So it's just me being paranoiac. > > I'd just leave that bit out. OK. > Also, in this hunk > > @@ -18173,7 +18173,12 @@ > it->len = 1; > > if (default_face_p) > - it->face_id = DEFAULT_FACE_ID; > + { > + if (NILP (Vface_remapping_alist)) > + it->face_id = DEFAULT_FACE_ID; > + else > + it->face_id = lookup_basic_face (it->f, DEFAULT_FACE_ID); > + } > else if (it->face_before_selective_p) > it->face_id = it->saved_face_id; > face = FACE_FROM_ID (it->f, it->face_id); > > You should call lookup_basic_face without the surrounding if statement, > because lookup_basic_face returns its second arg immediately if > face-remapping-alist is nil, making the extra check redundant. Right. > And here > > + if (row->reversed_p > + || lookup_basic_face (it->f, DEFAULT_FACE_ID) != DEFAULT_FACE_ID) > > shouldn't you just compare default_face->id to DEFAULT_FACE_ID instead > of making another lookup_basic_face call? Here I disagree: I think we should confine the internal details of face remapping to lookup_basic_face, instead of spilling our knowledge about that all over. As you just said above, if face-remapping-alist is nil, that function returns immediately, so there's nothing lost here for the "usual" use-case. > With these changes, the patch seems pretty safe; even if something > screws up, it will only affect how remapped faces extend to the end of > the buffer, which was broken before anyway. So feel free to commit. OK, but to be absolutely fair, I must point out that, while the patch is very simple, it has one non-trivial consequence: when the default face _is_ remapped, the empty space to the right of any L2R line and the empty lines beyond EOB are filled with stretch glyphs of a suitably computed width. Before the patch, there were no glyphs in those places. So, from the POV of the content of the glyph matrices, the change introduced by these patches is quite prominent. In particular, this could potentially affect any code that examines the glyphs of a glyph matrix; previously, such stretch glyphs were only present at the left side of R2L glyph rows. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 02:52:47 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 06:52:47 +0000 Received: from localhost ([127.0.0.1]:37436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBhJm-0006rh-EP for submit@debbugs.gnu.org; Sun, 25 Mar 2012 02:52:47 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:56365) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBhJD-0006qz-Ct for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 02:52:45 -0400 Received: from bb121-6-68-206.singnet.com.sg ([121.6.68.206]:38111 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SBgp7-0006o3-KI; Sun, 25 Mar 2012 02:21:06 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> Date: Sun, 25 Mar 2012 14:20:57 +0800 In-Reply-To: <83ty1ds4ye.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 25 Mar 2012 06:02:49 +0200") Message-ID: <87398x19rq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Eli Zaretskii writes: > Here I disagree: I think we should confine the internal details of > face remapping to lookup_basic_face, instead of spilling our knowledge > about that all over. As you just said above, if face-remapping-alist > is nil, that function returns immediately, so there's nothing lost > here for the "usual" use-case. I don't know how making use of the return value from a previous call to lookup_basic_face (when default_face was assigned) is "spilling our knowledge", but whatever; it's not a important point. > OK, but to be absolutely fair, I must point out that, while the patch > is very simple, it has one non-trivial consequence: when the default > face _is_ remapped, the empty space to the right of any L2R line and > the empty lines beyond EOB are filled with stretch glyphs of a > suitably computed width. Before the patch, there were no glyphs in > those places. So, from the POV of the content of the glyph matrices, > the change introduced by these patches is quite prominent. In > particular, this could potentially affect any code that examines the > glyphs of a glyph matrix; previously, such stretch glyphs were only > present at the left side of R2L glyph rows. Hmm, you're right, that is a non-trivial change. The implications of that are not obvious to me. Maybe we should delay this for post-24.1 then. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 09:25:37 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 13:25:37 +0000 Received: from localhost ([127.0.0.1]:37658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBnRw-00005F-9p for submit@debbugs.gnu.org; Sun, 25 Mar 2012 09:25:37 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:51218) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBnRd-0008WR-9i for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 09:25:33 -0400 Received: (qmail invoked by alias); 25 Mar 2012 12:54:12 -0000 Received: from 62-47-44-190.adsl.highway.telekom.at (EHLO [62.47.44.190]) [62.47.44.190] by mail.gmx.net (mp039) with SMTP; 25 Mar 2012 14:54:12 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/z7dpo44Lz3bGKX5tcnP+GbCpMRj97jr90HJZ58m LYZQR/pI+T7g4H Message-ID: <4F6F1574.2090904@gmx.at> Date: Sun, 25 Mar 2012 14:54:12 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> In-Reply-To: <83wr69sp4e.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> But the same holds for the current patch as well: You simply fill up >> the rest of the window with the background of the remapped default >> face. > > No, not only background. The entire face with all its attributes is > used. E.g., stipple (which doesn't work on MS-Windows), font > (i.e. the size of each line in pixels), etc. > > And you cannot "fill the rest of the window" with some color, at least > not on the device-independent level of the display engine where I made > the changes. The only way the display engine can dictate colors (and > other face attributes) is by creating glyphs which have these > attributes and adding those glyphs to the current glyph matrix. > > What the changes I suggested do is add stretch glyphs of a suitably > computed width to each glyph row that has no text in it. The changes > are small because the code that does that was already written for the > bidirectional display, which needs to display R2L lines flushed all > the way to the right margin of the window; it does that by prepending > such a stretch glyph to the R2L glyph rows, ahead (i.e to the left) of > the text. All I needed was to activate that code for the case of > remapped default face, in addition to R2L lines. Consider the following example: In my .emacs I do for ages (custom-set-faces '(font-lock-comment-face ((((class color) (background light)) (:background "Beige" :foreground "Black"))))) Evaluate this form with emacs -Q in *scratch* and you will see that the background color extends from each buffer line end to the right window edge. This is butt ugly (and incorrect IMHO) and I had to write my own `font-lock-fontify-syntactically-region' function in order to remove the face property from the return character but I disgress ... Anyway, my conclusion from this example is that even in normal L2R text Emacs somehow constructs a stretch glyph (or whatever else) to simulate the effect of text properties over some virtual text. I assume that your solution does something equivalent for every virtual buffer line that is missing down to the bottom of the window. And it takes the face property not from the return character but from the remapped default face. Apart from that why do you need a solution from R2L lines here? As an aside I earlier tried to achieve the effect of your patch by adding an overlay with an after-string containing an appropriate number of return characters to the last character of each buffer. It didn't work and I still consider that a bug. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 09:26:14 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 13:26:14 +0000 Received: from localhost ([127.0.0.1]:37665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBnSX-00006V-Qr for submit@debbugs.gnu.org; Sun, 25 Mar 2012 09:26:14 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:54108) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBnST-00006L-0S for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 09:26:10 -0400 Received: (qmail invoked by alias); 25 Mar 2012 12:55:04 -0000 Received: from 62-47-44-190.adsl.highway.telekom.at (EHLO [62.47.44.190]) [62.47.44.190] by mail.gmx.net (mp039) with SMTP; 25 Mar 2012 14:55:04 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX199D18tp9d99/gNwhsVoMg4ZlocQGgB12scoZ01fI 46765l31Ld6vgV Message-ID: <4F6F159D.4050709@gmx.at> Date: Sun, 25 Mar 2012 14:54:53 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> In-Reply-To: <83ty1ds4ye.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, Chong Yidong X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > previously, such stretch glyphs were only > present at the left side of R2L glyph rows. Are you taking into account the example from my other mail? What does the display engine use at the right side of L2R glyph rows? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 09:26:22 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 13:26:22 +0000 Received: from localhost ([127.0.0.1]:37668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBnSf-00006s-Nl for submit@debbugs.gnu.org; Sun, 25 Mar 2012 09:26:22 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:41291) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBnSd-00006l-Qb for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 09:26:20 -0400 Received: (qmail invoked by alias); 25 Mar 2012 12:55:14 -0000 Received: from 62-47-44-190.adsl.highway.telekom.at (EHLO [62.47.44.190]) [62.47.44.190] by mail.gmx.net (mp004) with SMTP; 25 Mar 2012 14:55:14 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19ndEhJuTZn/Jl6wQI9dIpALV2JPxiU0z7uArz0E5 gQZFZVLNnUnujx Message-ID: <4F6F15B3.1010302@gmx.at> Date: Sun, 25 Mar 2012 14:55:15 +0200 From: martin rudalics MIME-Version: 1.0 To: Chong Yidong Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <87398x19rq.fsf@gnu.org> In-Reply-To: <87398x19rq.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, Eli Zaretskii , 11068@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Hmm, you're right, that is a non-trivial change. The implications of > that are not obvious to me. Maybe we should delay this for post-24.1 > then. If you delay it, please post the preliminary patch somewhere so I can use and test it. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 13:54:21 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 17:54:21 +0000 Received: from localhost ([127.0.0.1]:38490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBre0-00088a-Nn for submit@debbugs.gnu.org; Sun, 25 Mar 2012 13:54:21 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:61095) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBrdj-000886-Hx for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 13:54:18 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1G00800AWSY500@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 19:22:25 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1G007ACAXB2IT0@a-mtaout22.012.net.il>; Sun, 25 Mar 2012 19:22:25 +0200 (IST) Date: Sun, 25 Mar 2012 19:22:25 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F6F1574.2090904@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83r4wgsii6.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sun, 25 Mar 2012 14:54:12 +0200 > From: martin rudalics > CC: darthandrus@gmail.com, monnier@iro.umontreal.ca, > cyd@stupidchicken.com, 11068@debbugs.gnu.org > > > What the changes I suggested do is add stretch glyphs of a suitably > > computed width to each glyph row that has no text in it. The changes > > are small because the code that does that was already written for the > > bidirectional display, which needs to display R2L lines flushed all > > the way to the right margin of the window; it does that by prepending > > such a stretch glyph to the R2L glyph rows, ahead (i.e to the left) of > > the text. All I needed was to activate that code for the case of > > remapped default face, in addition to R2L lines. > > Consider the following example: In my .emacs I do for ages > > (custom-set-faces > '(font-lock-comment-face ((((class color) (background light)) (:background "Beige" :foreground "Black"))))) > > Evaluate this form with emacs -Q in *scratch* and you will see that the > background color extends from each buffer line end to the right window > edge. Yes, that's true (and well known). > Anyway, my conclusion from this example is that even in normal L2R text > Emacs somehow constructs a stretch glyph (or whatever else) to simulate > the effect of text properties over some virtual text. Correct. But only for lines that end before EOB. The line that ends _at_ EOB and all the subsequent lines don't have this stretch glyph. The changes I did introduce such stretch glyphs for _all_ lines in the window than don't already have them. > I assume that your solution does something equivalent for every > virtual buffer line that is missing down to the bottom of the > window. Yes. > And it takes the face property not from the return character but > from the remapped default face. No, the return character has no face, and in fact it has no glyphs. The original code would reset the face to the (un-remapped) default face when it hits the line at EOB, and would not draw past EOB at all, instead relying on the display-specific code that clears the rest of the window with the default color. Since now there are stretch glyphs there, we do draw in those areas, and we draw in the precise face that remapping specifies. > Apart from that why do you need a solution from R2L lines here? Nothing, I just reused the machinery that was invented for R2L lines. > As an aside I earlier tried to achieve the effect of your patch by > adding an overlay with an after-string containing an appropriate number > of return characters to the last character of each buffer. It didn't > work and I still consider that a bug. If you show me the code, I will see if it's a bug or something else. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 13:57:13 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 17:57:13 +0000 Received: from localhost ([127.0.0.1]:38494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBrgm-0008Cm-TT for submit@debbugs.gnu.org; Sun, 25 Mar 2012 13:57:13 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:53228) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBrgR-0008C0-FM for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 13:57:10 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M1G00400AXBBZ00@a-mtaout21.012.net.il> for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 19:25:32 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1G004QFB2I0QE0@a-mtaout21.012.net.il>; Sun, 25 Mar 2012 19:25:31 +0200 (IST) Date: Sun, 25 Mar 2012 19:25:31 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F6F159D.4050709@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83obrksid0.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <4F6F159D.4050709@gmx.at> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, cyd@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sun, 25 Mar 2012 14:54:53 +0200 > From: martin rudalics > CC: Chong Yidong , darthandrus@gmail.com, > 11068@debbugs.gnu.org > > > previously, such stretch glyphs were only > > present at the left side of R2L glyph rows. > > Are you taking into account the example from my other mail? What does > the display engine use at the right side of L2R glyph rows? Normally, nothing. If the face of the last character of a line has the same background as the default face and no stipple, there are no stretch glyphs at the right side. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 13:58:10 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 17:58:10 +0000 Received: from localhost ([127.0.0.1]:38499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBrhi-0008EE-Bh for submit@debbugs.gnu.org; Sun, 25 Mar 2012 13:58:10 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:53352) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBrhg-0008E6-5w for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 13:58:09 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M1G00400AY8C000@a-mtaout21.012.net.il> for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 19:26:49 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1G004HRB4O8B70@a-mtaout21.012.net.il>; Sun, 25 Mar 2012 19:26:49 +0200 (IST) Date: Sun, 25 Mar 2012 19:26:49 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F6F15B3.1010302@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83mx74siau.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <87398x19rq.fsf@gnu.org> <4F6F15B3.1010302@gmx.at> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, cyd@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sun, 25 Mar 2012 14:55:15 +0200 > From: martin rudalics > CC: Eli Zaretskii , darthandrus@gmail.com, > 11068@debbugs.gnu.org > > > Hmm, you're right, that is a non-trivial change. The implications of > > that are not obvious to me. Maybe we should delay this for post-24.1 > > then. > > If you delay it, please post the preliminary patch somewhere so I can > use and test it. I will, as soon as I hear the final word. Btw, I already posted a version that "works for me", right here, albeit before implementing Chong's suggestions. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 14:23:39 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 18:23:39 +0000 Received: from localhost ([127.0.0.1]:38507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBs6M-0000NE-J8 for submit@debbugs.gnu.org; Sun, 25 Mar 2012 14:23:39 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:38510) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBs5n-0000MW-5Z for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 14:23:36 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1G00900C3M5Z00@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 19:51:57 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1G0086SCAHJ4E0@a-mtaout22.012.net.il>; Sun, 25 Mar 2012 19:51:55 +0200 (IST) Date: Sun, 25 Mar 2012 19:51:54 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <87398x19rq.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83iphssh51.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <87398x19rq.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Cc: darthandrus@gmail.com, monnier@iro.umontreal.ca, 11068@debbugs.gnu.org > Date: Sun, 25 Mar 2012 14:20:57 +0800 > > Hmm, you're right, that is a non-trivial change. The implications of > that are not obvious to me. Maybe we should delay this for post-24.1 > then. Is that final, or do you want to hear from Stefan, or think about it? From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 15:51:26 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 19:51:26 +0000 Received: from localhost ([127.0.0.1]:38594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBtT4-0003LB-Sp for submit@debbugs.gnu.org; Sun, 25 Mar 2012 15:51:26 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:45857) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBtT0-0003Kv-Lg for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 15:51:08 -0400 Received: (qmail invoked by alias); 25 Mar 2012 19:20:00 -0000 Received: from 62-47-32-198.adsl.highway.telekom.at (EHLO [62.47.32.198]) [62.47.32.198] by mail.gmx.net (mp019) with SMTP; 25 Mar 2012 21:20:00 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19Wd5ZcP8FWR/McFe2avI054kZm+/R9sBpxgJ+ehN zCJ8hQnOPk5udu Message-ID: <4F6F6FDA.2020307@gmx.at> Date: Sun, 25 Mar 2012 21:19:54 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <4F6F159D.4050709@gmx.at> <83obrksid0.fsf@gnu.org> In-Reply-To: <83obrksid0.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, cyd@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> Are you taking into account the example from my other mail? What does >> the display engine use at the right side of L2R glyph rows? > > Normally, nothing. If the face of the last character of a line has > the same background as the default face and no stipple, there are no > stretch glyphs at the right side. I obviously meant the case where it has a different background from the default face. But I can't follow you anyway because in my experience it's the return character that counts and not the last character on the line. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 15:51:27 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 19:51:27 +0000 Received: from localhost ([127.0.0.1]:38597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBtTK-0003Lb-Ix for submit@debbugs.gnu.org; Sun, 25 Mar 2012 15:51:27 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:55985) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBtSp-0003KO-5k for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 15:51:10 -0400 Received: (qmail invoked by alias); 25 Mar 2012 19:19:48 -0000 Received: from 62-47-32-198.adsl.highway.telekom.at (EHLO [62.47.32.198]) [62.47.32.198] by mail.gmx.net (mp069) with SMTP; 25 Mar 2012 21:19:48 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19x+dcHw+hxQfegb6ZLx3hwAQSQCUqmg7Hbqa1TD8 7jcJGvIaUyjuo8 Message-ID: <4F6F6FCF.30806@gmx.at> Date: Sun, 25 Mar 2012 21:19:43 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> In-Reply-To: <83r4wgsii6.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Correct. But only for lines that end before EOB. The line that ends > _at_ EOB and all the subsequent lines don't have this stretch glyph. > The changes I did introduce such stretch glyphs for _all_ lines in the > window than don't already have them. So you do use an established mechanism but for the fact that these lines exist only virtually. Or am I missing something? >> And it takes the face property not from the return character but >> from the remapped default face. > > No, the return character has no face, But when drawing the stretch glyph at a non-EOB line end the display engine does use the face of the return character. In my `font-lock-fontify-syntactically-region' function I strip all face properties from the return character and the rest of the line has the default background. > and in fact it has no glyphs. > The original code would reset the face to the (un-remapped) default > face when it hits the line at EOB, and would not draw past EOB at all, > instead relying on the display-specific code that clears the rest of > the window with the default color. Couldn't we "clear" using the remapped default color as well? Does "clearing" care about character heights, for example? >> As an aside I earlier tried to achieve the effect of your patch by >> adding an overlay with an after-string containing an appropriate number >> of return characters to the last character of each buffer. It didn't >> work and I still consider that a bug. > > If you show me the code, I will see if it's a bug or something else. If you do, for example, (let ((overlay (make-overlay (point-max) (point-max)))) (overlay-put overlay 'after-string "\n\n\n\n")) you can't move to the position before the overlay which makes the whole thing worthless. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 15:51:28 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 19:51:28 +0000 Received: from localhost ([127.0.0.1]:38599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBtTL-0003Le-Em for submit@debbugs.gnu.org; Sun, 25 Mar 2012 15:51:28 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:35344) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBtT4-0003L5-MX for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 15:51:16 -0400 Received: (qmail invoked by alias); 25 Mar 2012 19:20:04 -0000 Received: from 62-47-32-198.adsl.highway.telekom.at (EHLO [62.47.32.198]) [62.47.32.198] by mail.gmx.net (mp020) with SMTP; 25 Mar 2012 21:20:04 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19NoSBOE7RNSVrMr7AjOteNoEFOmugbHHxsmCRX0J 5toNF7fFeRDs8o Message-ID: <4F6F6FE3.7020604@gmx.at> Date: Sun, 25 Mar 2012 21:20:03 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <87398x19rq.fsf@gnu.org> <4F6F15B3.1010302@gmx.at> <83mx74siau.fsf@gnu.org> In-Reply-To: <83mx74siau.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, cyd@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > I will, as soon as I hear the final word. Btw, I already posted a > version that "works for me", right here, albeit before implementing > Chong's suggestions. I'm using that already and it works for me here too. But I meant the version incorporating Chong's suggestions. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 16:25:02 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 20:25:02 +0000 Received: from localhost ([127.0.0.1]:38618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBtzq-00049H-8U for submit@debbugs.gnu.org; Sun, 25 Mar 2012 16:25:02 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:30344) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBtzI-00048H-3d for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 16:25:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9FpYqr/2dsb2JhbACBX5x7eacJhhkEmxmECQ X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="170030582" Received: from 69-165-138-171.dsl.teksavvy.com (HELO pastel.home) ([69.165.138.171]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Mar 2012 15:53:21 -0400 Received: by pastel.home (Postfix, from userid 20848) id 61BC958F52; Sun, 25 Mar 2012 15:53:21 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window Message-ID: References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> Date: Sun, 25 Mar 2012 15:53:21 -0400 In-Reply-To: <4F6F6FCF.30806@gmx.at> (martin rudalics's message of "Sun, 25 Mar 2012 21:19:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, Eli Zaretskii , 11068@debbugs.gnu.org, cyd@stupidchicken.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > (let ((overlay (make-overlay (point-max) (point-max)))) > (overlay-put overlay 'after-string "\n\n\n\n")) Nitpick, you want (make-overlay (point-max) (point-max) nil t t) if you want to create an overlay "at EOB" rather than "right after the char which is currently at (point-max)". Cursor positioning should be sensitive to these kinds of stickiness details, although IIRC it currently isn't. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 17:16:14 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 21:16:14 +0000 Received: from localhost ([127.0.0.1]:38647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBunN-0005N4-3C for submit@debbugs.gnu.org; Sun, 25 Mar 2012 17:16:14 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:34105) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SBumn-0005M7-SN for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 17:16:11 -0400 Received: (qmail invoked by alias); 25 Mar 2012 20:44:30 -0000 Received: from 62-47-54-122.adsl.highway.telekom.at (EHLO [62.47.54.122]) [62.47.54.122] by mail.gmx.net (mp038) with SMTP; 25 Mar 2012 22:44:30 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+Grecy5QmGAfLaItVNWZK2BcYLVemSg8yqnHnFCP DY0lvWxEIjhhYT Message-ID: <4F6F83AB.4090204@gmx.at> Date: Sun, 25 Mar 2012 22:44:27 +0200 From: martin rudalics MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, Eli Zaretskii , 11068@debbugs.gnu.org, cyd@stupidchicken.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Nitpick, you want (make-overlay (point-max) (point-max) nil t t) if you > want to create an overlay "at EOB" rather than "right after the char > which is currently at (point-max)". In my use case I always deleted the overlay before redisplay and recreated it anew to account for possible changes in window height. > Cursor positioning should be > sensitive to these kinds of stickiness details, although IIRC it > currently isn't. Unfortunately it isn't. I then played with all sorts of 'display 'before-string properties, arguments, and whatever I could apply (some ten years ago). martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 18:21:18 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 22:21:18 +0000 Received: from localhost ([127.0.0.1]:38684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBvoL-0006qO-DW for submit@debbugs.gnu.org; Sun, 25 Mar 2012 18:21:18 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:43925) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBvnn-0006pO-Io for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 18:21:16 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1G00A00LRSUV00@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 23:49:35 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1G009LANAMXAK0@a-mtaout22.012.net.il>; Sun, 25 Mar 2012 23:49:35 +0200 (IST) Date: Sun, 25 Mar 2012 23:49:35 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F6F6FCF.30806@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <837gy8s64w.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sun, 25 Mar 2012 21:19:43 +0200 > From: martin rudalics > CC: darthandrus@gmail.com, monnier@iro.umontreal.ca, > cyd@stupidchicken.com, 11068@debbugs.gnu.org > > > Correct. But only for lines that end before EOB. The line that ends > > _at_ EOB and all the subsequent lines don't have this stretch glyph. > > The changes I did introduce such stretch glyphs for _all_ lines in the > > window than don't already have them. > > So you do use an established mechanism but for the fact that these lines > exist only virtually. Or am I missing something? I don't understand what you mean by "exist only virtually". We are not talking about lines, we are talking about glyph matrices. A glyph matrix has at least one glyph for each screen line, no matter if there is or isn't text on these lines; this includes empty lines beyond BOB. The established mechanism I used was invented for extending the (non-default) face of the last character of a line all the way to the right margin of the window. I made it do double duty for R2L lines, because these need a stretch glyph at their left, so that the device-specific drawing code could still draw left to right. Then I made it do triple duty when the default face is remapped, by adding stretch glyphs even on L2R lines beyond EOB. All it took was to slightly tweak the conditions under which the function extend_face_to_end_of_line is called, and what it does as part of its job. > >> And it takes the face property not from the return character but > >> from the remapped default face. > > > > No, the return character has no face, > > But when drawing the stretch glyph at a non-EOB line end the display > engine does use the face of the return character. Not the face of the return character, but the face of the last glyph produced for the line. > In my `font-lock-fontify-syntactically-region' function I strip all > face properties from the return character and the rest of the line > has the default background. What that does is force redisplay to change the face at the line boundary. Normally, the last face used on the line is also used for the first glyph of the next line. The face of the newline itself has no direct relation to this. > Couldn't we "clear" using the remapped default color as well? That's possible, but it's a much worse design, IMO, because it would mean this needs to be implemented N times, one each for every terminal type we support (TTY, X, w32, ns). Worse, there's this: > Does "clearing" care about character heights, for example? No. It also cannot support faces with a stipple. So this design isn't really up to the job at all. > If you do, for example, > > (let ((overlay (make-overlay (point-max) (point-max)))) > (overlay-put overlay 'after-string "\n\n\n\n")) > > you can't move to the position before the overlay which makes the whole > thing worthless. Try putting a `cursor' text property on the first newline of the string, and if that doesn't work, I might agree it's a bug. Otherwise, Emacs always puts the cursor after the overlay string. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 18:22:13 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 22:22:13 +0000 Received: from localhost ([127.0.0.1]:38688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBvpA-0006rp-JV for submit@debbugs.gnu.org; Sun, 25 Mar 2012 18:22:13 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:64757) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBvp7-0006re-EN for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 18:22:07 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M1G00100NA9GT00@a-mtaout23.012.net.il> for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 23:50:52 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1G001NNNCRA7C0@a-mtaout23.012.net.il>; Sun, 25 Mar 2012 23:50:52 +0200 (IST) Date: Sun, 25 Mar 2012 23:50:53 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F6F6FDA.2020307@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <8362dss62q.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <4F6F159D.4050709@gmx.at> <83obrksid0.fsf@gnu.org> <4F6F6FDA.2020307@gmx.at> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, cyd@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sun, 25 Mar 2012 21:19:54 +0200 > From: martin rudalics > CC: cyd@gnu.org, darthandrus@gmail.com, 11068@debbugs.gnu.org > > I can't follow you anyway because in my experience it's the return > character that counts and not the last character on the line. The return character isn't drawn, so it cannot count. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 18:25:09 2012 Received: (at 11068) by debbugs.gnu.org; 25 Mar 2012 22:25:09 +0000 Received: from localhost ([127.0.0.1]:38704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBvs5-0006wT-2l for submit@debbugs.gnu.org; Sun, 25 Mar 2012 18:25:09 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:44989) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBvs3-0006wN-H5 for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 18:25:07 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1G00B00NBJ3000@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Sun, 25 Mar 2012 23:54:00 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1G00ATTNHY9SF0@a-mtaout22.012.net.il>; Sun, 25 Mar 2012 23:53:59 +0200 (IST) Date: Sun, 25 Mar 2012 23:53:59 +0200 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <837gy8s64w.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: rudalics@gmx.at Message-id: <834ntcs5xk.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sun, 25 Mar 2012 23:49:35 +0200 > From: Eli Zaretskii > Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org > > A glyph matrix has at least one glyph for each screen line, no > matter if there is or isn't text on these lines; this includes empty > lines beyond BOB. Sorry, this part was wrong. Empty L2R lines beyond EOB don't have any glyphs at all. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 26 00:47:43 2012 Received: (at 11068) by debbugs.gnu.org; 26 Mar 2012 04:47:44 +0000 Received: from localhost ([127.0.0.1]:38900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SC1qJ-0008GG-BR for submit@debbugs.gnu.org; Mon, 26 Mar 2012 00:47:43 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42767) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SC1qH-0008G9-AV for 11068@debbugs.gnu.org; Mon, 26 Mar 2012 00:47:42 -0400 Received: from bb121-7-229-226.singnet.com.sg ([121.7.229.226]:35249 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SC1M7-0008Nr-5D; Mon, 26 Mar 2012 00:16:31 -0400 From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <87398x19rq.fsf@gnu.org> <83iphssh51.fsf@gnu.org> Date: Mon, 26 Mar 2012 12:16:23 +0800 In-Reply-To: <83iphssh51.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 25 Mar 2012 19:51:54 +0200") Message-ID: <87mx74xai0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Eli Zaretskii writes: > Is that final, or do you want to hear from Stefan, or think about it? I've thought about it, and after staring at the code I'm pretty sure it does the right thing. If the extra glyphs break anything, we have a regression bug on our hands for R2L lines anyway. So I'll vouch for the change. Please go ahead and commit the fixed patch ASAP. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 26 03:37:15 2012 Received: (at 11068) by debbugs.gnu.org; 26 Mar 2012 07:37:15 +0000 Received: from localhost ([127.0.0.1]:39031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SC4UM-0004r9-CY for submit@debbugs.gnu.org; Mon, 26 Mar 2012 03:37:15 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:60526) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SC4U5-0004qT-4r for 11068@debbugs.gnu.org; Mon, 26 Mar 2012 03:37:12 -0400 Received: (qmail invoked by alias); 26 Mar 2012 07:05:47 -0000 Received: from 62-47-37-221.adsl.highway.telekom.at (EHLO [62.47.37.221]) [62.47.37.221] by mail.gmx.net (mp039) with SMTP; 26 Mar 2012 09:05:47 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+FZoRD5kmFBlb0Nim4Cy/QynIdKEySvbqqCb1FaY 30DYKtyT43E9mb Message-ID: <4F701547.6070003@gmx.at> Date: Mon, 26 Mar 2012 09:05:43 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> In-Reply-To: <837gy8s64w.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> So you do use an established mechanism but for the fact that these lines >> exist only virtually. Or am I missing something? > > I don't understand what you mean by "exist only virtually". We are > not talking about lines, we are talking about glyph matrices. A glyph > matrix has at least one glyph for each screen line, no matter if there > is or isn't text on these lines; this includes empty lines beyond BOB. With "virtual" I tried to describe the presence of a (space) character on the screen which has no correspondence to a "real" character in a buffer. > The established mechanism I used was invented for extending the > (non-default) face of the last character of a line all the way to the > right margin of the window. I made it do double duty for R2L lines, > because these need a stretch glyph at their left, so that the > device-specific drawing code could still draw left to right. Then I > made it do triple duty when the default face is remapped, by adding > stretch glyphs even on L2R lines beyond EOB. All it took was to > slightly tweak the conditions under which the function > extend_face_to_end_of_line is called, and what it does as part of its > job. That's what I thought. Thanks for the precise explanation. >> But when drawing the stretch glyph at a non-EOB line end the display >> engine does use the face of the return character. > > Not the face of the return character, but the face of the last glyph > produced for the line. I still can't follow you. For years I use: (defun font-lock-fontify-syntactically-region (start end &optional loudly ppss) "Put proper face on each string and comment between START and END. START should be at the beginning of a line." (let (state face from to lep) (goto-char start) (setq state (or ppss (syntax-ppss start))) (while (progn (when (or (nth 3 state) (nth 4 state)) (setq face (funcall font-lock-syntactic-face-function state)) (setq from (max (nth 8 state) start)) (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table)) (setq to (point)) (save-excursion (goto-char from) (while (< from to) (setq lep (line-end-position)) (if (< lep to) (progn (put-text-property from lep 'face face) (remove-text-properties lep (1+ lep) '(face nil)) ; rear-nonsticky t)) (goto-char (setq from (1+ lep)))) (put-text-property from to 'face face) (setq from to))))) (< (point) end)) (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table))))) (custom-set-faces '(font-lock-comment-face ((((class color) (background light)) (:background "Beige" :foreground "Black")))) '(font-lock-string-face ((t (:foreground "green4")))) '(font-lock-doc-face ((t (:inherit font-lock-string-face :background "grey96"))))) Evaluate these in *scratch* with emacs -Q and redraw. You will see that the background of comments and doc-strings does _not_ extend to the right window margin although the last character on each comment or doc-string line _does_ have that background. Now what constitutes "the last glyph produced" for such a line? That of the last visible character on the buffer line? >> In my `font-lock-fontify-syntactically-region' function I strip all >> face properties from the return character and the rest of the line >> has the default background. > > What that does is force redisplay to change the face at the line > boundary. Normally, the last face used on the line is also used for > the first glyph of the next line. The face of the newline itself has > no direct relation to this. But as you see from my code above, all I do is change the face of the newline character. The faces before and after it remain unchanged. You can easily verify for yourself in a not font-locked buffer: Change the background of one newline character only and the value you specifiy there will be used for drawing the space between the last visible character on the line and the right window margin and for nothing else. >> Couldn't we "clear" using the remapped default color as well? > > That's possible, but it's a much worse design, IMO, because it would > mean this needs to be implemented N times, one each for every terminal > type we support (TTY, X, w32, ns). Worse, there's this: > >> Does "clearing" care about character heights, for example? > > No. It also cannot support faces with a stipple. So this design > isn't really up to the job at all. Aha. This clears things up for me. >> If you do, for example, >> >> (let ((overlay (make-overlay (point-max) (point-max)))) >> (overlay-put overlay 'after-string "\n\n\n\n")) >> >> you can't move to the position before the overlay which makes the whole >> thing worthless. > > Try putting a `cursor' text property on the first newline of the > string, and if that doesn't work, I might agree it's a bug. > Otherwise, Emacs always puts the cursor after the overlay string. Thanks, that works. Now if only this had been described in the overlays manual section ... martin From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 26 16:04:38 2012 Received: (at 11068) by debbugs.gnu.org; 26 Mar 2012 20:04:38 +0000 Received: from localhost ([127.0.0.1]:40058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCG9I-0000dS-ST for submit@debbugs.gnu.org; Mon, 26 Mar 2012 16:04:37 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:60748) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCG8j-0000cT-Qq for 11068@debbugs.gnu.org; Mon, 26 Mar 2012 16:04:15 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SCFeV-0004V4-HX; Mon, 26 Mar 2012 15:32:27 -0400 Date: Mon, 26 Mar 2012 15:32:27 -0400 Message-Id: From: Eli Zaretskii To: martin rudalics In-reply-to: <4F701547.6070003@gmx.at> (message from martin rudalics on Mon, 26 Mar 2012 09:05:43 +0200) Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > Date: Mon, 26 Mar 2012 09:05:43 +0200 > From: martin rudalics > CC: darthandrus@gmail.com, monnier@iro.umontreal.ca, > cyd@stupidchicken.com, 11068@debbugs.gnu.org > > >> So you do use an established mechanism but for the fact that these lines > >> exist only virtually. Or am I missing something? > > > > I don't understand what you mean by "exist only virtually". We are > > not talking about lines, we are talking about glyph matrices. A glyph > > matrix has at least one glyph for each screen line, no matter if there > > is or isn't text on these lines; this includes empty lines beyond BOB. > > With "virtual" I tried to describe the presence of a (space) character > on the screen which has no correspondence to a "real" character in a > buffer. Well, strictly speaking, it's a space only on a TTY. On GUI terminals, it's a special glyph that just looks like a space. > Evaluate these in *scratch* with emacs -Q and redraw. You will see that > the background of comments and doc-strings does _not_ extend to the > right window margin although the last character on each comment or > doc-string line _does_ have that background. Now what constitutes "the > last glyph produced" for such a line? That of the last visible > character on the buffer line? The point I'm stubbornly trying to make is that what matters for the face extension is the last face loaded by the display iterator, _not_ the face of the newline or any other character. The display iterator changes faces at so-called "stop positions", where buffer contents of text properties or overlays specify a different face. Once a face is resolved and loaded, it stays recorded in the iterator and affects every glyph we deliver until another "stop position" is encountered. Your code simply forces the display iterator to switch faces after the last character of a line. That's it. The newline doesn't enter this game at any point, because it is never drawn. IOW, what's important is the _position_ where the new face gets in effect, not what character it is on. > >> (let ((overlay (make-overlay (point-max) (point-max)))) > >> (overlay-put overlay 'after-string "\n\n\n\n")) > >> > >> you can't move to the position before the overlay which makes the whole > >> thing worthless. > > > > Try putting a `cursor' text property on the first newline of the > > string, and if that doesn't work, I might agree it's a bug. > > Otherwise, Emacs always puts the cursor after the overlay string. > > Thanks, that works. Now if only this had been described in the overlays > manual section ... This _is_ described, but not in the section about overlays, because `cursor' is a text property you should put on `display' property strings or on overlay strings. So this is described in "Special Properties", and the description does mention overlay strings. Maybe an index entry should be added that starts with "overlay"; perhaps you could suggest such an entry. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 26 16:07:06 2012 Received: (at 11068) by debbugs.gnu.org; 26 Mar 2012 20:07:06 +0000 Received: from localhost ([127.0.0.1]:40062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCGC2-0000hd-AT for submit@debbugs.gnu.org; Mon, 26 Mar 2012 16:07:06 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:60787) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCGC0-0000hW-EP for 11068@debbugs.gnu.org; Mon, 26 Mar 2012 16:07:05 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SCFhn-0004gz-5l; Mon, 26 Mar 2012 15:35:51 -0400 Date: Mon, 26 Mar 2012 15:35:51 -0400 Message-Id: From: Eli Zaretskii To: Chong Yidong In-reply-to: <87mx74xai0.fsf@gnu.org> (message from Chong Yidong on Mon, 26 Mar 2012 12:16:23 +0800) Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <87398x19rq.fsf@gnu.org> <83iphssh51.fsf@gnu.org> <87mx74xai0.fsf@gnu.org> X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > From: Chong Yidong > Cc: darthandrus@gmail.com, monnier@iro.umontreal.ca, 11068@debbugs.gnu.org > Date: Mon, 26 Mar 2012 12:16:23 +0800 > > Eli Zaretskii writes: > > > Is that final, or do you want to hear from Stefan, or think about it? > > I've thought about it, and after staring at the code I'm pretty sure it > does the right thing. If the extra glyphs break anything, we have a > regression bug on our hands for R2L lines anyway. So I'll vouch for the > change. Please go ahead and commit the fixed patch ASAP. OK. "ASAP" will happen in a couple of days in this case: my main development machine just died, after 7 years of continuous service, and the heir is expected the day after tomorrow. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 27 05:55:08 2012 Received: (at 11068) by debbugs.gnu.org; 27 Mar 2012 09:55:08 +0000 Received: from localhost ([127.0.0.1]:40681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCT7L-0007Eg-2L for submit@debbugs.gnu.org; Tue, 27 Mar 2012 05:55:08 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:59073) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SCT74-0007E1-Jb for 11068@debbugs.gnu.org; Tue, 27 Mar 2012 05:55:05 -0400 Received: (qmail invoked by alias); 27 Mar 2012 09:23:34 -0000 Received: from 62-47-41-51.adsl.highway.telekom.at (EHLO [62.47.41.51]) [62.47.41.51] by mail.gmx.net (mp036) with SMTP; 27 Mar 2012 11:23:34 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX186bzI4bdI6J87RtSSMUbjcOtrXdkIdpiGO15kmaD KYpJMPmVe6mFk3 Message-ID: <4F718710.4040203@gmx.at> Date: Tue, 27 Mar 2012 11:23:28 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > The point I'm stubbornly trying to make is that what matters for the > face extension is the last face loaded by the display iterator, _not_ > the face of the newline or any other character. The display iterator > changes faces at so-called "stop positions", where buffer contents of > text properties or overlays specify a different face. Once a face is > resolved and loaded, it stays recorded in the iterator and affects > every glyph we deliver until another "stop position" is encountered. Earlier you said "No, the return character has no face, and in fact it has no glyphs." and I stubbornly believe that it has a face I can specify, that face has an effect on what I see on the screen and apparently even produces a stretch glyph I can see. But obviously the display engine has its own mechanism for translating face specifications and our different POVs get lost in that translation. > Your code simply forces the display iterator to switch faces after the > last character of a line. That's it. The newline doesn't enter this > game at any point, because it is never drawn. IOW, what's important > is the _position_ where the new face gets in effect, not what > character it is on. Fully agreed. But since I switch faces back immediately _after_ the newline character it does not affect visible characters but only what appears between them. > This _is_ described, but not in the section about overlays, because > `cursor' is a text property you should put on `display' property > strings or on overlay strings. So this is described in "Special > Properties", and the description does mention overlay strings. I read that already but apparently missed it on previous readings. > Maybe > an index entry should be added that starts with "overlay"; perhaps you > could suggest such an entry. I'm afraid that wouldn't help much. Maybe a separate special properties table based on an alphabetic listing of property names, a reference to where the property is described in detail, and whether it affects text, overlays or both would help. But some part of the text is IMO confusing: In "Normally, the cursor is displayed at the end of any overlay and text property strings present at the current buffer position." I understand that an "overlay string" is a before- or after-string or a display property string. But what is a "text property string"? A display property of the text? Also "it specifies the number of buffer's character positions associated with the overlay string" clashes with my understanding that this number is already specified by the start and end position of the overlay. And "this way, Emacs will display the cursor on the character with that property regardless of whether the current buffer position is actually covered by the overlay." doesn't make it clearer for me because what is "the character with that property" and what is "the current buffer position" here? I tried to play around with it but don't see what this means for an overlay with a display, before- or after-string property. So the fact that overlays with such a property are affected by the `cursor' property remains obscure to me after reading this text. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 27 15:12:19 2012 Received: (at 11068) by debbugs.gnu.org; 27 Mar 2012 19:12:19 +0000 Received: from localhost ([127.0.0.1]:41595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCboW-00058a-OL for submit@debbugs.gnu.org; Tue, 27 Mar 2012 15:12:18 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:57635) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCbnx-00057W-8D for 11068@debbugs.gnu.org; Tue, 27 Mar 2012 15:12:15 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SCbJe-0003vP-7I; Tue, 27 Mar 2012 14:40:22 -0400 Date: Tue, 27 Mar 2012 14:40:22 -0400 Message-Id: From: Eli Zaretskii To: martin rudalics In-reply-to: <4F718710.4040203@gmx.at> (message from martin rudalics on Tue, 27 Mar 2012 11:23:28 +0200) Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> <4F718710.4040203@gmx.at> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > Date: Tue, 27 Mar 2012 11:23:28 +0200 > From: martin rudalics > CC: darthandrus@gmail.com, monnier@iro.umontreal.ca, > cyd@stupidchicken.com, 11068@debbugs.gnu.org > > Earlier you said > > "No, the return character has no face, and in fact it has no glyphs." > > and I stubbornly believe that it has a face I can specify, that face has > an effect on what I see on the screen and apparently even produces a > stretch glyph I can see. That's my sloppy wording, sorry. I meant to say that a newline has no face _on_display_, because it simply isn't displayed. It certainly has a face _in_the_buffer_, which I believe is what you mean. > > Your code simply forces the display iterator to switch faces after the > > last character of a line. That's it. The newline doesn't enter this > > game at any point, because it is never drawn. IOW, what's important > > is the _position_ where the new face gets in effect, not what > > character it is on. > > Fully agreed. But since I switch faces back immediately _after_ the > newline character it does not affect visible characters but only what > appears between them. Right. > But some part of the text is IMO confusing: In > > "Normally, the cursor is displayed at the end of any overlay and > text property strings present at the current buffer position." > > I understand that an "overlay string" is a before- or after-string or a > display property string. But what is a "text property string"? A > display property of the text? Yes, a `display' text property on buffer text. > "it specifies the number of buffer's > character positions associated with the overlay string" > > clashes with my understanding that this number is already specified by > the start and end position of the overlay. That's because you think that the code which positions the cursor has the overlay in hand to get this information. But that assumption is false: the code in question, which needs this property on overlay strings (set_cursor_from_row) doesn't know what overlay produced the glyphs in the glyph rows it considers as candidates for cursor positioning. All it has is the glyphs, whereby each glyph includes a reference to the object from which it came. For glyphs that came from an overlay string, that object is the string, but the information about the overlay where the string came from is lost. By putting the integer property on the string itself, you allow the cursor-positioning code to find out how many buffer positions are covered by the overlay string, without knowing what overlay is that. > "this way, > Emacs will display the cursor on the character with that property > regardless of whether the current buffer position is actually > covered by the overlay." > > doesn't make it clearer for me because what is "the character with that > property" and what is "the current buffer position" here? "the character" is the one from the overlay string on which you put the `cursor' property; "current buffer position" is point (which normally determines where to display the cursor). > I tried to play around with it but don't see what this means for an > overlay with a display, before- or after-string property. So the > fact that overlays with such a property are affected by the `cursor' > property remains obscure to me after reading this text. It's a hard issue to explain, and I obviously failed. You can see this feature in action in cua-rectangle; after you play with it, perhaps you could suggest how to improve the documentation. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 04:06:57 2012 Received: (at 11068) by debbugs.gnu.org; 30 Mar 2012 08:06:57 +0000 Received: from localhost ([127.0.0.1]:45922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDWrI-0001M6-Ie for submit@debbugs.gnu.org; Fri, 30 Mar 2012 04:06:57 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:34909) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SDWrG-0001Lz-Jr for 11068@debbugs.gnu.org; Fri, 30 Mar 2012 04:06:55 -0400 Received: (qmail invoked by alias); 30 Mar 2012 07:35:22 -0000 Received: from 62-47-46-219.adsl.highway.telekom.at (EHLO [62.47.46.219]) [62.47.46.219] by mail.gmx.net (mp031) with SMTP; 30 Mar 2012 09:35:22 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX193M0M84TJ3/yQlj8OJ2/y30YN07sbvisqD1K/OI8 J7HuoqJ/evZW1I Message-ID: <4F756238.1080004@gmx.at> Date: Fri, 30 Mar 2012 09:35:20 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> <4F718710.4040203@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > ... By putting the > integer property on the string itself, you allow the > cursor-positioning code to find out how many buffer positions are > covered by the overlay string, without knowing what overlay is that. > >> "this way, >> Emacs will display the cursor on the character with that property >> regardless of whether the current buffer position is actually >> covered by the overlay." >> >> doesn't make it clearer for me because what is "the character with that >> property" and what is "the current buffer position" here? > > "the character" is the one from the overlay string on which you put > the `cursor' property; "current buffer position" is point (which > normally determines where to display the cursor). I still don't get it. Suppose I have the following code in a buffer, no spaces before the first visible character, one newline after the last: (defvar my-overlay nil) (defvar my-string nil) (progn (when (overlayp my-overlay) (delete-overlay my-overlay)) (setq my-overlay (make-overlay 0 0)) (setq my-string (propertize " " 'face 'lazy-highlight 'cursor 1)) (overlay-put my-overlay 'display my-string) (move-overlay my-overlay (- (point-max) 1) (point-max))) Evaluating this and moving `point' between buffer positions 336 and 337 oscillates the cursor around the overlay. If I instead use the line (propertize " " 'face 'lazy-highlight 'cursor 2)) in the above and reevaluate, moving `point' doesn't oscillate the cursor any more. But if I additionally replace the last line as (move-overlay my-overlay (- (point-max) 2) (point-max))) the cursor oscillates again (but now between positions 335 and 337). I find the behavior good but am too silly to understand what's going on. What do I really specify when I write a form like (propertize " " 'face 'lazy-highlight 'cursor 1)) Apparently the "1" doesn't refer to a position within the " " but to some position within the buffer from (- (point-max) 1) (point-max)) where that string is eventually placed by the overlay movement. So apparently that specification neither serves to (1) move the cursor visually to some position within the string (it always remains before or after it), nor to (2) move `point' to some position within the buffer (it's always at the start and end positions of the overlay). But what does it do? > You can see > this feature in action in cua-rectangle; after you play with it, > perhaps you could suggest how to improve the documentation. IIUC in the Emacs sources the 'cursor property is never used in connection with overlays. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 04:50:48 2012 Received: (at 11068) by debbugs.gnu.org; 30 Mar 2012 08:50:48 +0000 Received: from localhost ([127.0.0.1]:45964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDXXj-0002OZ-NH for submit@debbugs.gnu.org; Fri, 30 Mar 2012 04:50:48 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:54629) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDXXh-0002OR-EI for 11068@debbugs.gnu.org; Fri, 30 Mar 2012 04:50:46 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M1O00100UN5P700@a-mtaout23.012.net.il> for 11068@debbugs.gnu.org; Fri, 30 Mar 2012 11:19:06 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.100.223]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1O0016HV3NJJD0@a-mtaout23.012.net.il>; Fri, 30 Mar 2012 11:19:01 +0300 (IDT) Date: Fri, 30 Mar 2012 11:18:59 +0300 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F756238.1080004@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83aa2y1oy4.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> <4F718710.4040203@gmx.at> <4F756238.1080004@gmx.at> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Date: Fri, 30 Mar 2012 09:35:20 +0200 > From: martin rudalics > CC: darthandrus@gmail.com, monnier@iro.umontreal.ca, > cyd@stupidchicken.com, 11068@debbugs.gnu.org > > (defvar my-overlay nil) > (defvar my-string nil) > > (progn > (when (overlayp my-overlay) > (delete-overlay my-overlay)) > (setq my-overlay (make-overlay 0 0)) > (setq my-string > (propertize " " 'face 'lazy-highlight 'cursor 1)) What are you trying to accomplish by putting the `cursor' property on more than a single character of the overlay string? The display engine doesn't expect it to be on more than one character in the overlay string (it will put the cursor on the first and ignore the rest). > Evaluating this and moving `point' between buffer positions 336 and 337 > oscillates the cursor around the overlay. If I instead use the line > > (propertize " " 'face 'lazy-highlight 'cursor 2)) > > in the above and reevaluate, moving `point' doesn't oscillate the cursor > any more. But if I additionally replace the last line as > > (move-overlay my-overlay (- (point-max) 2) (point-max))) > > the cursor oscillates again (but now between positions 335 and 337). > > I find the behavior good but am too silly to understand what's going on. > What do I really specify when I write a form like > > (propertize " " 'face 'lazy-highlight 'cursor 1)) > > Apparently the "1" doesn't refer to a position within the " " but > to some position within the buffer from (- (point-max) 1) (point-max)) > where that string is eventually placed by the overlay movement. The string character on which you put the `cursor' property of any non-nil value is the character where you want the cursor displayed. The value says for which buffer positions to display the cursor there. If the value is an integer number, the cursor is displayed there when the buffer position is between N and N + n, where n is the value of the property and N is the overlay-start position. If the value is anything else and non-nil, the cursor is displayed there only when point is at overlay-start. > > this feature in action in cua-rectangle; after you play with it, > > perhaps you could suggest how to improve the documentation. > > IIUC in the Emacs sources the 'cursor property is never used in > connection with overlays. ??? I clearly see it in this snippet from cua-rect.el: (if (cua--rectangle-right-side) (put-text-property (1- (length ms)) (length ms) 'cursor 2 ms) <<<<<<<<<<< (put-text-property 0 1 'cursor 2 ms)) <<<<<<<<<<<<< (setq bs (concat bs ms)) <<<<<<<<<<<<<<<< (setq rface nil)) (t (setq as (propertize (make-string (- r cr0 (if (= le pr) 1 0)) (if cua--virtual-edges-debug ?~ ?\s)) 'face rface)) (if (cua--rectangle-right-side) (put-text-property (1- (length as)) (length as) 'cursor 2 as) <<<<<<<<<<< (put-text-property 0 1 'cursor 2 as)) <<<<<<<<<<<<< (if (/= pr le) (setq e (1- e)))))))) ;; Trim old leading overlays. (while (and old (setq overlay (car old)) (< (overlay-start overlay) s) (/= (overlay-end overlay) e)) (delete-overlay overlay) (setq old (cdr old))) ;; Reuse an overlay if possible, otherwise create one. (if (and old (setq overlay (car old)) (or (= (overlay-start overlay) s) (= (overlay-end overlay) e))) (progn (move-overlay overlay s e) (setq old (cdr old))) (setq overlay (make-overlay s e))) (overlay-put overlay 'before-string bs) <<<<<<<<<<<<<<< (overlay-put overlay 'after-string as) <<<<<<<<<<<<<<< In general, this feature was invented (By Kim Storm) specifically for his cua-rect wizardry. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 05:21:42 2012 Received: (at 11068-done) by debbugs.gnu.org; 30 Mar 2012 09:21:42 +0000 Received: from localhost ([127.0.0.1]:46045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDY1e-0003Cp-Ho for submit@debbugs.gnu.org; Fri, 30 Mar 2012 05:21:42 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:44990) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDY1c-0003Ch-Pa for 11068-done@debbugs.gnu.org; Fri, 30 Mar 2012 05:21:41 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M1O00500W852U00@a-mtaout21.012.net.il> for 11068-done@debbugs.gnu.org; Fri, 30 Mar 2012 11:49:46 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.100.223]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1O0040MWISSUL0@a-mtaout21.012.net.il>; Fri, 30 Mar 2012 11:49:41 +0300 (IDT) Date: Fri, 30 Mar 2012 11:49:40 +0300 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <87mx74xai0.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <838vii1niz.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <87ty1ekrqy.fsf@gnu.org> <83ehsit63e.fsf@gnu.org> <87mx75z8n6.fsf@gnu.org> <83ty1ds4ye.fsf@gnu.org> <87398x19rq.fsf@gnu.org> <83iphssh51.fsf@gnu.org> <87mx74xai0.fsf@gnu.org> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068-done Cc: darthandrus@gmail.com, monnier@iro.umontreal.ca, 11068-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > From: Chong Yidong > Cc: darthandrus@gmail.com, monnier@iro.umontreal.ca, 11068@debbugs.gnu.org > Date: Mon, 26 Mar 2012 12:16:23 +0800 > > Eli Zaretskii writes: > > > Is that final, or do you want to hear from Stefan, or think about it? > > I've thought about it, and after staring at the code I'm pretty sure it > does the right thing. If the extra glyphs break anything, we have a > regression bug on our hands for R2L lines anyway. So I'll vouch for the > change. Please go ahead and commit the fixed patch ASAP. Done. I'm now closing this bug. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 06:46:26 2012 Received: (at 11068) by debbugs.gnu.org; 30 Mar 2012 10:46:26 +0000 Received: from localhost ([127.0.0.1]:46117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDZLe-0005KY-8s for submit@debbugs.gnu.org; Fri, 30 Mar 2012 06:46:26 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:37302) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SDZL8-0005JQ-H6 for 11068@debbugs.gnu.org; Fri, 30 Mar 2012 06:45:55 -0400 Received: (qmail invoked by alias); 30 Mar 2012 10:14:21 -0000 Received: from 62-47-46-219.adsl.highway.telekom.at (EHLO [62.47.46.219]) [62.47.46.219] by mail.gmx.net (mp010) with SMTP; 30 Mar 2012 12:14:21 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+lrAZAQL+lzI42BuzsJQfiWvfHhVGQLlu+/NdlJ2 4NXdV2/+1ZZuEW Message-ID: <4F75878D.6010408@gmx.at> Date: Fri, 30 Mar 2012 12:14:37 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> <4F718710.4040203@gmx.at> <4F756238.1080004@gmx.at> <83aa2y1oy4.fsf@gnu.org> In-Reply-To: <83aa2y1oy4.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > What are you trying to accomplish by putting the `cursor' property on > more than a single character of the overlay string? I thought I _have_ to do that in order to make the overlay know that for every character covered by the 'cursor property the appropriate position where to display the cursor is "1". Apparently, the display engine does derive that all by itself (which is good) but for me it was difficult to understand. > The display > engine doesn't expect it to be on more than one character in the > overlay string (it will put the cursor on the first and ignore the > rest). It's a good reaction but difficult to analyze. > The string character on which you put the `cursor' property of any > non-nil value is the character where you want the cursor displayed. Aha. It's now clear to me from the manual. Initially, I thought that (overlay-put my-overlay 'cursor 3) would put the cursor on the third character after the overlay's start and after noticing that this does not happen I got lost. > The value says for which buffer positions to display the cursor > there. If the value is an integer number, the cursor is displayed > there when the buffer position is between N and N + n, where n is the > value of the property and N is the overlay-start position. If the > value is anything else and non-nil, the cursor is displayed there only > when point is at overlay-start. I see that now. It's not intuitive for me why I would want such behavior (and it apparently doesn't work for negative numbers) but I suppose it's needed by cua. So the documentation is correct (once you understand how it works ;-) ) just that the following part it specifies the number of buffer's character positions associated with the overlay string; is misleading. Maybe "associated with" could become "affected by"? > ??? I clearly see it in this snippet from cua-rect.el: Another oversight. I didn't notice that `ms' and `as' are put on overlays. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 07:18:48 2012 Received: (at 11068) by debbugs.gnu.org; 30 Mar 2012 11:18:48 +0000 Received: from localhost ([127.0.0.1]:46199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDZqx-0006Be-Em for submit@debbugs.gnu.org; Fri, 30 Mar 2012 07:18:48 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:33814) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SDZqu-0006BW-Sa for 11068@debbugs.gnu.org; Fri, 30 Mar 2012 07:18:45 -0400 Received: (qmail invoked by alias); 30 Mar 2012 10:47:11 -0000 Received: from 62-47-46-219.adsl.highway.telekom.at (EHLO [62.47.46.219]) [62.47.46.219] by mail.gmx.net (mp002) with SMTP; 30 Mar 2012 12:47:11 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1870INAGug7lFhZytzBMUsgOuTMZkNUtuzO6eTGT/ mDdMohgfdhPg6T Message-ID: <4F758F40.8010908@gmx.at> Date: Fri, 30 Mar 2012 12:47:28 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> <4F718710.4040203@gmx.at> <4F756238.1080004@gmx.at> <83aa2y1oy4.fsf@gnu.org> In-Reply-To: <83aa2y1oy4.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Amendment: I see now why specifying a number for the cursor property _is_ useful. It seems that I can get what I initially mentioned (color just the selected window) by doing (defvar my-end-overlay nil) (defvar my-start-overlay nil) (defvar my-string nil) (defvar my-window (selected-window)) (progn (when (overlayp my-end-overlay) (delete-overlay my-end-overlay)) (when (overlayp my-start-overlay) (delete-overlay my-start-overlay)) (setq my-end-overlay (make-overlay 0 0)) (setq my-start-overlay (make-overlay 0 0)) (overlay-put my-start-overlay 'face 'lazy-highlight) (overlay-put my-start-overlay 'window my-window) (move-overlay my-start-overlay (point-min) (point-max)) (setq my-string (propertize (make-string 100 10) 'face 'lazy-highlight)) (put-text-property 0 1 'cursor 100 my-string) (overlay-put my-end-overlay 'after-string my-string) (overlay-put my-end-overlay 'window my-window) (move-overlay my-end-overlay (point-max) (point-max))) (ignoring stickyness, insertion, and change of selected window) just that moving to the end of the buffer doesn't yet seem quite correct. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 30 08:15:12 2012 Received: (at 11068) by debbugs.gnu.org; 30 Mar 2012 12:15:13 +0000 Received: from localhost ([127.0.0.1]:46248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDajW-0008Lq-4p for submit@debbugs.gnu.org; Fri, 30 Mar 2012 08:15:11 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:38371) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDaj2-0008Kk-88 for 11068@debbugs.gnu.org; Fri, 30 Mar 2012 08:15:08 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1P003004JLS000@a-mtaout22.012.net.il> for 11068@debbugs.gnu.org; Fri, 30 Mar 2012 14:43:00 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.100.223]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1P003XS4JNKH50@a-mtaout22.012.net.il>; Fri, 30 Mar 2012 14:43:00 +0300 (IDT) Date: Fri, 30 Mar 2012 14:42:59 +0300 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <4F75878D.6010408@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <831uoa1fi4.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> <4F718710.4040203@gmx.at> <4F756238.1080004@gmx.at> <83aa2y1oy4.fsf@gnu.org> <4F75878D.6010408@gmx.at> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11068 Cc: darthandrus@gmail.com, cyd@stupidchicken.com, 11068@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Date: Fri, 30 Mar 2012 12:14:37 +0200 > From: martin rudalics > CC: darthandrus@gmail.com, monnier@iro.umontreal.ca, > cyd@stupidchicken.com, 11068@debbugs.gnu.org > > > The value says for which buffer positions to display the cursor > > there. If the value is an integer number, the cursor is displayed > > there when the buffer position is between N and N + n, where n is the > > value of the property and N is the overlay-start position. If the > > value is anything else and non-nil, the cursor is displayed there only > > when point is at overlay-start. > > I see that now. It's not intuitive for me why I would want such > behavior (and it apparently doesn't work for negative numbers) but I > suppose it's needed by cua. You need this if you want a tight control on cursor position for several buffer positions. > So the documentation is correct (once you > understand how it works ;-) ) just that the following part > > it specifies the number of buffer's > character positions associated with the overlay string; > > is misleading. Maybe "associated with" could become "affected by"? I see no difference between "associated with" and "affected by", they are both equally obscure. I think I wrote that when I myself didn't have a clear notion of what that number means. I will try to come up with a clearer wording, thanks for pointing this out. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 31 06:29:50 2012 Received: (at 11068) by debbugs.gnu.org; 31 Mar 2012 10:29:50 +0000 Received: from localhost ([127.0.0.1]:60132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDvZ8-00075t-Kz for submit@debbugs.gnu.org; Sat, 31 Mar 2012 06:29:50 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:42970) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDvZ5-00075k-QE for 11068@debbugs.gnu.org; Sat, 31 Mar 2012 06:29:48 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M1Q00800VNG5B00@a-mtaout21.012.net.il> for 11068@debbugs.gnu.org; Sat, 31 Mar 2012 13:29:08 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.100.223]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1Q008EMVSF4O30@a-mtaout21.012.net.il>; Sat, 31 Mar 2012 13:29:05 +0300 (IDT) Date: Sat, 31 Mar 2012 13:29:06 +0300 From: Eli Zaretskii Subject: Re: bug#11068: 24.0.94; Face-remapped background does not extend to end of window In-reply-to: <831uoa1fi4.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: rudalics@gmx.at, darthandrus@gmail.com, 11068@debbugs.gnu.org Message-id: <83r4w9jc7h.fsf@gnu.org> References: <1BE52A40-0403-433F-8164-DFDBD6771F80@gmail.com> <83ty1fvc28.fsf@gnu.org> <83obrmtbsy.fsf@gnu.org> <4F6DCF31.3060609@gmx.at> <83fwcyt7f0.fsf@gnu.org> <4F6E24FD.2070907@gmx.at> <83wr69sp4e.fsf@gnu.org> <4F6F1574.2090904@gmx.at> <83r4wgsii6.fsf@gnu.org> <4F6F6FCF.30806@gmx.at> <837gy8s64w.fsf@gnu.org> <4F701547.6070003@gmx.at> <4F718710.4040203@gmx.at> <4F756238.1080004@gmx.at> <83aa2y1oy4.fsf@gnu.org> <4F75878D.6010408@gmx.at> <831uoa1fi4.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11068 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Fri, 30 Mar 2012 14:42:59 +0300 > From: Eli Zaretskii > Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org > > > So the documentation is correct (once you > > understand how it works ;-) ) just that the following part > > > > it specifies the number of buffer's > > character positions associated with the overlay string; > > > > is misleading. Maybe "associated with" could become "affected by"? > > I see no difference between "associated with" and "affected by", they > are both equally obscure. I think I wrote that when I myself didn't > have a clear notion of what that number means. I will try to come up > with a clearer wording, thanks for pointing this out. Done in trunk revision 107711. From unknown Fri Jun 20 19:49:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 28 Apr 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator