From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Size of startup files Date: Tue, 22 Nov 2022 00:10:55 +0100 Message-ID: <8735abj43k.fsf@dataswamp.org> References: <875yf9xvja.phibqa@vnoxvs.kbxpyjyhg.info> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2631"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:3fitD/18KCv9TFbUFaXaoOYgVig= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 22 02:32:51 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1oxI9a-0000PF-BQ for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 22 Nov 2022 02:32:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxI95-0001rl-II; Mon, 21 Nov 2022 20:32:19 -0500 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 1oxFwS-0005co-Rl for help-gnu-emacs@gnu.org; Mon, 21 Nov 2022 18:11:08 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxFwP-0000fk-I1 for help-gnu-emacs@gnu.org; Mon, 21 Nov 2022 18:11:08 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1oxFwN-0002wq-5H for help-gnu-emacs@gnu.org; Tue, 22 Nov 2022 00:11:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 21 Nov 2022 20:32:14 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141094 Archived-At: Stefan Monnier via Users list for the GNU Emacs text editor wrote: >> I just took a quick look and found that my startup files >> (called from .emacs and so on) amount to about 5,000 lines >> of elisp. Of course I comment extensively but at least half >> of this or more is actual code. > > My init file never reached that size: I think around the time it was > inching its way toward 2k lines I have 9 317 lines in 165 files ... > I decided I should change Emacs instead. So in a sense, my > init file is now somewhere around 2M lines :-( On the contrary, that's good for all of us! But on the whole, it is not a sane situation. What we should have is a set of libraries that have very basic and self-explicatory names, then it would be so easy to find out if some functionality is already available - and if not, where to add it ... For example, I'd like to have a math library for thing like the blow Elisp, which I have in my own Elisp at the moment ... (defalias '** #'expt) (defalias 'ceil #'ceiling) (defun // (nom denom) (/ nom denom 1.0) ) ;; (/ 8 256) ; 0 *oups* ;; (// 8 256) ; 0.03125 (defun mean-value (vs) (let*((sum (apply #'+ vs)) (mean (/ sum (length vs) 1.0)) ) mean) ) (defun percent (nom &optional denom str) (or denom (setq denom 1)) (let ((perc (/ nom denom 0.01))) (if str (format "%.1f%%" perc) perc))) ;; (percent 0.25) ; 25.0 ;; (percent 50 75) ; 66.66 ... ;; (percent (// 1 2) nil t) ; 50.0% ;; (percent 1019 22 t) ; 4631.8% -- underground experts united https://dataswamp.org/~incal