From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuchen Pei Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: hcel Date: Wed, 21 Sep 2022 15:58:50 +1000 Message-ID: <87r105s1yd.fsf@ypei.org> References: <87pmg346k0.fsf@ypei.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38139"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: Emacs Devel mailing list To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 21 08:01:21 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 1oasnR-0009mX-5S for ged-emacs-devel@m.gmane-mx.org; Wed, 21 Sep 2022 08:01:21 +0200 Original-Received: from localhost ([::1]:33664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oasnQ-0001Mm-7I for ged-emacs-devel@m.gmane-mx.org; Wed, 21 Sep 2022 02:01:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaslC-0000Nj-8y for emacs-devel@gnu.org; Wed, 21 Sep 2022 01:59:02 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:49793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oasl9-0007sC-UF for emacs-devel@gnu.org; Wed, 21 Sep 2022 01:59:01 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 241263200906; Wed, 21 Sep 2022 01:58:58 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 21 Sep 2022 01:58:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.org; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1663739937; x= 1663826337; bh=cpmQNffYv2NPkbutj3XWgEwAiMSD3DkQ3gZc+UnX9I4=; b=W NRbua/nkT0XE+CEq9pYsQFqzqDWPQ8v/bQKyvQuGKh0cc5zlm2S0Tw0E3m2mQFWC 7d781tAJuf7VHtSSsCpxb6h9lrtCzDTpNCta2MFlBWyYhnMPSZ3rYEOHFDqPSj3S O8cya84bJX2UP0/6/hiKCW8o6quNU563wTTBLc5DzT0dgWqwEC2ypGAARTcTMvdq CDjonZE8PnwiKrNABLCi2/VHVlFEHdRauRNrlHtYaFxFWT9N4j6J7mzWy3ciMJfm K2LPCKQMmJtLuRoyAJKCXJNT4ZG/wnOoZNczf/R1xWF/c/yozrUx0MPpSMmH2H+U ZSyxgOmrmlxF+IOhnIQAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663739937; x= 1663826337; bh=cpmQNffYv2NPkbutj3XWgEwAiMSD3DkQ3gZc+UnX9I4=; b=E G2f27sRZONPguzJLfEgFcYJX+rR+3IKscjgK+7LU0QKlXKxqFOwe/wuKtWZs9Pbq 8t/OibDrzgdSboUur24lgiXcv1R8tQoQEKcMyVQeQ5bWEfF9qrRV1p6ggQv4H2Qs IuHulwbQMzGuuZLMchJSkikA+LS35vjw1HI4+Co9qZZdSq7urDWgkZZsDFa9Lt2m B6DmtQjidgDFfFdsirJZuvhVaKnBfweU6MgXHe8ISMZKWB/sInFbfHG3LuaKQCLo DDzt16DU3JT5+kBCmKA4y2OjJN8QH4/HU7wNpR/pFhFZumGtDxin5dRpIIEqwOUO E8QadxEZcOUIORJmcVlbQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeftddguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomhepjghu tghhvghnucfrvghiuceoihguseihphgvihdrohhrgheqnecuggftrfgrthhtvghrnhephe ffhfdufeethffgledvhefhgeehkeekgfdufeetkefgtdetteeigeeljeekveevnecuffho mhgrihhnpehgnhhurdhorhhgpdihphgvihdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiugeshihpvghirdhorhhg X-ME-Proxy: Feedback-ID: i51b146f9:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Sep 2022 01:58:55 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Tue, 20 Sep 2022 17:42:43 -0400") Received-SPF: pass client-ip=64.147.123.20; envelope-from=id@ypei.org; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-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" Xref: news.gmane.io gmane.emacs.devel:295857 Archived-At: On Tue 2022-09-20 17:42:43 -0400, Stefan Monnier wrote: > BTW, here's a patch with various cosmetic changes. Thanks for the patch - it is very educational. I have applied it and made many other changes in a similar fashion. A few remaining questions: > (defun hcel-results-next-page () > (interactive) > + ;; FIXME: Using `major-mode' is a code smell. > (unless (memq major-mode '(hcel-refs-mode hcel-ids-mode)) > (error "Not in hcel-refs or hcel-ids mode: %S" major-mode)) What do you mean, should I avoid using the variable `major-mode'? Why? > In end of data: > packages/hcel/hcel-client.el:142:8: Warning: the function > =E2=80=98delete-http-header=E2=80=99 is not known to be defined. > packages/hcel/hcel-client.el:59:19: Warning: the function > =E2=80=98hcel-location-tag=E2=80=99 is not known to be defined. > packages/hcel/hcel-client.el:47:43: Warning: the function > =E2=80=98hcel-format-package-id=E2=80=99 is not known to be defined. > Byte compiling packages/hcel/hcel-results.el How do I get these "end of data" warnings? When I do M-x byte-compile or byte-recompile-directory I don't get them. > > In hcel-module-selector: > packages/hcel/hcel.el:55:43: Warning: reference to free variable > =E2=80=98package-id=E2=80=99 I thought this was OK because of lexical-binding? For reference, here's the defun: (defun hcel-module-selector (package-id) (lambda (module-path) (interactive (list (completing-read "Select module: " (hcel-list-modules package-id)))) (switch-to-buffer (hcel-load-module-source package-id module-path)))) It seems to me to be similar to the problem described in . Best, Yuchen --=20 PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0