From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: list of elisp primitives ? Date: Sun, 22 Dec 2019 09:31:23 -0800 (PST) Message-ID: References: <627F3815-987E-4E82-8118-EE559CA7721F@traduction-libre.org> <5E53A27C-7C86-4275-AC12-9799C3CB1956@traduction-libre.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="221899"; mail-complaints-to="usenet@blaine.gmane.org" To: Jean-Christophe Helary , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 22 18:34:18 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ij57Q-000vYB-6s for ged-emacs-devel@m.gmane.org; Sun, 22 Dec 2019 18:34:16 +0100 Original-Received: from localhost ([::1]:49652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ij57P-0007ID-2n for ged-emacs-devel@m.gmane.org; Sun, 22 Dec 2019 12:34:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60901) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ij56m-0006qH-2K for emacs-devel@gnu.org; Sun, 22 Dec 2019 12:33:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ij56k-0001IL-Ec for emacs-devel@gnu.org; Sun, 22 Dec 2019 12:33:35 -0500 Original-Received: from userp2120.oracle.com ([156.151.31.85]:46766) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ij56k-0001GE-4F for emacs-devel@gnu.org; Sun, 22 Dec 2019 12:33:34 -0500 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBMHTLRQ099443; Sun, 22 Dec 2019 17:33:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=zgPyxyirp/z4sDOUm54Jutpa8uUELYFY4+8SjmPR8bI=; b=oxkUZqhWglt8dBFWYS0NZXFvk6jkR7+HcnwAs4ZkOGi50VrImNAtAMyTu1VTaN2eCMz8 kUinSqE4ue/vToJYP9fxTcmMh5RQHd84qF63N/x3b9AQ7Ov3vjrbD9HGv2o2W2EOhZ7z 9ATC3J1UMlgpLnHxOXmNHnVYVCxhArb+8+4I5Rxc/KWj5pXJMT/Qr4KRB362h6HNAiQK Sv8rOLGDpCjaVL3RTH0cK2gH2dUqZwGxX2zOu75SG4cqwt3bGDLQqtoW2kzLwPxIVp10 KttDGLQ4YSm5xWq6uLuoFGPz9IJx1UypLV9qEsBaUcqd1dVgXURt91LMaWdp4stWs3g0 Nw== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 2x1c1qkpxu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Dec 2019 17:33:28 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBMHTZ3O171682; Sun, 22 Dec 2019 17:31:27 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2x1wj7u6cp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Dec 2019 17:31:27 +0000 Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id xBMHVO7A010221; Sun, 22 Dec 2019 17:31:26 GMT In-Reply-To: <5E53A27C-7C86-4275-AC12-9799C3CB1956@traduction-libre.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9479 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912220159 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9479 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912220159 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243563 Archived-At: > I'm trying ... to find a limited subset of > functions that one can use to program in elisp ^^^^^^^^^^^^^^^^ > and do non-trivial things but that do not ^^^^^^^^^^^^^^^^^^^^^ > involve searching the reference at all times. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ That's not what a list of subrs gives you, at all. A subr is just a function coded in C, not in Lisp. Likewise, for other things, such as variables, that might be defined in C. The choice of whether to implement something in C has nothing to do with, and is no guide for, ease in learning or how often something is used in typical Elisp code. And why do you think you need to search the reference at all times? > I'm thinking like in standard learners > dictionaries, there are clear indications, like > asterisks, that tell the learner whether the > word is basic (generally about 2000 words) or > intermediate (about 4000 words). >=20 > People who know the basic words can get by and > express most of what they need to express in daily life. Again, "basic" for a language learner has nothing to do with how a given language construct is implemented - in the case of Elisp, whether the construct is implemented in C or Lisp. Nothing at all. --- IMO, the biggest aid to learning Elisp is trying to _do_ (program) something in Lisp. Learning by doing. Yes, different people learn differently. But study combined with practice, in one form or another, is pretty much the golden rule. In the context of trying to do something with Elisp, the biggest aid, in addition to doc (which is not limited to the manual), is the source code. Using what exists, to do more, is really what it's about. Free source code is a learner's friend, at whatever level of learning. And in that context, the apropos commands or, better, a good completion system, can really help. They help, in particular, because Elisp constructs generally have names with relatively consistent components. If you don't have substring or regexp completion, and you don't have progressive completion (match multiple patterns, in any order), then at least use apropos. --- In my experience, the frequency of "needing" to look something up in the Elisp reference is not really greater when a beginner or a veteran. As one witness, I've been using Elisp and the reference for decades, and my use of the latter, in terms of frequency, has been pretty much constant over time. I might study different parts of it at different times, and I might return to certain parts. But it's not the case that I looked stuff up in the reference more when I was new to Emacs or Elisp. That said, early on I did sit down sometimes and just read through the manuals. But I doubt that most users proceed like that. (I do that with any product, especially one that has good doc.) And in any case, that was not looking something up; it was reading - for education and enjoyment. If it helped learning then I imagine that was mainly in the area of grasping concepts and finding out what's available. I'll also mention that I already knew Common Lisp before coming to Emacs. And in that case too, I sat down and read CLTL, cover to cover. Likewise, other Lisp dialects at the time. But learning to _use_ "basics" and non-basics of the languages came mostly by doing, not reading. --- Beyond subrs not helping to identify a list of "basic" building blocks for learners, coming up with any such list of constructs (ignoring where they're implemented) is problematic, IMO. What's basic for Lisp programming, in terms of the _most commonly used_ constructs, could be determined by counting (e.g. the distributed source code). But that information wouldn't get you very far, I think. =20 It might help more to know the frequency of use _within each particular "area"_ of Emacs use - buffers, windows, frames, overlays, chars, font-lock, keymaps, syntax tables, etc. The Elisp manual already gives you a general idea of such frequency or relative importance, by the fact that only a subset of existing constructs (function, vars, etc.) are covered in the reference. But even then, a particular use case might call for frequent use of constructs that aren't prominent, or even present, in the manual. Letting doing lead look-up is, again, the best approach. The manual can't know what you're trying to do in any particular case; it has to be a compromise, intended to fit most use cases and most users.