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: Patch proposal: display symbol source code in help buffers Date: Thu, 23 Sep 2021 00:38:28 +0200 Message-ID: References: <83bl4n3hys.fsf@gnu.org> <87fstz3g6z.fsf@no.workgroup> <9ada9a31-4e44-7941-e9a2-ada86ba4e36e@gmx.at> <3438b87f-b24a-3bc3-871f-84818868d445@gmx.at> <87lf3q2ahs.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26123"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Juri Linkov To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 23 00:39:59 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 1mTAuD-0006Y6-EM for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Sep 2021 00:39:58 +0200 Original-Received: from localhost ([::1]:52236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTAuC-0000rJ-0Z for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Sep 2021 18:39:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTAsu-0008W0-HI for emacs-devel@gnu.org; Wed, 22 Sep 2021 18:38:36 -0400 Original-Received: from mail-oln040092068026.outbound.protection.outlook.com ([40.92.68.26]:61571 helo=EUR02-HE1-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 1mTAsq-0001yZ-PR for emacs-devel@gnu.org; Wed, 22 Sep 2021 18:38:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cdH9h3m6bULEjsEAkAwWNSdizz58YsP+MTSvHifhVwtf7xa/RBsfOS4Pc63/G9CgP0kFpc/+J2w2K+oGHMjNaK+g/F8qJFelRv0iooDenyw/SIdOSDmdXhG+B8MAx2GMjGiDhV6QeeZH5uEn7lqPAXr10Aj3/5hdh68XYcU6T84pmY8clV/RGyC43tRkj6y2y5mwFzQTjiUciQYs19u9heT4//1pSsdGXQ5glrOcTt6jvaylYIEx12H168qHdyeQnyoKXkn0u/NlnMqd6yvV7XHOaRcCX4yBA7UD7UrYG+0YEH6p2bkx7O7Vf3lsbv2h5RUnye97S1pfXHTKzCJGMQ== 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=B6euKEYlT2uFUH2PptRWivK7Ji51QW9RqD8GM6dxx/w=; b=cjR0MTkJ6IQ07yD/3fVGt+kbZt8LYKl04K6kjK6ogP7w0p670tWU0bTH8SsvTHgj8/jTZAHz7eb9Gxb8cifAZ0XWdOEzlfi0racOpjroFdpjQfvYbhlg2KMEQwJdIOih9CgrC/S/+Q6rvnmaGfyg/hhkeE8AzBT+SazDiO1BF0Jo6SyRYzK/N7fz61wPu7OGcPfrv4DCe8wzfdD4eXJMR+mb6BJuXio4svCMn0aE5XAo3Iz/C5C1oW/EpLfjw20P47B5Y2G2x/7thfrooqiHkAafPLBL5LyJFKgLu1PergEfuq2H1OOWHpaoNEB59pPjgxk8IdXmv/A7fv5jcZ7KPg== 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=B6euKEYlT2uFUH2PptRWivK7Ji51QW9RqD8GM6dxx/w=; b=Z153kMze/4yjKYC+/aD5z4TKtMsYtTCxvsvUsFzqfDaiZ7uQWXasQMrxNm85v54vQmnYtdJBgxl+OArZoujnKIMrD1hxp3tjGhU0ZQNik0v051IYaNSJ85m/+BH5beynbG+PthyjaRnVTRBrguPnZvRwr0e/oDxqrkQqRAxOzjpMk93+k8MdZkXjeavEN7m84mZd73vpGsBkbWdCrysrNxyriEZV8P1eaUTrZYrJS3fLEp14v/54PU3oujRwO4Ap/5S3/i8PfMqkKObqr9CHLbiqprDRDovJeQlxlHIqzbFZCgXoIO2aZXiH4OTdhQwDTFSyEmTfgIMt1ptB5nt0KA== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM0PR09MB2387.eurprd09.prod.outlook.com (2603:10a6:208:e3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.18; Wed, 22 Sep 2021 22:38:29 +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.4544.013; Wed, 22 Sep 2021 22:38:29 +0000 In-Reply-To: (martin rudalics's message of "Wed, 22 Sep 2021 09:49:42 +0200") X-TMN: [7UOTZnKEojiPqeIeVURG7ffKBywXvt75] X-ClientProxiedBy: AS9PR06CA0269.eurprd06.prod.outlook.com (2603:10a6:20b:45f::32) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87sfxws0bf.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AS9PR06CA0269.eurprd06.prod.outlook.com (2603:10a6:20b:45f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Wed, 22 Sep 2021 22:38:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 04e075eb-b808-4a8a-a573-08d97e19b2d1 X-MS-TrafficTypeDiagnostic: AM0PR09MB2387: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +6A5/QzRTzttH0dX8gL40d8Oh2xAq4skZWsiYaK44PD4Mf0ZO1LvFS5W284QxdOa0gfv7mFeWpLcpUSocqcrDJkQ9cqBg+dnQ/R9yFcOaLpreUkpCWgI9N8+X1hWb7jtY5RbTuA2+EijHVyTV9DLtVcT+NZqNATsCf/ElxoiZJK67yvqc7HG4/u15ipuPmtIP9kJy6VfOohh14krT1ENNRG3Xh8q8GILckNgfIbJnPmUt5ULcNWYNWPVyjG+YnBQRzMjND1swf2EA+coRVSSpMk/K75iblsmLUNhAYX1sgdGv/9MOW9TafmwZeARh88Yzj0cM2pDY5W5ewBX4E0Q6b0ebPNVvHScnsYQofbooPgcVE0pCYFmXzLsA6Z4U1+y7nlbPzM4CktAEgXxHbY+43ZDDM2q+Am7+iNnVkB393Ab9wTe/ZUPeOanqlhALFQz X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yPXkCDA+FBx0wHQ83q9tJWYbqqoHVhjj4jGm9+vVYPfmtOULFGaoJSRrJ9jKlP4b8EGpJXtpVaS+FSd1eG5KbDkK0k/yFRpCRQdIvqKjEbFTU11Sx4KJvXx2XPuc7iCYv7dH67vyKpMAge2kSE/ZBg== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-72e6e.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 04e075eb-b808-4a8a-a573-08d97e19b2d1 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2021 22:38:29.2317 (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: AM0PR09MB2387 Received-SPF: pass client-ip=40.92.68.26; envelope-from=arthur.miller@live.com; helo=EUR02-HE1-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:275344 Archived-At: martin rudalics writes: >> That sounds like useful approach. Something like: >> >> (defcustom help-buffer-default-height 25 >> "The default height of a help-buffer window." >> :type 'fixnum >> :group 'help >> :version "28.1") <-- :-) > > Help-buffer windows are as a rule displayed via 'display-buffer' and are > easily recognizable because their buffer is always called *Help*. So > you can simply add a 'window-height' action alist entry for them which > is considerably more versatile than what you propose above. Yes, I know; but think of new users comming from other editors and applications, having no experience with Lisp and never heard of conses and alists. I use display-buffer-alist to achieve something with *Help* buffer (and some others) myself. I posted that snippet in the other thread I don't know if all that stuff existed back in time when original poster posted his bug repport (2011), but at least nowadays, the bug should be marked as resolved, since it is possible to tell Emacs to reuse Help buffer and window, instead of opening new ones. However, I don't think my solution to that problem, same as you suggest here, is very convenient to new users. People are used to see some option they can toggle on/off, some slider they can pull left right, some value they can pull from a list or enter into some box. I think it is more helpful to see some variable with clear and descriptive name, I think new users would appreciate that. But that is just my opinion. Anyway, I have read both threads you have refered too. One of them, the Florians, (Bug#9054), is completely unrelated to what this patch does. Well it is about help buffer, but there you are concerned with wath happens *before* user enters the help buffer and in which way user will come to that buffer. > Where to pop up the location of the source and how to get rid of > it is a question we currently discuss in Bug#9054 And that is exactly what I say above; this patch is completely not concerned with where and how you will pop that window and source code file. I am concerned with what happens in a help buffer, after user requested help, *not* how user come to that point. I don't even pop a source file; just code for a function or var. I wish to make help buffer more usable, because I wisth to go away from Helpful and I see no reason why we should wait for something unrelated you guys had 10 years to get consensus on but didn't :). Sorry, that one was hard not to pick on :). I know I sound biased, but the suggested patch works above my personal expectations. Suddenly the help buffer acts like a code browser. I really suggest you to try and click a bit around. It wasn't my intention, since I never do that in Helpful. I even don't know if it is possible there, but due to back/forward functionality in built-in help buffer, it works really nice. There is one bug I know off: it can't display code for *some* aliases, for example 'find' which is alias for cl-find. Some other aliases works fine. Besides that, I am very happy with it. > If and > when we reach a consensus there, we can add an option to immediately > display the source in the *Help* buffer or a window right below it I would like to cite Eli here from the other thread, and say "life is too short." :) I am sure you guys will come up with something wonderful and amazing, but untill you reach concensus, I'll go and work on some other options, because the proposed patch is my proposal. It came up completely unrelated and independent of that discussion, but it is touching the things you are discussing there. If the code is bad you can improve on it and rework it, but as I understand my proposal seems not be accepted, since I see you guys discuss options in the other thread (Bug#36767), which I have already implemented and demoed. Nobody but Tassilo has commented on, so I guess nobody has neither cared to try it nor see the demo. Anyway, thanks for your input in the other comment, it was helpful.