From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Helpful in Emacs? Date: Thu, 09 Sep 2021 22:23:08 +0200 Message-ID: References: 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="4027"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: me@wilfred.me.uk, Stefan Kangas , Emacs developers To: Daniel =?utf-8?Q?Mart=C3=ADn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 09 22:24:29 2021 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 1mOQaz-0000rr-3E for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Sep 2021 22:24:29 +0200 Original-Received: from localhost ([::1]:58152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOQax-0006JH-2b for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Sep 2021 16:24:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOQZn-0005cJ-9q for emacs-devel@gnu.org; Thu, 09 Sep 2021 16:23:15 -0400 Original-Received: from mail-db8eur05olkn2038.outbound.protection.outlook.com ([40.92.89.38]:40991 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOQZk-0006KP-7y for emacs-devel@gnu.org; Thu, 09 Sep 2021 16:23:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bbo85I1N/taRpZkfnRy2FB30xC3XO7zL4z7gNVjD9uQTZ7TxHapZZhQxIXasXt9r474PrjxgCy3NIGwY1Q75UTZ74jJQEcJ3VrIvMxY12oZ+WYfiF6rSX9rk9qZPCgwJ2p7B2GVzIoEAfxeGsk1zSPf1xRhi/ohyIfh1QCKNrp6O3yp+QVKRapY9KF35L3nn9jONBu0JV2JoQkanwTy2eSC6uJRpz8xwj1N9isRCfAFXkGIEGKiycfSxfth79fywzR9wCK2BbLy55LUwa2QNjdrW3JBoOE3PkoJ5S18DTChQ0g/v1S08u4r+dfgWNdzkf5snwagqRVS6FOM9leaQXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9pHQuyzxOlljDmjz3xnWCgDDK8Ij4NvhaZ6hneLzC1E=; b=TMnN8S74dmXPn3MnxlSNmNFKeVL1w0sgDYuZ3XjX5wiuBnyV2MzoPAWzwaqM+VGLvGRljgzFWM8gafHAEa3GH98FAw51HDRKCdbBKZN9a24qAkTxB0pFYNJiy3Pz3v38Rw9I81QJUSwR4c8ingROHfblkZvLmZu0N3uJ7rOZxizEc5gRqPLt3lcRSLcQf/KeqejPTKjApCsvOozHwe88XX2UXhXLgY1L17ZJwQpxgJ9tyIrJ2FRnREh14nGooG+4q1F347iOSc6l/aAlqyCL5ymCkG2fAM/WOgJhC+nZQE81fxiu3SGK6fNy7JUFjKp7Pib0L8nHJ37/seFQWb/WSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9pHQuyzxOlljDmjz3xnWCgDDK8Ij4NvhaZ6hneLzC1E=; b=QZYvxmsbdkTPF+0sz/yqsbjwFM7wPLArximcPEXYhTCOmzb8CZTb66UWHBBQVFHMAnqfk2V4f/sIcAp+0Mg4+EyhcyRov/MfatGcgfE4W3ozYL+IP7XKGkN3JAOWT8ANaydlpxD+XwOHkt50NXFemCJGUm6mAmadGEm9l245a4DtguSDU4sYOlJL6wqdGsU4qEhoPPXglCQUR1qvDilaV8upQ3bYcGgeD4jxICaHon59ftbkddZdCbmojdT5UG53Q/jEkOonvAqxNO55RxYhT7GtPIKJz+TPdXdCmR4B6kkTKl5no8mOUYLfYTtzq3TE866oCfdLQ7IIJExDjT1qEw== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM9PR09MB4771.eurprd09.prod.outlook.com (2603:10a6:20b:284::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Thu, 9 Sep 2021 20:23:09 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c55c:ece5:bed2:a9dc]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c55c:ece5:bed2:a9dc%8]) with mapi id 15.20.4500.016; Thu, 9 Sep 2021 20:23:09 +0000 In-Reply-To: ("Daniel =?utf-8?Q?Mart=C3=ADn=22's?= message of "Thu, 09 Sep 2021 17:21:30 +0200") X-TMN: [8/ihjjDuQun0jeV+Y2EK34E2PtS1MWEn] X-ClientProxiedBy: AM6P191CA0039.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::16) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87ilz9wlar.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AM6P191CA0039.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Thu, 9 Sep 2021 20:23:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 97821b1d-0b01-40c4-b866-08d973cfa3c0 X-MS-TrafficTypeDiagnostic: AM9PR09MB4771: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zd9Au45hK1Iy8S2HBn4gPtZwsJoQkdLRWfDy0WrAH9cu/BX9lUwTPbtfQSok/qdbLlAfPpz3r4Es+3yEuqgAlHm64TdXTLL6Pnj7/wVF22dxN4oS40uhe0/P3TUb18FcNLr0BGZUDJU6sboPLIRJKrYMEVAtyyqSzD/BMmyMJ3VYpcndKhk6r/WnmqxhTOq+G2WXmD1LbhI7jvXfi8UAv8pcNMyK68ix0b9PigzhvW29w04HG550wJRg08fz8yU6Js6YnLKyFVDO1dD+dXcHph8h4m0Z1YfCoAMkJe7bh7qejSjmWv7wdQE0epnS1Of06hpDbpEFfPKPSzEAA8azhDlKOYLzQstxVL1FJvUU5F/cujVvlxFfkwFmMCoXZBmECw8iprGaxPZjnoRshExBTHiuYiiJrrVdIcItwVRWZ6Lt+bhz+ieIzj8OPabLiGrXKOCJpslEoROSDMB9DAZVel3GDzG/QOKPjUdxgAyvLvM= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QNGhJ0AK429NtTsaL3aowH1/LNZGFnUJE1VLBFLtEOIxrCnK5fsX5tL+W3Ca0MW8bdzHjE5F9Aewl0G/qTX5/HZDFFBgC0pOV2SSHS1mo5LwxHFyHe2DJqTAfwofRLyb5JJ89EUqt4mYKL/NDvsacA== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-72e6e.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 97821b1d-0b01-40c4-b866-08d973cfa3c0 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2021 20:23:09.5881 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR09MB4771 Received-SPF: pass client-ip=40.92.89.38; envelope-from=arthur.miller@live.com; helo=EUR05-DB8-obe.outbound.protection.outlook.com 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, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:274473 Archived-At: Daniel Mart=C3=ADn writes: > Showing references to a symbol is an interesting feature (for example, > to learn how to use an ELisp API by looking at examples). I see that > Helpful provides this feature via the separate package elisp-refs > (https://github.com/Wilfred/elisp-refs). The closest package I know > that actually understands ELisp is el-search from ELPA, but elisp-refs > is a more specific package for the concrete use case of searching for > references. About elisp-refs, I have looked at that library this evening, after your mail, and I think it does the right thing. It uses read function to parse lisp files to find defs. I wrote a blog post= just yesterday about doing similar, but it was about collecting autoloads since = I am unhappy with built-in funcionality in autoload.el. I don't use package-quickstart.el but build my own autoloads file that suits my use pat= tern better. This request for helpful in Emacs started as I realized that helpfu= l lookups functions in source code rather than using docs stuffed in autoload= s, so I can have the cake and eat it too. Built in help can't show docs for a autoloaded function that is not loaded yet. My blog post is here: http://www.nextpoint.se/?p=3D890 (if you are interest= ed and have time :)) What do you need to build xref backend you mention? As mentioned on elisp-= refs gh page: "xref-find-references: This command is included in Emacs 25.1, but it's bas= ed on a text search. It is confused by comments and strings, and cannot distingui= sh between functions and variables." Would rebuilding this command to use read instead of text search do the thi= ng? I have never looked at xref code, so I have no idea how much work it is to re-build it though. Otherwise, about the read function and reading stuff from lisp files, two d= ays ago I have built a small program to extract all defined symbols (defvars, defcustoms, defuns and defmacros) from all lisp files in a directory tree, = and I save them in above mentioned database. I thought it would be slow, but it r= eally is fast. All symbols in Emacs lisp subdirectory are indexed in like 2 secon= ds and my entire elpa dir with ~200+ packages takes about 0.5 secs.=20