From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 24 10:05:35 2020 Received: (at submit) by debbugs.gnu.org; 24 Jan 2020 15:05:35 +0000 Received: from localhost ([127.0.0.1]:54597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iv0Wd-0003Yg-7e for submit@debbugs.gnu.org; Fri, 24 Jan 2020 10:05:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:47588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iv0Wb-0003YY-I5 for submit@debbugs.gnu.org; Fri, 24 Jan 2020 10:05:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49973) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv0Wa-0006Yw-3L for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 10:05:33 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iv0WY-00086r-Op for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 10:05:31 -0500 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:36757) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iv0WY-00086X-IB for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 10:05:30 -0500 Received: by mail-pj1-x1041.google.com with SMTP id gv17so992329pjb.1 for ; Fri, 24 Jan 2020 07:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=V9lSDhSjxRmHB2wor4EiCCoKpPm2d6GoYQSDhEXyxds=; b=KkMDluSGWvphlypPgNwpBeHtAcnHcZ0xk6iJXbLKBBCRrzJvKiPDBZr1jGb9j3Xc07 aIGCrotMjtx/rvskdwdcWUa/o3ta1AEBVIwCstVGRzhynHgZjGtdCIx51ZVJSQ3n+nrS bjcUDyQItnandigMwPhYQMyUZatP32wOflcIzi57l1SlTlWrT14dsgR0Y+XdgLRHjGNb A+7jMAUTWLVWhx6g4RNfjAcFUeKSo6LPFhQSD1AD/RNVtRKZh2mEpam1WnzkKnMcwHG4 BYUB/MlZgLY/I/wC965Bm4GgcCfWPr1US11EdC0xf9w670qAdCckdWVpz7rJo5CQVsgk y+lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=V9lSDhSjxRmHB2wor4EiCCoKpPm2d6GoYQSDhEXyxds=; b=NciDzkIKtYdswjzisrle7STvaHBpBJMEiXaT8bk/LkXkdkgWxTenMphtH1Q4jBEu80 DvlA5Nj0s329ZTp1lMW8V+X7Aeq30ihFnpF+n/MD5m6QOwPS/vkt5n0TSEUvxTmhP3Ef vo3eBEqtniraYGya+EBlTB5B8GrzRksJuLT+Y6dP9OwjvY4tpad5rjLSzcidwaoRkG4u FSvmUiUI9lW6G4iFawlDxOUOt7e3ftRu3AeYfW21vi+FDqemVL+RgaDHB5Val3psicBx jVi/LWGW3i5R+qLMS+7WRdTL4PnA9bqucJWv7afwczSBebytYsEB4KCubH9xjXFBqzWa wbBw== X-Gm-Message-State: APjAAAU9S/Mms8F0qGN3uMbOQ1AVWkuNvUE1+upqu/AnOk+6bqCwLPOr apEAiFDkh6DrOZfkuz2OucmKY8GU X-Google-Smtp-Source: APXvYqxHFupeW/LgPXZ6GceRkccW9ulOdP7Ts18LSt0qs+D5Qld9dUvGVoARS245lvXvxHPi/PwHvw== X-Received: by 2002:a17:902:d898:: with SMTP id b24mr4013167plz.133.1579878329344; Fri, 24 Jan 2020 07:05:29 -0800 (PST) Received: from HP (east42-p111.eaccess.hi-ho.ne.jp. [219.121.173.112]) by smtp.gmail.com with ESMTPSA id l10sm6768418pjy.5.2020.01.24.07.05.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Jan 2020 07:05:28 -0800 (PST) From: ynyaaa@gmail.com To: bug-gnu-emacs@gnu.org Subject: 26.3; format-mode-line with FACE argument Date: Sat, 25 Jan 2020 00:05:25 +0900 Message-ID: <86o8ussxmy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1041 X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: #'format-mode-line assumes all characters of a string have a same 'face property value and checks only the first character. (format-mode-line (concat "A" (propertize "XYZ" 'face 'region)) 'highlight) => #("AXYZ" 0 1 (face highlight) 1 4 (face highlight)) Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ynyaaa[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) #'format-mode-line assumes all characters of a string have a same 'face property value and checks only the first character. (format-mode-line (concat "A" (propertize "XYZ" 'face 'region)) 'highlight) => #("AXYZ" 0 1 (face highlight) 1 4 (face highlight)) #'format-mode-line merges the 'face property value of the first character of a string with FACE argument. It is not ducumented at all. (format-mode-line (propertize "ABC" 'face 'region) 'highlight) => #("ABC" 0 3 (face (region highlight))) #'format-mode-line called with FACE=t should use 'mode-line or 'mode-line-inactive instead of 't, but it treats 't as a face. (format-mode-line "ABC" t) => #("ABC" 0 3 (face t)) In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 built on CIRROCUMULUS Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor 'Microsoft Corp.', version 10.0.18363 Recent messages: Mark set Undo! Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2 Important settings: value of $LANG: JPN locale-coding-system: cp932 Major mode: Lisp Interaction Minor modes in effect: diff-auto-refine-mode: t display-time-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-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 Load-path shadows: None found. Features: (ispell rect tabify term/bobcat descr-text mailclient browse-url cus-edit cus-start cus-load wid-edit info crm eieio-opt speedbar sb-image ezimage dframe shadow emacsbug network-stream nsm starttls tls gnutls mailalias smtpmail auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs sendmail sort mail-extr message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader compare-w diff-mode easy-mmode find-func cl-extra pp ibuf-ext ibuffer ibuffer-loaddefs seq thingatpt help-fns radix-tree misearch multi-isearch help-mode easymenu cl-print byte-opt gv bytecomp byte-compile cl-loaddefs cl-lib cconv debug time elec-pair time-date mule-util japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 213588 78115) (symbols 48 51769 1) (miscs 40 79 607) (strings 32 121478 3731) (string-bytes 1 2928298) (vectors 16 31694) (vector-slots 8 1265739 31616) (floats 8 75 438) (intervals 56 15946 2009) (buffers 992 19)) From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 24 10:36:38 2020 Received: (at 39265) by debbugs.gnu.org; 24 Jan 2020 15:36:38 +0000 Received: from localhost ([127.0.0.1]:54648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iv10g-0006Nf-04 for submit@debbugs.gnu.org; Fri, 24 Jan 2020 10:36:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iv10d-0006NM-W0; Fri, 24 Jan 2020 10:36:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iv10Y-0000Kt-RA; Fri, 24 Jan 2020 10:36:30 -0500 Received: from [176.228.60.248] (port=2335 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iv10Y-0008AA-BL; Fri, 24 Jan 2020 10:36:30 -0500 Date: Fri, 24 Jan 2020 17:36:15 +0200 Message-Id: <83sgk4rhn4.fsf@gnu.org> From: Eli Zaretskii To: ynyaaa@gmail.com In-reply-to: <86o8ussxmy.fsf@gmail.com> (ynyaaa@gmail.com) Subject: Re: bug#39265: 26.3; format-mode-line with FACE argument References: <86o8ussxmy.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39265 Cc: 39265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 39265 notabug thanks > From: ynyaaa@gmail.com > Date: Sat, 25 Jan 2020 00:05:25 +0900 > > > #'format-mode-line assumes all characters of a string have a same 'face > property value and checks only the first character. Yes. The reason is performance: the mode line is redrawn very frequently, basically, after every command. This is not a bug, this is the intended behavior. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 10 10:36:18 2020 Received: (at 39265-done) by debbugs.gnu.org; 10 Feb 2020 15:36:18 +0000 Received: from localhost ([127.0.0.1]:55241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1B6g-0000EY-49 for submit@debbugs.gnu.org; Mon, 10 Feb 2020 10:36:18 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:55076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1B6e-0000E7-3m for 39265-done@debbugs.gnu.org; Mon, 10 Feb 2020 10:36:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hMNBdfUr34kW/Dmacxw4E1J4F114Y0kkLL+0k4BSux8=; b=MsTd/jxHLhne8zh7iM1NuF3oq9 GXASYVERzL1cgc7hx1n1Xujf8kYCKS2QeN1WEpW2gQgtKGp3MMuSuNwozo/UFefLT5kKMiqYsfh/T xVcJehFSmmrdr3ShueiJ7P7z1ulGRCZqNY3fd2UqqtVsENTJX30XlwOZ6KpKHKMXAlTNZm0sxPzok pN20/rXlQ0jPwGPVjmfxA0FhTfXr2U7I6B8+fFSdfWNEM2LPFSfbzsAXnsR1AMZrAfPAOOLYhtVd0 0ZC8kMYIT8SigFJaEjSFNGfk/h+izK7D+BXo3VzWNUDOhIeHjq5VT0MbXB2BcHzAvBYxePdan+aWj 2uzpzImg==; Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:46938 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1j1B6Y-000n8Q-Dd; Mon, 10 Feb 2020 10:36:10 -0500 From: Stefan Kangas To: Eli Zaretskii Subject: Re: bug#39265: 26.3; format-mode-line with FACE argument In-Reply-To: <83sgk4rhn4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 24 Jan 2020 17:36:15 +0200") References: <86o8ussxmy.fsf@gmail.com> <83sgk4rhn4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Mon, 10 Feb 2020 16:36:08 +0100 Message-ID: <87ftfi5uaf.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39265-done Cc: ynyaaa@gmail.com, 39265-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > tags 39265 notabug > thanks > >> From: ynyaaa@gmail.com >> Date: Sat, 25 Jan 2020 00:05:25 +0900 >> >> >> #'format-mode-line assumes all characters of a string have a same 'face >> property value and checks only the first character. > > Yes. The reason is performance: the mode line is redrawn very > frequently, basically, after every command. > > This is not a bug, this is the intended behavior. I'm consequently also closing this bug report. Best regards, Stefan Kangas From unknown Sun Jun 22 11:40:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 10 Mar 2020 11:24:06 +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