From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: wilnerthomas--- via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: RE: [External] : Re: Setting up abbrev Date: Mon, 1 Aug 2022 18:57:57 +0200 (CEST) Message-ID: References: <87k07sfywz.fsf@dataswamp.org> <87tu6wchw5.fsf@dataswamp.org> <87zggoatct.fsf@dataswamp.org> Reply-To: wilnerthomas@tutanota.com 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="13197"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emanuel Berg , "help-gnu-emacs@gnu.org" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 19:12:50 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 1oIYyI-0003Bu-1y for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 19:12:50 +0200 Original-Received: from localhost ([::1]:44710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIYyH-0006tk-5l for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 13:12:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIYk0-0002xD-Fn for help-gnu-emacs@gnu.org; Mon, 01 Aug 2022 12:58:04 -0400 Original-Received: from w1.tutanota.de ([81.3.6.162]:40774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIYjx-0002ej-Bs for help-gnu-emacs@gnu.org; Mon, 01 Aug 2022 12:58:04 -0400 Original-Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id CFFCFFBF922; Mon, 1 Aug 2022 16:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1659373077; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=/lb2iSjygyiPmHV4lWD2gCA84C5fwyHWF4kXAiq0SSo=; b=HA7Ls6Ah7XamDuiDxOrGPnLqmBQVyv5rnz/UjTZ6TVn7r3hEQMG9sIen2bow123B AMp2vjyqp7kk9TKPxBO0qrTs5Ly7/JKlNGMjNeOHZtsUfgxEYzLGAquhMRLL9ms1SKv 3/TObodaxAG81+Io85H+j9H5x+K/c84GzJ3czuZYezIlyrIiTTV+yYPumkx8chBxzuA qGNxikBWt7LT1YBLVu6rXuBKmTdWZ9TTY4WGtyTVCA6C5OeOsJCBsQPb5NOiXFurw7z f0aBkBMqxkb87keBmfhDQASYkMXL4QjYcXMtX1rJYZvbVVYz6oeH8UkC1x7ssj/thDG ppVi3qgi3A== In-Reply-To: Received-SPF: pass client-ip=81.3.6.162; envelope-from=wilnerthomas@tutanota.com; helo=w1.tutanota.de 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, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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" Xref: news.gmane.io gmane.emacs.help:138727 Archived-At: Aug 1, 2022, 16:36 by drew.adams@oracle.com: >> >> Only a pair is a list as well ... >> > >> > Yes. But a list isn't a pair. ;-) >> >> Every pair is a list but every list isn't a pair ... >> > | > not every list is a pair > > "Not every X is" =3D "some X isn't" !=3D "every X isn't" > >> Well, maybe one can think of a pair without order, i.e. >> a set of two items? >> >> The _ordered_ pair is the universal data structure that can >> express anything then. The list is equally universal but the >> ordered pair is the minimal working example, to speak with the >> LaTeX guys ... >> > > Yes, ordered pair. That's a cons. > >> > As for the (a . b) _notation_: Why not? JSON uses `:'. >> > Prolog uses `|'. Doesn't matter much what notation you >> > choose. OOPs often use a dot notation for method >> > application. Six of one; half a dozen of another... >> >> Okay, but I still don't understand the benefit of using it in >> practice compared to the list (a b)? >> > > Do you mean use the _notation_? I guess you instead > mean use a dotted list: a list whose last cdr is a > non-nil atom. > > If so, the answer is that in general you do want to > use a true/proper list (last cdr is nil), and NOT a > dotted list. For many reasons, not least of which > is using a function that needs to traverse all list > elements (e.g. `length', mapping/sequence functions). > > You can use a dotted list in these cases: > > 1. You want to save conses (not create so many), in > a context where you're not going to be needing to > use the cons as a list (mapping etc.), or a context > where you know you'll only ever want an atom cdr. > > 2. You want/need, in effect, to have a backwards > key-value pair, (list-value . atom-key). You have > a list to use for most purposes (ignoring the last > cdr), and you have an atom (the cdr) for a few rare > purposes, as a kind of label for the list. > > #2 is usually the result of trying to adapt to > legacy code that expects to treat just a list (and > doesn't need to follow it to its end). IOW, #2 is > typically an ugly hack. For new code you'd instead > just put the atom first: (atom-key . list-value). > You are all very good at technical entertainment but not how to show the wa= y to use multiple lists. (setq=C2=A0 tb2=C2=A0 '( ("all" "l")=C2=A0 ("as" "as") )) (setq=C2=A0 tb3=C2=A0 '( ("again" "ag")=C2=A0 ("any" "n") )) (define-abbrev-table 'global-abbrev-table tb1) (define-abbrev-table 'global-abbrev-table tb2)