From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Lic. Federico G. Stilman" Newsgroups: gmane.emacs.devel Subject: Re: Best (or common) pratices on package development workflow Date: Thu, 1 Jun 2023 22:08:34 -0300 Message-ID: References: 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="31870"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ruijie Yu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 02 03:09:47 2023 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 1q4tIY-00087u-3P for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Jun 2023 03:09:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4tHf-00071m-3i; Thu, 01 Jun 2023 21:08:51 -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 1q4tHd-00071K-6y for emacs-devel@gnu.org; Thu, 01 Jun 2023 21:08:49 -0400 Original-Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q4tHb-0007gY-JZ for emacs-devel@gnu.org; Thu, 01 Jun 2023 21:08:48 -0400 Original-Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-5556e2bddf9so870237eaf.1 for ; Thu, 01 Jun 2023 18:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685668126; x=1688260126; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3C7k1uJvf1wEt0dVBBmE6hCcHaN1M7cGEj+12n/Kkq4=; b=KQhXOPyj1RJstXJXCvLlSeuPDuIxXjy/rQZBGYgVTaCwBoX97FgEziMQu1ZIHPCG4I cC/PSjMW8V8QlknTEMpcI8T1i3bwKV8atLgIKfM1I7rh73yJyecIn5fj05J8O/eME92l FEsU1vMaodgqqzQf9LtYacWxbdVFWD6St1EoDdI+xVpCHXhhzbykeugtbcTLTc55wfBK MijMhUEqcGPUQmySAPJdyFuDyEUl2kBwTQU12br8eLbZdCQFT8Cl47VyyInavHFMuQyi 4wbyySDjhp54EkxdAQYWDMxRSNtMWG47ZRUhPFD+xo4utcinJDnDuCWbm1d00wm+9hf5 O6Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685668126; x=1688260126; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3C7k1uJvf1wEt0dVBBmE6hCcHaN1M7cGEj+12n/Kkq4=; b=dUTsKQ+XRlACUTTmgLc1kVssMR1ve4O/LPmc+csBhiFB+9IPo5iVxYUxUTXVtnQUvU 1aDpszAYY617Q0lzLddQqUR4o+ir/thOXBZFR2hpquP8mpkz4DbuY/02oeO3M6W7xeCZ eZftAth7iFOxBhINQf+XFWBzbykjLeKLrREUpRsP6Z7SdsOmOX1HLTfLlQbtDMInXXzT eZeyE7DbKMfLDz9+tdzPuz/fashuv9U8g8a3N+yuc9dhN4hXyVV3WKfWoA6mB205lzcs wAdvS3NounFFhdhxINiHATxpQSc/LGzGWM0rSIutEkzEicd4KmQtUk/pzsv7+kSYeGWO 8/Kw== X-Gm-Message-State: AC+VfDzpsmjrqT/eNw7/YvX/fDVgtMSiAVvxRmU9hJx6aR/KTZ5DslUi BBAkkILIEqY2mMuXPsEW3+0KzGhJ1TcarLOksnUzJzdWn0U= X-Google-Smtp-Source: ACHHUZ6Cggo7bIdBABuN4G5sLUesj0p8KYhnRcjV3RRAJjjHUIB/t3s3THWcA4/6DJv9kdV4HYvtAum+Q5EVZXA28wA= X-Received: by 2002:a05:6358:4303:b0:123:615d:2276 with SMTP id r3-20020a056358430300b00123615d2276mr4897353rwc.11.1685668126207; Thu, 01 Jun 2023 18:08:46 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::c29; envelope-from=fstilman@gmail.com; helo=mail-oo1-xc29.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:306537 Archived-At: 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, --=20 Federico On Thu, Jun 1, 2023 at 8:51=E2=80=AFPM Ruijie Yu wrote: > > On Jun 2, 2023, at 07:12, Lic. Federico G. Stilman w= rote: > > > > =EF=BB=BFHi 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 fil= e. > > > > 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 i= s a variable). See the docstring of C-M-x for details. > > When for some reason I don=E2=80=99t feel like doing that, I would use ei= ther 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 > > > --=20 Lic. Federico G. Stilman Stilman Research Tel/Fax: (011) 4801 - 4605 / 4177 Cel.: (00 598) 94 066 771