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.devel Subject: Re: [Elisp: 8 out of 10 problems] I think the last one! (point) Date: Sun, 11 Aug 2024 11:06:23 +0200 Message-ID: <87msljxwc0.fsf@dataswamp.org> References: <875xs7zzik.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13638"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Cancel-Lock: sha1:s+6e83ri1QCtJNFO8CQd089k2uc= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 11 11:56:20 2024 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 1sd5JD-0003Op-TW for ged-emacs-devel@m.gmane-mx.org; Sun, 11 Aug 2024 11:56:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sd5IV-0007A5-9r; Sun, 11 Aug 2024 05:55:35 -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 1sd4X9-0006NX-KM for emacs-devel@gnu.org; Sun, 11 Aug 2024 05:06:39 -0400 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 1sd4X7-000135-PN for emacs-devel@gnu.org; Sun, 11 Aug 2024 05:06:39 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1sd4X4-000AbR-HG for emacs-devel@gnu.org; Sun, 11 Aug 2024 11:06:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 11 Aug 2024 05:55:33 -0400 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:322634 Archived-At: Yuri Khan wrote: > You abbreviate words to the point their meaning is no longer > recognizable. 'beg' is a verb. Beg is quite common as argument names. I it also good that beg and end are as long short so they can be stapled. > 'sent' is a word in English that is the past or past > participle form of 'send'. That OTOH maybe wasn't so good. > Okay, I can make out 'begin' and 'length'. No, in particular length is really ugly and error-prone compared to beg, end and len. > Without looking, I do not understand at all what 'reg' is > supposed to mean. region? regexp? register? There is not really a good word for that that I can come up with, because to some people the region is a purely interactive feature when set. This is in practice not so, but maybe it should be? Anyway, obviously it isn't regexp as we write that as regexp or re for short. Register, from what century are you? The last one? :) Maybe -spn is better (for span, returning a tuple with (min max)). > Elisp and Emacs core libraries do not abbreviate words > except where traditional, I know - that is some of the problems I took up in that post. > and there's a good reason not to. Maybe good reasons. Speed, time, less error-prone and lesser strain on body and mind sitting and typing. Also less strain on eyes, elbows, less time spend in the sun etc. It should be clear, zsh i too cryptic for me if you use all the features, but Emacs is crazy verbose, here, set the region for interactive functions whenever it is read - yeah, why one has to do anything with it then, one can wonder but with Lisp, it is a lot of words. It doesn't have to be super-short but a lot of more conventions that are automated would be good. So for example below, region -> reg, beginning -> beg, instead of defun fun, "list" is actually not so pleasant to type so we change that to just l. That is 84 chars from 107 and much spacier and more relaxed. (fun use-reg () (if (use-reg-p) (l (region-beg) (reg-end)) (l nil nil))) (defun use-region () (if (use-region-p) (list (region-beginning) (region-end)) (list nil nil))) > An abbreviated word is harder to read Not always and you don't read code as you read a novel. > and sometimes harder to type because you have to choose the > correct one out of a number of possible abbreviations. Sometimes yes, the individual case will have to decide, but in general less chars to type, the faster it goes, for sure. > In many cases, typing a long word is a matter of M-TAB or > M-/. But that isn't typing :( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note: This message is about Emacs and Elisp. As long as Emacs ~~~~~ and Elisp are not off-topic om this list, don't tell me to go somewhere else. I can't and I don't want to, and, _all_ my posts are about Emacs, ELPA, and Elisp. As you can clearly see above. Also, I'm responding to someone. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- underground experts united https://dataswamp.org/~incal