From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Patch proposal: display symbol source code in help buffers Date: Tue, 21 Sep 2021 18:52:10 +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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35463"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 21 18:53:10 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 1mSj14-00095L-AI for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Sep 2021 18:53:10 +0200 Original-Received: from localhost ([::1]:43222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSj13-000068-2q for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Sep 2021 12:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSj0B-00073E-Im for emacs-devel@gnu.org; Tue, 21 Sep 2021 12:52:15 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSj09-00022L-KW for emacs-devel@gnu.org; Tue, 21 Sep 2021 12:52:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1632243131; bh=oFcci5EXQEQiJ59yXZmF3G0H6xMBF7QdNNL+U58DpzU=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=PEljW0kt1UvTQcyPDAKyPvd7YYzHDg3bLd4NO/elb1P3JIaO66+cLUW3pKnNUzEPr sQAds86x6V80L5WySkxdksjHWINQrbAcovL9JTMh4+vwlGgjmYsZVlYa4/LC7UUfcX +vc9DujMoj9i/FInYER69HpGBU58AeOBhBdjpnQc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([46.125.249.59]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N1fis-1mr9f90KyG-0122lI; Tue, 21 Sep 2021 18:52:11 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:8vINVnveA/FBvG98KZqHYnuMEim7KInwJFBv27+k02ZXCz3gtC4 qRpk+lRWOokuuWTC1HfJoME0mooC0pmyyKh1avN0v+2+6SGKf3NiJ8T50Jwd7cmxVvhlmL/ 7eTlaeW+v+Uc0cf+Q2zKhvlUbcVj3lM0WRQ9CAXUNpon8dvHA6wXzD4RxgooiB9c68GWO9S 7B/2FtG7ssoqEf4o1jlnw== X-UI-Out-Filterresults: notjunk:1;V03:K0:NCH1ouzSDlI=:dhBNg+dgo9mQy8O0caxf/B 3sTht2gC9n1MoOMte5CeSyQIRICodySkMSS8tzTQzM7Mqz1nitDhLG2R5Un4dyneap1QB+Cxa jQ+f8pYsgPRGHC5zyWyW2LPAvruPSLBLL6hDQuYP7TwImy1gCVRE2fQQNNqdu+XrfOSuda0fL LfSQPvN9GVV10/AHL/CoQ1aLQpqJnohLnDrYj1u2K6C11OH/dB3dOlqPI4vIQ4a9ncVDbnDSS kbpZmAfyuXedhUhqOmmwGKHKrO9dit0/oFri/5QVMOkAwEGv9OMkWeF1YNj3SEF+smSgJTtte 94n1XtUZ8w/hk/mUta5VFSwUKZkIKoH7JmS/j10QzWgKraBkHmmOh4eV2OyPAzx98fMOGU7wv BYcbSEyb1ti8oWUwFAGffmuQXb6budNEjBHR1NltLZJLqQRyhGt0yAu7OIyqtxySGf2KQnCnc OPB2VviolVxWAodK1vSUuikpTryCfBojpFrCp6zg0ZfaYndtGZjGIUAqyYDJx9EvcAM4oGqYX 0Y9BlGKEU6oz15w61HGu7IeAeoNm4vTOzukrskXJ1+WMOYxIKxtTNPqLn3VTDi9QdVBZapG1k lHh5Chj8fMHoSnF3fCng9K0+EPjYW9oK7q98sdxLe9y5McT7ALgvTFyoUn3BVLq5a7kCGRBY9 DvZUV192nB3KcF1q+hLUdLIjk8o4j+8I0cgoWAdXfPGTfiSucwAZF+4zQYdr0/6KsG+niq8yM RgnR+0IdUsSuMAeMHOxKzq1Bsph5JT46OFe28kdlrYkbXoQs5jyXNyZ+D7ReH3gvm4Ic+UyH Received-SPF: pass client-ip=212.227.15.15; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:275253 Archived-At: >>> It would be nice to make it fit to N lines in height, and C columns = in width, >>> i.e. to make it fit to certain size. >> >> Who would specify that "certain size"? > User, of course, who else? We put some default size and a defcuctom fo= r user to > change, as always? Do you mean "one size fits all"? I'm afraid I don't understand what you intend here. > Let's > have a face lift for built in help for 28. I am sure we could debate f= or years > and always someone will like it differently. Let's have something that= works. That something will take its time to be written. Certainly not before Emacs 28 comes out. > I haven't read the other thread, but I have used help and why I think= it is > good, and some other have as well. There are two threads and I think you should read them if you plan to change anything in this area. > Can you try what I send in yesterday, with soucre view toggle? I think= it works > quite nice (I did a misstake and went 1 row too far when deleting, but= that's a > trivial to fix). Compiling it tells me =2E./../lisp/help-mode.el:530:22: Warning: the function =E2=80=98find-function-advised-original=E2=80=99 is not known to be = defined. so it should require 'find-func'. A few remarks: +(defcustom help-mode-inline-source nil + "Display inlined source code for SYMBOL in `help-mode' buffer. What is SYMBOL here? + "Find C source code for a Lisp symbol in a `file'. + +sym is the symbol to find. +type is the type as obtained by 'describe-*' functions. +file is the source file to search in." Arguments should be uppercase and not hyphenated. + (with-no-warnings (font-lock-fontify-buffer))) Do you know how long it takes to fontify xdisp.c? With a non-optimized build, C-h v for 'scroll-minibuffer-conservatively' takes more than 10 seconds here. Other than that I can only say that this is _one_ possible option for showing the source of the code. BTW, we should decide on a suitable interface for 'help-toggle-source-view' probably using the button for showing the code. martin