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: Request to distribute Casual packages on NonGNU ELPA Date: Fri, 27 Sep 2024 15:52:57 +0000 Message-ID: <877caxqejq.fsf@posteo.net> References: <8B0830CA-6995-454C-BC5A-E4247E259CE9@gmail.com> <87a5fvsi0x.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28936"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Stefan Kangas , Stefan Monnier To: Charles Choi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 27 17:54:13 2024 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 1suDIL-0007Kj-4o for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Sep 2024 17:54:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suDHF-0001XV-89; Fri, 27 Sep 2024 11:53:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suDHD-0001VW-2d for emacs-devel@gnu.org; Fri, 27 Sep 2024 11:53:03 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suDHA-0008Pk-AS for emacs-devel@gnu.org; Fri, 27 Sep 2024 11:53:02 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F3EE2240029 for ; Fri, 27 Sep 2024 17:52:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1727452377; bh=xPDEXERqgxdWE0Gw5Kq/ZR4VRVc6JDMWA91NebEF+wc=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=KJXP6k6cINdaafkGaOg+YzNpM3APL21O4Xm292KwKFQeeIZGGaWYTR11LTRDSisom Nqq7piCN+rt/sj1IftP1sit1UPoS3P608T4+zbawZhXv7OKLIH14dW1B8Zf+TkMA9C F/Tn7T3OcD/pne6OVUsIXR+0YA1bfOCgwLhTSQdDoXwxHJvuTwBuH5aLnd7YKpWClt IcKnPvaWsj5rD4d3gQCInT4S9phxJPNftfN+YYaBYF4jSxCN3oc17GjBNPvPFOcPWz gdaFVN2UTROpOdNwqWho9bpYXw7z5iA6HnOlFTCRfcQ420h4T5WOG17LfZPjgPcamj 0RaPpNduRJHdg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XFZk11Zm3z6twd; Fri, 27 Sep 2024 17:52:57 +0200 (CEST) In-Reply-To: (Charles Choi's message of "Wed, 25 Sep 2024 13:05:22 -0700") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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.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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324136 Archived-At: --=-=-= Content-Type: text/plain Charles Choi writes: [...] > https://github.com/kickingvegas/casual-lib/ My first impression that the project seems a tad over-engineered for what is basically just a single file, but that's your prerogative. One point in "developer.org", you write - Menus must not exceed 80 characters in length. - Rationale: Casual Lib follows suit with current Elisp format to conform to the line width of an ADM-3A terminal. but I don't know where you got that information from? https://www.emacswiki.org/emacs/EightyColumnRule e.g. says this goes back to punch cards (which is the story I had in my head). Regarding casual-lib.el: Do you actually need Emacs 29? Package lint seems to be fine with lowering the version to Emacs 25. Other than that, here are a few comments and suggestions: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/casual-lib.el b/lisp/casual-lib.el index 52fbf16..93111ba 100644 --- a/lisp/casual-lib.el +++ b/lisp/casual-lib.el @@ -6,7 +6,7 @@ ;; URL: https://github.com/kickingvegas/casual-lib ;; Keywords: tools ;; Version: 1.1.3 -;; Package-Requires: ((emacs "29.1") (transient "0.6.0")) +;; Package-Requires: ((emacs "25.1") (transient "0.6.0")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -25,11 +25,12 @@ ;; Library routines for Casual user interfaces. -;; INSTALLATION -;; Casual Lib is intended to be implicitly installed as a dependency to the -;; Casual suite of packages. If you are running Emacs 29.x, you will need to -;; configure `package-install-upgrade-built-in' to t to support an update of the -;; built-in package `transient'. +;;;; Installation + +;; Casual Lib is intended to be implicitly installed as a dependency +;; to the Casual suite of packages. If you are running Emacs 29.x, +;; you will need to configure `package-install-upgrade-built-in' to t +;; to support an update of the built-in package `transient'. ;;; Code: (require 'transient) @@ -41,7 +42,7 @@ If non-nil, customize Casual user interfaces to hide navigation controls for `transient-quit-all' (control-q) and `transient-quit-one' (control-g)." :type 'boolean - :group 'casual) + :group 'casual) ;please add a `defgroup' before referring to it! You don't need to specify the :group afterwards. (defun casual-lib-customize-casual-lib-hide-navigation () "Customize `casual-lib-hide-navigation'. @@ -75,14 +76,13 @@ plain ASCII-range string." (let* ((db db) (unicode casual-lib-use-unicode) (item (alist-get key db))) - (if unicode - (nth 0 (eval item)) - (nth 1 (eval item))))) + (nth (if unicode 0 1) (eval item t)))) ;; Predicates -(defun casual-lib-display-line-numbers-mode-p () +(defun casual-lib-display-line-numbers-mode-p () ;why do you have this + ;as a predicate? "Predicate to test if `display-line-numbers-mode' is enabled." - (if display-line-numbers t nil)) + (bound-and-true-p display-line-numbers)) (defun casual-lib-buffer-writeable-p () "Predicate to test if buffer is writeable." @@ -98,11 +98,8 @@ plain ASCII-range string." (defun casual-lib-quit-all-hide-navigation-p () "Predicate for hiding navigation for the `transient-quit-all' command." - (if casual-lib-hide-navigation - t - (if transient--stack - nil - t))) + (or casual-lib-hide-navigation + (not transient--stack))) ;btw. are you allowed to use this internal variable? ;; Labels (defun casual-lib--variable-to-checkbox (v) @@ -135,7 +132,7 @@ V is either nil or non-nil." "Casual suffix to call `transient-quit-all'." :transient nil :if-not #'casual-lib-quit-all-hide-navigation-p - :key "C-q" + :key "C-q" ;IIUC this is the binding that closes your transient buffer? Could this be rebound to the more conventional "q"? :description "Dismiss" (interactive) (transient-quit-all)) @@ -179,7 +176,7 @@ Note that this variable affects all Casual user interfaces." casual-lib-hide-navigation "Hide Navigation Commands")) (interactive) - (casual-lib-customize-casual-lib-hide-navigation)) + (casual-lib-customize-casual-lib-hide-navigation)) ;why not just inline the above definition? (provide 'casual-lib) ;;; casual-lib.el ends here --=-=-= Content-Type: text/plain -- Philip Kaludercic on siskin --=-=-=--