emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best (or common) pratices on package development workflow


From: Lic. Federico G. Stilman
Subject: Re: Best (or common) pratices on package development workflow
Date: Thu, 1 Jun 2023 22:08:34 -0300

Thanks, Ruijie. I can't believe I did not notice this before. I
actually use C-x C-e all the time for evaluating forms (and just
proved it also works).

Best regards,

-- 
Federico

On Thu, Jun 1, 2023 at 8:51 PM Ruijie Yu <ruijie@netyu.xyz> wrote:
>
> On Jun 2, 2023, at 07:12, Lic. Federico G. Stilman <fstilman@gmail.com> wrote:
> >
> > Hi all,
> >
> > First things first. I started development with Emacs Lisp a few weeks
> > ago after using for more than 20 years Emacs for my daily work. So I
> > am a newbie on the Emacs Lisp development side.
> >
> > I am currently writing a simple Emacs package consisting of one .el file.
> >
> > I have a couple of defcustom declarations that initialize some
> > variables with a default value. And this is the source of my question.
> >
> > Every time I make a change to the init value of the defcustom
> > declaration, I have to unload the feature provided by the package,
> > with something like:
> >
> >  (unload-feature 'my-package)
>
> for defcustom, defun, defvar, etc, you can use C-M-x when you are inside the 
> corresponding s-exp to evaluate it (and reset the initial value if it is a 
> variable).  See the docstring of C-M-x for details.
>
> When for some reason I don’t feel like doing that, I would use either 
> makunbound or fmakunbound to clear its symbol value or symbol function, then 
> load the file again via M-x eval-buffer or the like.
>
> > and after that, reload the library with something like
> >
> >  (load-library "my-package")
> >
> > If not, the customization framework doesn't account for the change on
> > the default value of the custom variables.
> >
> > My question is: which is the workflow you use when developing a
> > package for Emacs, for easily "reloading" the package for any kind of
> > changes by taken into account?
> >
> > Re-evaluating the entire, or loading the file, works for reloading
> > functions. But - as far as I know - does not work for reloading
> > defcustom initialization values.
> >
> > My package is for now something very simple consisting of one .el
> > file. I wonder how do you manage this when a package consists of many
> > .el files.
> >
> > Thank you all,
> >
> > Federico
> >
>


-- 
Lic. Federico G. Stilman
Stilman Research
Tel/Fax: (011) 4801 - 4605 / 4177
Cel.: (00 598) 94 066 771



reply via email to

[Prev in Thread] Current Thread [Next in Thread]