From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: ELPA: New package: nano-theme Date: Tue, 28 Sep 2021 18:37:58 +0000 Message-ID: <8735po5ywp.fsf@posteo.net> References: <87bl4c6197.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: "Nicolas P. Rougier (inria)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 28 20:38:59 2021 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 1mVI0J-00033H-Oe for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 20:38:59 +0200 Original-Received: from localhost ([::1]:37694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVI0I-0007HS-KU for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 14:38:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVHzT-0006Tn-23 for emacs-devel@gnu.org; Tue, 28 Sep 2021 14:38:07 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:42909) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVHzQ-00077O-6Y for emacs-devel@gnu.org; Tue, 28 Sep 2021 14:38:06 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A9E78240101 for ; Tue, 28 Sep 2021 20:38:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1632854280; bh=2XGSW39rQ/fRlzW2J0Hcxy+lWlHRpYk8KYgd9IzlIMI=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Nzas+DoPlIAY/yFo2a2l3enVASE/i2mFU/ScLSFDVyL6I+L2TlUibB/iJxS3PQYEa baOVrcKXoHN2jR+LlJZYFgYAJ9s64sjKAb08faFC7eTOdZxv6NJiwWv9OR2dxHs//R DY3LZWlJ6AEIK6fFlDCI5NSG0bf2h1SeWybD7hMYDZrgbrEE5gpY2GkZ2AXtqXpXd1 nD35bX8HH4i/NXeTKt381/1QRSh0iBeXKTKeuM2U1zGAYyk8fdSkrvw7NWYX4uAQhi 2AlqaO/ifgSBzzGr5ewrZrctn61IPsiQ8dy7j+4byZZEX9qt9T05jwqZkwqGNHsu3R Qx4CeuFqmrsHg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HJpCq5y98z9rxM; Tue, 28 Sep 2021 20:37:59 +0200 (CEST) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB In-Reply-To: (Nicolas P. Rougier's message of "Tue, 28 Sep 2021 19:57:16 +0200") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:275720 Archived-At: "Nicolas P. Rougier (inria)" writes: > Many thanks for the review and the feedback. > > Philip Kaludercic writes: > >> "Nicolas P. Rougier (inria)" writes: > >> I see that a lot of faces inherit from nano-default, nano-strong, >> nano-faded, etc. Wouldn't it make more sense to inherit from >> built-in >> faces and then let default, bold, shadow, etc. inherit from these >> faces. > > Having such names helps a lot when you assign faces. For example, when > I define font-lock-comment-face, I want to make it faded and it feels > more natural and explicit to inherit from nano-faded. Also, is there > an associated computational cost when defining a new face? There has to be *some* computation, but thinking again about this, it probably shouldn't matter much if you define bold and let everything inherit from bold or if you define nano-strong and inherit from nano-strong. >> Furthermore, I wonder why you define the commands nano-light and >> nano-dark, instead of two themes, nano-light and nano-dark (along >> the >> same lines of what modus-themes currently does). You could also turn >> nano-setup into a custom theme, so that the user can easily enable >> and >> disable it. > > Maybe I need to read the documentation on what a theme can set. For > example, I set the face for the minibuffer (0 & 1) and echo area (0 & > 1) and I wasn't sure how to specify this in a theme. Same for > underline to be set at descent line, etc. Not directly, but you could define a custom option/minor mode that is activated as part of the theme to change these things too. >> A few more points: >> >> - Should the font really be part of the face? I think it makes sense >> to >> recommend a few fonts, but it is unconventional to add it as >> part of a >> theme. > > I agree this might be unconventional but since you can specify a font > family for each face, why not use it? And user can still choose its > own font stack. It was always my impression that faces are for users to set. >> - When you are only using one branch of a if expression, prefer >> when. Instead of (if (not ...) ...), prefer unless. > > Thanks, I'll do that. > > >> - Lines 363ff. seem to be indented unconventionally. Maybe add a >> .dir-locals.el to make sure everyone is using the same >> whitespace >> configuration. > > Not sure what you mean by add a .dir-locals.el. > Can you give me a pointer to the documentation? See (emacs) Directory Variables. >> Also, as you depend on at least 27.1, you probably don't have to >> check >> if custom-theme-load-path is defined. The same applies to >> tooltip-mode, >> scroll-bar-mode and tool-bar-mode. What you are doing looks more >> like >> configuration code, where you want to make sure that a .emacs works >> on >> older versions of Emacs. > > Thansk, didn't know, I'll correct it. -- Philip Kaludercic