From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] 11 new packages! Date: Fri, 25 Nov 2022 14:29:43 +0600 Message-ID: <87wn7ja13c.fsf@disroot.org> References: <87r0y6ug9z.fsf@disroot.org> <87y1sct2hp.fsf@posteo.net> <87k03vf5m8.fsf@disroot.org> <87edu2narn.fsf@posteo.net> <8735aieqtr.fsf@disroot.org> <87cz9mlq3o.fsf@posteo.net> <875yfdd5ad.fsf@disroot.org> <87wn7o9n0i.fsf@posteo.net> <87cz9fyq1g.fsf@disroot.org> <87r0xuapfv.fsf@posteo.net> <87cz9ex4wd.fsf@disroot.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9909"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Developer List To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 25 09:31:57 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 1oyU7p-0002OF-BJ for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Nov 2022 09:31:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyU70-0007Tu-IJ; Fri, 25 Nov 2022 03:31:07 -0500 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 1oyU6i-0007Qc-Vt for emacs-devel@gnu.org; Fri, 25 Nov 2022 03:30:58 -0500 Original-Received: from knopi.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyU6f-0006Ml-TO for emacs-devel@gnu.org; Fri, 25 Nov 2022 03:30:47 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8FCB441463; Fri, 25 Nov 2022 09:30:44 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 505sl90FRJMf; Fri, 25 Nov 2022 09:30:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1669365042; bh=YixRalhTQNkZXztsPHVe82ZFB/s6A0p+trnfRN6+lU8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FoeYgsoMntEW/ksfKtq123kjMjcj/EjjimMdJ3ckQg0sp0FMk7d1O51MmdfsxIpQ2 Rxp8Cg5Myoghc8HKyeHDo/h8BX6nSoQXvU/J9DXahLuiAFnwiN5qMzvvZytnKjEKBZ f1DbeXP/a/nuPsgajM5GWFscyaW1NRasVuGWPlwyP2W0s4Nmv5Nez8D4IbgdWhT5W1 FaQc+VfDCQig0E2WY00XqZDc0UHlhHzQaURPwperiEzo24I/Xpq/6uXBaMuFrPbBHL Ui2Ol3DCi/ZBliMx5w04bK19nliRVRMND+mk211Yr6yMci0y4vn+WYDqZVwRtpAlxa VeVi71WtT8Xwg== In-Reply-To: <87cz9ex4wd.fsf@disroot.org> (Akib Azmain Turja's message of "Tue, 22 Nov 2022 23:42:10 +0600") Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org 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, 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:300470 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ping? Any update? Akib Azmain Turja writes: > Philip Kaludercic writes: > >>>> I've managed to skim through workroom.el. The code looks great, so I >>>> just have a non-comprehensive list of comments and ideas: >>> >>> Really? It was one of my worst packages until I almost rewrote it over >>> the last few weeks. >> >> The coding style was clean and the documentation went into details. >> That is good stuff in my book :) > > I can't remember writing any comments, and the docstring are just the > result of checkdoc, which always teases me as I program. > >> >>>> (defun workroom-rebind-command-map-prefix () >>>> "Rebind command prefix key sequence `workroom-command-map-prefix'." >>>> (substitute-key-definition >>>> @@ -234,6 +235,7 @@ The value is a mode line terminal like `mode-line-= format'." >>>> ;;;; Workroom and View Manipulation. >>>>=20=20 >>>> (cl-defstruct (workroom--room >>>> + (:predicate workroomp) >>>> (:constructor workroom--make-room) >>>> (:copier workroom--copy-room)) >>>> "Structure for workroom." >>>> @@ -253,6 +255,7 @@ The value is a mode line terminal like `mode-line-= format'." >>>> :documentation "`completing-read' history of view names.")) >>>>=20=20 >>>> (cl-defstruct (workroom--view >>>> + (:predicate workroom-view-p) >>>> (:constructor workroom--make-view) >>>> (:copier workroom--copy-view)) >>>> "Structure for view of workroom." >>>> @@ -268,7 +271,7 @@ The value is a mode line terminal like `mode-line-= format'." >>>> (defvar workroom--dont-clear-new-view nil >>>> "Non-nil mean don't clear empty new views.") >>> >>> They don't get a docstring on my machine. :( >> >> That might be the case. In that case you can keep the previous code, >> and perhaps define the prettier variants using `defalias`, or by >> manually annotating a function symbol. > > I think I'll keep the code. > >> >>>>=20=20 >>>> -(defvar workroom--rooms nil >>>> +(defvar workroom--rooms nil ;maybe some comments on the structure >>>> "List of currently live workrooms.") >>> >>> As the docstring describes, it's a list, and all elements satisfies >>> `workroomp'. >> >> Hmm, I guess that is self-descriptive enough. I was wondering if this >> was a alist or something else. >> >>>> @@ -558,7 +552,7 @@ Return DEF when input is empty, where DEF is eithe= r a string or nil. >>>>=20=20 >>>> REQUIRE-MATCH and PREDICATE is same as in `completing-read'." >>>> (completing-read >>>> - (concat prompt (when def (format " (default %s)" def)) ": ") >>>> + (concat prompt (and def (format " (default %s)" def)) ": ") ;Compa= t has `format-prompt' >>>> (mapcar #'workroom-name workroom--rooms) predicate require-match >>>> nil 'workroom-room-history def)) >>> >>> I don't have much idea about Compat, how does it work? >> >> Compat is provided on ELPA. If you add it as a dependency and load it, >> it will define missing functionality on older systems. >> >> The documentation goes into greater detail: >> https://elpa.gnu.org/packages/doc/compat.html#Usage. >> >> But as everything else, this is just a "fun fact", nothing critical. > > OK, I've change the code to use format-prompt, just only because it's > customizable with the user option minibuffer-default-prompt-format. > >> >>>> @@ -1254,7 +1248,7 @@ ACTION and ARGS are also described there." >>>> (setf (workroom-buffer-manager-data room) >>>> (cl-delete-if-not #'buffer-live-p >>>> (workroom-buffer-manager-data room))) >>>> - (pcase action >>>> + (pcase action ;perhaps match on (cons action args)? >>>> (:initialize >>>> (cl-destructuring-bind () args >>>> (setf (workroom-buffer-manager-data room) >>> >>> I wonder why I used cl-destructuring-bind when there isn't any keyword >>> arguments. >>> >>> Fixing... >>> Fixing...done >> >> I assumed this was just for the sake of consistency? After all, my >> suggestion does do one unnecessary `cons' for the sake of convenience. =2D-=20 Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5 Fediverse: akib@hostux.social Codeberg: akib emailselfdefense.fsf.org | "Nothing can be secure without encryption." --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmOAfPgACgkQVTX89U2I YWubYQ/+PrQw8+k5LdFvHP2haVAER/MPadG2sBN8hP29FKiVIik0Yug4xYPh+KIH AUrKTRVAKUqpUF4gBu4k8Es6lTH2qdd0hn6jU1o4VvYA5iaX0ccQXQqUqMf5EJ83 16t1N570mE3w36lV808wQNAjfTC7PPZ/WHt3sZdEWVxpsFXjxAlr/zlfVCNewQKe xmMSYBB63SvNSDkYR3+K9rZJq6WP90+nj2jBV1pFLyPf0A8bIjvKVu17d5m4ycsv ADxAGErKk1acfJhA081cTqjDB3BSGkO6yaO7ZomExa9AhV7i6UGG84rQ//Fmo7ff THMyRBoq+O0sWkPuvyqKPFYLUmS8X1cT7EUuB7+DLKXtaNu4XgH3IQ8EDKYoU143 W/148SSFP1qFFGQkThPFWNJdanVCW34LM9JK7BTuBvt2VNWSMEAqflNBrfbyQhVI QS4PrxFNxlSPCmN9ijb9fSljQS5XGHvg7WukvdeHTPhs7yTNlKWGmhGX6SBcQaD8 BpDoJiRNRCnnIAkiGUlRIl/vV8m8W2STPbpLs+SjdVzOqeAaD7MEfu9HRVG/+bid BLMNc+Ffr3ILt8bdxtxtCwFPz0QKWyh3ri+bT9ohVft9a8o3WtrxLdWMqiHyJzvz GjDtszXqw57yDN5W5/XE1Rt6h2OuOfYka6dyR9IyiUr3Tjn9D2M= =XaVX -----END PGP SIGNATURE----- --=-=-=--