From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.devel Subject: Re: Colorizing source code in Info manuals Date: Wed, 11 Dec 2024 12:01:26 +0100 Message-ID: References: <87ttbh4v5l.fsf@web.de> <7d677941-c468-469a-acee-b0935097605a@imayhem.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1771"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: arne_bab@web.de, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 11 12:02:15 2024 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 1tLKTu-0000Ji-Cf for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Dec 2024 12:02:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLKTH-0006db-TR; Wed, 11 Dec 2024 06:01:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLKTF-0006dG-BF for emacs-devel@gnu.org; Wed, 11 Dec 2024 06:01:34 -0500 Original-Received: from mail.imayhem.com ([82.223.54.191] helo=zealous-pike.82-223-54-191.plesk.page) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLKTC-0004WI-Uy; Wed, 11 Dec 2024 06:01:33 -0500 Original-Received: from [192.168.68.102] (111.red-88-21-7.staticip.rima-tde.net [88.21.7.111]) by zealous-pike.82-223-54-191.plesk.page (Postfix) with ESMTPSA id 6735A80145; Wed, 11 Dec 2024 11:01:28 +0000 (UTC) Authentication-Results: zealous-pike.82-223-54-191.plesk.page; spf=pass (sender IP is 88.21.7.111) smtp.mailfrom=cpardo@imayhem.com smtp.helo=[192.168.68.102] Received-SPF: pass (zealous-pike.82-223-54-191.plesk.page: connection is authenticated) Content-Language: es-ES In-Reply-To: Received-SPF: pass client-ip=82.223.54.191; envelope-from=cpardo@imayhem.com; helo=zealous-pike.82-223-54-191.plesk.page X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326343 Archived-At: On 11/12/2024 5:33, Richard Stallman wrote: > > I think some 'cheap' changes in info, such as the presentation of source > > code and emacs key sequences, in my unqualified opinion, are worth the > > effort at this point. > > Would you please say specifically what extensions you're suggesting? > How would one use them? What jobs would they do? I suggest modifying makinfo to generate markers around certain text in its Info output, so that we can find them (with lisp) and change text properties. Those markers can be implemented using the construct that is used for images and indices, as Eli suggested. They are ignored by the standalone Info viewer when they are not recognized, so it will not be affected. We would put them around some commands, like: @kbd @key @code @example For @code, @kbd and @key, Emacs Info reader keeps the standard font, and ads quotes around it, making them in my opinion even harder to read. If you look at "A note for novices" on the Emacs lisp intro, which show many keys in the text, I think it its obvious that readability can be improved just by applying a different face to them. This is the starting line from 1.1 Lisp lists, on the Lisp intro: In Lisp, a list looks like this: ‘'(rose violet daisy buttercup)’. Would much easier without the quotes, and with a different face. And for the @example command, we can colorize the code according to the language. Also add some tricks like a button to copy the example.