From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: HTML info Date: Fri, 24 Dec 2021 10:34:34 +0200 Organization: LINKOV.NET Message-ID: <86mtkqjtq5.fsf@mail.linkov.net> References: <87zgosdbo1.fsf@gnus.org> <86mtkszhnq.fsf@mail.linkov.net> <87o858e5r2.fsf@gnu.org> <86fsqjcqd8.fsf@mail.linkov.net> <87zgor41oc.fsf@gnus.org> <86lf0b6uf0.fsf@mail.linkov.net> <87v8zf40qw.fsf@gnus.org> <8635mj5ept.fsf@mail.linkov.net> <83pmpnt7s5.fsf@gnu.org> <83ilvft6ru.fsf@gnu.org> <91625EFE-6771-4C17-B388-A0E3DBC3A9E6@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11746"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , Eli Zaretskii , emacs-devel@gnu.org, Stefan Monnier , tsdh@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 24 09:48:41 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 1n0gFk-0002t2-Pr for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Dec 2021 09:48:40 +0100 Original-Received: from localhost ([::1]:35206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0gFj-0003C7-E9 for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Dec 2021 03:48:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0gBN-0000Xk-Jk for emacs-devel@gnu.org; Fri, 24 Dec 2021 03:44:13 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:38433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0gBJ-00035Z-Vz; Fri, 24 Dec 2021 03:44:08 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 7C7076000B; Fri, 24 Dec 2021 08:44:00 +0000 (UTC) In-Reply-To: <91625EFE-6771-4C17-B388-A0E3DBC3A9E6@gmail.com> (Yuan Fu's message of "Thu, 23 Dec 2021 12:48:55 -0800") Received-SPF: pass client-ip=217.70.183.195; envelope-from=juri@linkov.net; helo=relay3-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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" Xref: news.gmane.io gmane.emacs.devel:283105 Archived-At: > I’m a bit confused. In order to have variable-pitch info’s. What do we > need to do and what do makeinfo maintainers need to do? What we can already do is to at least display Emacs manuals from HTML generated by `make html`. > Disregard of where will the HTML info files be, whether they will be > in a single file, whether distributions will distribute HTML info > files, what do we need to do in order to at least support reading HTML > info files like .info files? > > Is it a good idea that we start from a major mode Info-html-mode that > can view manuals in either a single or multiple HTML files, that > supports various info commands? Most of the core package info.el deals with handling of the Info format. Take for example Info-search. What it mostly does is parsing the Info file's tag table and visiting Info subfiles. All this is not needed for HTML. Instead of this, the HTML search function will have other problems: how to skip text in HTML tags, e.g. searching for the word "href" should not match it as the HTML attribute in ‘...’, etc. OTOH, some of Info-search code should be reused in HTML Info files: - the key ‘s’ bound in Info-mode-map should still call ‘Info-search’; - the interactive spec should be used without changes for HTML search; - such code (signal 'user-search-failed (list regexp "end of manual")) should be reused, etc. (And most isearch functions in info.el are already general enough that can be used for both Info and HTML formats, except the Info-format specific ‘Info-isearch-filter’.) So we have at least 3 choices: 1. Intersperse the existing Info-search with such conditionals: (if info-html-minor (search-forward "
") (search-forward "\n\^_\nIndirect:")) 2. Add more hooks to every Info top command, so Info-html-mode could register own handlers: (add-hook 'Info-search-function 'Info-html-search) 3. Completely duplicate all top Info commands in a new package info-html.el.