From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.devel Subject: Re: Integration of Info manuals in programming modes Date: Sun, 15 Dec 2024 13:56:37 +0530 Message-ID: <87seqp8i82.fsf@gmail.com> References: <87ser8c230.fsf@jeremybryant.net> <86ser87rut.fsf@gnu.org> <87cyicuk25.fsf@melete.silentflame.com> <86jzcj6e4h.fsf@gnu.org> <87y10u6174.fsf@web.de> <86ldwuy3lu.fsf@gnu.org> <877c8ey0iu.fsf@gmail.com> <86ed2mxzj4.fsf@gnu.org> <87y10uwjc6.fsf@gmail.com> <865xnyxtsv.fsf@gnu.org> <87ttbiweqx.fsf@gmail.com> <86a5damj8c.fsf@gnu.org> <87plm6wbg4.fsf@gmail.com> <868qsumcir.fsf@gnu.org> 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="12607"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: arne_bab@web.de, rms@gnu.org, spwhitton@spwhitton.name, jb@jeremybryant.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 15 09:27:46 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 1tMjyb-00037X-RS for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Dec 2024 09:27:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMjxi-0005HA-Hd; Sun, 15 Dec 2024 03:26:50 -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 1tMjxg-0005Gm-Mk for emacs-devel@gnu.org; Sun, 15 Dec 2024 03:26:48 -0500 Original-Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMjxe-0008Td-QW; Sun, 15 Dec 2024 03:26:48 -0500 Original-Received: by mail-pf1-x443.google.com with SMTP id d2e1a72fcca58-728eccf836bso2643226b3a.1; Sun, 15 Dec 2024 00:26:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734251203; x=1734856003; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VB5gD2EKELB6evkX+0BqsZY4eJkd+MdoUmkHh54BRPE=; b=I1igfF56CnGSezJOjIzR31xRFOstcx1pbwCCyHrq4/l3WKUT3veg078c7nHK3O5tBD w2T4BBMHsvdM45HSFJLvmEglGD2XS0Ui1iAsvDOhRsxxvka4/3ILzZb/sKqCCEMf0UcD XRU5WOemtXQZ2XflcUVVJuUL96XIn8IZ0fnAja4BUcooHPYNIsncw8WjCvzUKvKVd8dW C2Z+3TKXatfpXfHdGWcfW1Fh9DrGdwW0kQoNewq277gGJozC7Vpt59WmPNPj+4NTSBRg +iXSWUsHxsuQd9uygE9XXweIczjdVu7vFPnDnxxY17f9peMMuPsd2fjPDETrwyK+Q3Tb vxJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734251203; x=1734856003; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=V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AhuK7691dgEg4r0Wpa4A== X-Received: by 2002:a05:6a00:b46:b0:71e:4786:98ee with SMTP id d2e1a72fcca58-7290c2702e3mr13264157b3a.21.1734251203349; Sun, 15 Dec 2024 00:26:43 -0800 (PST) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac5183sm2661028b3a.29.2024.12.15.00.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Dec 2024 00:26:42 -0800 (PST) In-Reply-To: <868qsumcir.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Dec 2024 16:26:36 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x443.google.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, RCVD_IN_DNSWL_NONE=-0.0001, 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:326520 Archived-At: [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9F= =E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 05, 2024] E= li Zaretskii wrote: >> From: Visuwesh >> Cc: arne_bab@web.de, rms@gnu.org, spwhitton@spwhitton.name, >> jb@jeremybryant.net, emacs-devel@gnu.org >> Date: Thu, 05 Dec 2024 18:09:39 +0530 >>=20 >> [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE= =9F=E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 05, 2024= ] Eli Zaretskii wrote: >>=20 >> >> > However, maybe the regexp should only match keywords in upper-case, >> >> > and ignore-case should not be used? >> >>=20 >> >> But Fortran is a case-insensitive language and recent style-guides ask >> >> you to use lower case lettering for everything. Other code that I've >> >> seen use upper case lettering for keywords, not for functions and >> >> subroutines so we cannot opt for this route unfortunately. >> > >> > What is important in this context is not whether Fortran is >> > case-insensitive, but how the index of the manual spells the keywords. >>=20 >> I do not really understand how info-lookup does its job but 'read' still >> matches if I use >>=20 >> (info-lookup-maybe-add-help >> :mode 'f90-mode >> :parse-rule "[A-Za-z0-9_]+" >> :regexp "[A-Z0-9_]+" >> :doc-spec '(("(gfortran)Keyword Index"))) >>=20 >> instead. Perhaps I do not understand what you have in mind. > > Maybe it's deeper in the bowels of the code, maybe even in info.el. > E.g., info.el could bind case-fold-search non-nil when looking up > index items. It wasn't info.el but info-look.el that does not bind case-fold-search to nil so case-sensitive :regexp fails above. To get info-look.el to restrict to upper case entries in the node, I had to add a TRANS-FUNC in :doc-spec like below: (info-lookup-maybe-add-help :mode 'f90-mode :regexp "[A-Z0-9_]+" :parse-rule "[a-zA-Z0-9_]+" :doc-spec `(("(gfortran)Keyword Index" ,(lambda (item) (let ((case-fold-search nil)) (and (string-match-p "\\`[A-Z0-9_]+\\'" item) item)))))) fortran-mode should have this too but I am unsure how to specify two modes. Saying :other-modes '(fortran-mode) did not do the job. BTW, all :ignore-case does is downcase the matched Info index items when creating info-lookup-cache and bind completion-ignore-case accordingly for C-h S.