From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: chad Newsgroups: gmane.emacs.devel Subject: Re: interactive feel of Emacs: the need for speed, and -Q [measure.el] Date: Thu, 23 Apr 2020 16:35:16 -0700 Message-ID: References: <87tv26qvwh.fsf@ebih.ebihd> <87mu7njm9h.fsf@ebih.ebihd> <87h7xv44xr.fsf@md5i.com> <875zeasexm.fsf@ebih.ebihd> <87d08i3vvk.fsf@md5i.com> <87h7xph5a4.fsf@ebih.ebihd> <87sgh4ah4x.fsf@tcd.ie> <86imhzgs5f.fsf@stephe-leake.org> <2c7cfff7-240f-6444-9a79-b5c36b381272@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000020858d05a3fdb4be" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="67463"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= , EMACS development team To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 24 01:36:20 2020 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 1jRlOG-000HQ0-2n for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Apr 2020 01:36:20 +0200 Original-Received: from localhost ([::1]:45202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRlOF-0008MM-4x for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Apr 2020 19:36:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54144) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRlNW-0007pO-Co for emacs-devel@gnu.org; Thu, 23 Apr 2020 19:35:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRlNR-0004mC-Ia for emacs-devel@gnu.org; Thu, 23 Apr 2020 19:35:34 -0400 Original-Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]:32978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jRlNR-0004iD-3O for emacs-devel@gnu.org; Thu, 23 Apr 2020 19:35:29 -0400 Original-Received: by mail-yb1-xb32.google.com with SMTP id v128so669130yba.0 for ; Thu, 23 Apr 2020 16:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2anwS8F0Zci3gZ5OiFV1JyhmfaAsjU42Cww4H+fG7/8=; b=Cc3nfprjfhn2/rsd1XPXHFt/KP7R0uXf06Xh5hmgJlY2+H2fk9hqVjT1wSk3T3DQoF 0XD/gFp9TjuZuysb99WFvHlO5Ls/OEthHaH3MYSyK/8hXrVs7wgbC9+9FMm4ExTIYePZ mdkp2h0Yp3bFe/2UbV59IkhQV6uMa72KQHi2l9z85WFKPtb5Cmm1dihnXRxa0Lcir60R eFSQv8UoAne6JjVQGw76GHE3CspjhSlxWw4VO2cj4rvQW/GZVAzbCcUZz8Qh1ifT3823 oJBBGcX+FrbjRDFzeO5CGH6R634Kl2DD17U9mCfCbEaXepnVVLnN+Y7EhOXHofAFz5Bi 62oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2anwS8F0Zci3gZ5OiFV1JyhmfaAsjU42Cww4H+fG7/8=; b=VF1e0qhZTlyQgtzYyNQ56l6zXydrsftaaBJHYUD4cvQAYE5LhBacQ0fa9b6nXTmxXH d7HMCWgONrvIm5L7mV0YsLv6Ws6Xdi+6AJnf44KYKJM1828GZo6z8InjnwAmok2ZJgZ0 vfVKpMT3INjKxhuC/PTqUfRCq+eE7Z6UEBylvdY60sRv1t9/R2CCgKbvIEzXEyTj58Bz bxrCYdRF4cXG0faTzHengetXJblId/TGv5raZN1YV9iv/a3q9E41bQ9It/5pPYnlPgqs kkKxQJBXd+q0kIcjSaQZI1QEup8oalJkNmMkny/e938uNa68UUYNRBvxnYZ2eCN7cewa Mvmg== X-Gm-Message-State: AGi0PuZRT7Z7pDBhySw/9ti0pgiQFgwmU6ht0lqo2xm9toUnUTw6vQ2I YWjCgYLv85jiYw1io+AkwKps+IoedKQRbDozM3Q= X-Google-Smtp-Source: APiQypL/Js6YefgcdpoA33URKrjjscMbJ6rK3nr1WyOG1/9YyGaQa/TIgvpVvvKyHJ2o+FYOcx3hEeHqsIeBdPhRaUg= X-Received: by 2002:a5b:9cb:: with SMTP id y11mr10955075ybq.177.1587684927635; Thu, 23 Apr 2020 16:35:27 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b32; envelope-from=yandros@gmail.com; helo=mail-yb1-xb32.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::b32 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:247642 Archived-At: --00000000000020858d05a3fdb4be Content-Type: text/plain; charset="UTF-8" I'm loading code that I wrote, because I don't maintain my emacs configuration as a single big pile of elisp used on every system (I grew up in a very heterogenous environment at MIT). The code is safe to load multiple times; I avoid doing so to avoid the overhead, and because in a more complicated past there were include-loops to avoid. At some point in the middle, I built myself a pair of functions enable-quiet/disable-quiet to handle this sort of thing; it sounds like maybe I should dust that off again. FWIW, I wonder if anyone here would recommend building it around load-file or require, and why. Thanks! ~Chad On Thu, Apr 23, 2020 at 1:57 PM Stefan Monnier wrote: > > I long ago adopted the use of require in my .emacs file as a well-worn > > shorthand for "load this unless it's already loaded". Is there an > > alternative that I should be using instead? > > If what you want is "load this unless it's already loaded", then > `require` is the answer. But the code in ~/.emacs should not about > about "loading" it should be about enabling/disabling: loading a file > (other than the init file, that is) should never noticeably affect > Emacs's behavior, so "loading" should be of no concern when writing your > config file (unless you're concerned about pre-loading a package for > performance reasons, maybe). > > > Stefan > > --00000000000020858d05a3fdb4be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm loading code that I wrote, because I don't mai= ntain my emacs configuration as a single big pile of elisp used on every sy= stem (I grew up in a very heterogenous=C2=A0environment at MIT). The code i= s safe to load multiple times; I avoid doing so to avoid the overhead, and = because in a more complicated past there were include-loops to avoid. At so= me point in the middle, I built myself a pair of functions enable-quiet/dis= able-quiet to handle this sort of thing; it sounds like maybe I should dust= that off again. FWIW, I wonder if anyone here would recommend building=C2= =A0it around load-file or require, and why.

Thanks!
~Chad

On Thu, Apr 23, 2020 at 1:57 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote= :
> I long ag= o adopted the use of require in my .emacs file as a well-worn
> shorthand for "load this unless it's already loaded". Is= there an
> alternative that I should be using instead?

If what you want is "load this unless it's already loaded", t= hen
`require` is the answer.=C2=A0 But the code in ~/.emacs should not about about "loading" it should be about enabling/disabling: loading a = file
(other than the init file, that is) should never noticeably affect
Emacs's behavior, so "loading" should be of no concern when w= riting your
config file (unless you're concerned about pre-loading a package for performance reasons, maybe).


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--00000000000020858d05a3fdb4be--