From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: Making `x-underline-at-descent-line' a face attribute Date: Thu, 6 Jan 2022 09:47:33 -0800 Message-ID: References: <87lezt5v7h.fsf.ref@yahoo.com> <87lezt5v7h.fsf@yahoo.com> <83sfu18dao.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35064"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 06 18:49:49 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n5WtV-0008vg-Uw for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Jan 2022 18:49:45 +0100 Original-Received: from localhost ([::1]:52570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5WtU-0007k3-VI for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Jan 2022 12:49:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5WrU-0005Rs-Ia for emacs-devel@gnu.org; Thu, 06 Jan 2022 12:47:40 -0500 Original-Received: from [2607:f8b0:4864:20::42a] (port=43890 helo=mail-pf1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5WrT-0007ps-3A; Thu, 06 Jan 2022 12:47:40 -0500 Original-Received: by mail-pf1-x42a.google.com with SMTP id 196so3119705pfw.10; Thu, 06 Jan 2022 09:47:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=+n8A0+TbKJqGKdMqa5aEHZxOmiENJNRys31Q7C068oE=; b=l9GT86AZVaGXNA7rcYZZKQeNMzGcH9LGBW51Vp9eLl4O6KmQgBkipedHjwqFzoda+z 5FVMRTjrHJ+VPUiHSHSImF0w5Vl47FOFPpZSBbSnr1SRuK2BtpLOiBmpC1j6p/YajbBD WSNZI7M1D+K/Q0A4RcOjBcdPGvJJIKA/D734OH8XnpSE5fSz7ipRmlOxxl9VRwbnXWKP Pxc4pcZB2WB0eas6KsYBpp+2BpqFqWyIZaHqyTLtakGgC9jTIVKU1A4K6GlNerndNUO4 usojskr0PdeVtbZBgsCSgjLnjdtR3U//hCMtClAohlnMZn4ZAXf7O1LbwkBl7xsxWMA7 pY9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+n8A0+TbKJqGKdMqa5aEHZxOmiENJNRys31Q7C068oE=; b=Ytx+jBKxJdzJG0Ti6a9d/3QA3ZRXDALM8//ZICPhsuxi59BOf2Dw00eENwv24uzoEc JL2RavR0lvDqkaR/6nf/e4jOY0o4o88YYr/siV9S4P6yODqHNPvLWrxc8YQpUyvKdcHE BlJvdIuBW4qCnAY2q0hI3wUdbov098yvpu1/N7vLpVtNzBwdr4FozjKv+BXQU2TctdeY IK9vWS+jkK06OU4cAiMUWae1QAI8kJTEweqEFnTu/fXPPz1Pdvl5xCjiyekhrfOHAkzi EyKumMBWJTXXqVETY9snay9fQJe+T0mHbuDJnz2PWTNbPxKzq28udmbeA2SGxuYDKflm oFuw== X-Gm-Message-State: AOAM531GjNm6Ri8fJJH/JLLXobHQnWbEbz9T04NMlFbByGAdl6EIJSS3 7Vh/G+3S38KMcO1QGLEzuFz20O1ikw4= X-Google-Smtp-Source: ABdhPJwsisoTYVIOqC6ZsCr0EQBkumYjPYQSa2Y2uoWI1sJSP0MFzlTQpSuGPGnmT5XOt4JDlPKV2Q== X-Received: by 2002:a65:4c81:: with SMTP id m1mr54031082pgt.427.1641491252869; Thu, 06 Jan 2022 09:47:32 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id q16sm3437632pfu.31.2022.01.06.09.47.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jan 2022 09:47:32 -0800 (PST) In-Reply-To: <83sfu18dao.fsf@gnu.org> Content-Language: en-US X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::42a (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=jporterbugs@gmail.com; helo=mail-pf1-x42a.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284336 Archived-At: On 1/6/2022 12:43 AM, Eli Zaretskii wrote: >> From: Jim Porter >> Date: Wed, 5 Jan 2022 21:08:57 -0800 >> >> What about enhancing the :box attribute further to allow different >> widths (and possibly colors) for each of the 4 sides? > > The width part is already supported. We could make the value of > :color be a cons cell as well, if that is useful (is it?) Looking at the docs for :box, I only see the ability to set separate vertical and horizontal widths (but not to set all 4 sides to different values). The latter would be useful in some cases, for example to make the tab-bar tabs look more like tabs. You could specify a box with a border on all sides but the bottom for the active tab, and a border *only* on the bottom for inactive tabs, so you get something like: +----------+ inactive | active | inactive ------------+ +------------ One benefit of making :color a cons cell is that it would be possible to create an effect like `:style released-button', but allow the programmer to control the exact colors to use. That could be useful in some situations. For instance, the modeline could have a border at the top and bottom (but not the sides) with different colors to make it appear raised. I tried using `:style released-button' for that, but it appears to only support a :box with non-zero widths on all sides. > But mixing :box and :underline is IMO not a good idea. They are > separate attributes. I think I agree. From the original message, it sounded like the goal was to get a border around the modeline, so using :underline isn't the ideal option semantically. If :box were more flexible, it'd be possible to use that to draw borders around things, even if that "border" was just on the bottom (making it look similar to an underline).