From: Philip Kaludercic <philipk@posteo.net>
To: 路客 <luke.yx.lee@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: cursor-undo
Date: Fri, 26 Jul 2024 06:52:45 +0000 [thread overview]
Message-ID: <871q3gk5ky.fsf@posteo.net> (raw)
In-Reply-To: <CAA=xLRPj7xb_y-PgUAJJgxFpxoA-HP3wmNzoYOTivJAxq0A6gw@mail.gmail.com> ("路客"'s message of "Mon, 22 Jul 2024 19:55:51 +0800")
路客 <luke.yx.lee@gmail.com> 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/<package>
> . 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/<package>" 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/<package> 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/<package> first.
> Next time I will make sure I do that.
>
> After I managed to build my package I found the ELPA README did not mention
> that the ";;; <package> 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
>> ;; ‘prev-screen-start’' 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
--
Philip Kaludercic on peregrine
next prev parent reply other threads:[~2024-07-26 6:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 15:03 [ELPA] New package: cursor-undo 路客
2024-07-21 10:57 ` Philip Kaludercic
2024-07-22 11:55 ` 路客
2024-07-26 6:52 ` Philip Kaludercic [this message]
2024-07-26 10:00 ` Luke Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871q3gk5ky.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=emacs-devel@gnu.org \
--cc=luke.yx.lee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).