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: cursor-undo Date: Fri, 26 Jul 2024 06:52:45 +0000 Message-ID: <871q3gk5ky.fsf@posteo.net> References: <87a5ibm2q6.fsf@posteo.net> 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="25190"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: =?utf-8?B?6Lev5a6i?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 26 08:54:05 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 1sXEq3-0006Rl-Uz for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Jul 2024 08:54:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXEox-0006Tw-Ck; Fri, 26 Jul 2024 02:52:55 -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 1sXEov-0006TM-R6 for emacs-devel@gnu.org; Fri, 26 Jul 2024 02:52:53 -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 1sXEot-0005rb-D8 for emacs-devel@gnu.org; Fri, 26 Jul 2024 02:52:53 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 98DC0240027 for ; Fri, 26 Jul 2024 08:52:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1721976767; bh=t4UKvyQB6U1N1AnpEt1GIbq1olxgkYPTnqDp2qAQdbY=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=KFpxpAIZkpzr5NaCYAv6UrhqNgTvjUkxoYQ3eqCeIqPbcWp0OZeoFu6fVF2IkRSaT ZhSTqcFyzeqw45Wg/czfIyOqm1z49JMFp3M1XiJP6cqc4bMVxP29SaUrZh2SiqJWbj QIfw8GHNQnhRUyu3xFC/Zbq3xUDKECnMcQCN32qMYT6mhD9d5MH/5+2xnDaPb0u1DY mbA1VJ4MojM30oEQhm5kIuL857dzjRDyCLr6x4FuG4lJcFEuJ1MkBPTqTIXcGAZTqN yyVyMKjoBeoXCGqKfZdEHH40YSQlbbrsOqWz/EQBfXYEDjplxV2Kgtbwfh1scnTyT2 mIjjEsyeCZxcQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WVdjq07pBz6tn4; Fri, 26 Jul 2024 08:52:46 +0200 (CEST) In-Reply-To: (=?utf-8?B?Iui3r+WuoiIncw==?= message of "Mon, 22 Jul 2024 19:55:51 +0800") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.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_H3=0.001, RCVD_IN_MSPIKE_WL=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:322103 Archived-At: =E8=B7=AF=E5=AE=A2 writes: >> Before pushing a package directly to elpa.git, you should try to build >> it locally. Currently it fails because the :doc specification links to >> a .txt file, which cannot be converted to a Info manual: > > I followed the ELPA steps but there is no info about how to build a new > package locally before pushing into the main git branch external/ > . A "make build/cursor-undo" command sometimes cause a pull from external > git. Even in the ELPA `elpa-admin.el' the first TODO is: > > ;; - bug#45345: [elpa-archive] "make build/" should not pull > ;; unconditionally > > and I found this is /sometimes/ true. Sometimes I modified my source code > and do "make build/cursor-undo" again it will be overwritten back to the > old one in git external/cursor-undo. Therefore, the only way is to push > it back into git and wait a while then rebuild. However, sometimes it > won't so it's confusing what the correct steps to perform a pure local > build really are. So, let me know if there is a way to build a new > package locally without push into the external/ first. I have to admit that I am not sure about this, but I can look into it. In the last few years the recommended workflow has been to use an external repository that is mirrored into elpa.git, so I guess this hasn't been an issue that a lot of people have encountered recently. > But as a hindsight I now learned I could first modify "elpa-packages" > locally and build but still need to push into external/ first. > Next time I will make sure I do that. > > After I managed to build my package I found the ELPA README did not menti= on > that the ";;; ends here" is required. That is documented in (elisp) Library Headers. It is not a ELPA-specific rule. > Some of your comments are followed while some not: > >> +;; shouldn't this be a major mode? >> (defvar cundo-enable-cursor-tracking t) ; global enable flag > > Actually this package is not a mode, but it seems it's preferred as Stefan > also mentioned this to me so I now made it a minor mode. 1+ >> ;; unless I am misreading this, `prev-screen-start' >> ;; is being evaluated in the context of the macro, >> ;; /not/ the macro-expansion. Yet >> ;; `prev-screen-start' is bound and set inside the >> ;; context of the macro-expansion. This seems to >> ;; trigger the 'Unused lexical variable >> ;; =E2=80=98prev-screen-start=E2=80=99' byte-compiler = warning >> ;; below. > > Yes it was meant to be evaluated instead of being expanded since the > beginning many years ago, this part of code has been tested for many > years, I reviewed the generated code again and it's still valid. I think > the byte compiler must have mis-interpreted my intention and gave the > incorrect warnings. Anyway, before the root cause is found a quick > mitigation is to (defvar prev-screen-start). Let's hope so. >> +(provide 'cursor-undo) > > This was done earlier in the code. Must have missed it then. Is there a reason you didn't add it at the end, as is conventional (and probably useful, if there is an error while loading the file, that you don't mark it as required)? >> +;;; cursor-undo.el ends here > > This step is a must but the ELPA README did not mention that. I found > the local build would fail without it, so it's now added. > > The fixed version has been pushed into the git. Thanks. > > Best regards, > Luke Lee --=20 Philip Kaludercic on peregrine