From: Visuwesh <visuweshm@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: arne_bab@web.de, rms@gnu.org, spwhitton@spwhitton.name,
jb@jeremybryant.net, emacs-devel@gnu.org
Subject: Re: Integration of Info manuals in programming modes
Date: Sun, 15 Dec 2024 13:56:37 +0530 [thread overview]
Message-ID: <87seqp8i82.fsf@gmail.com> (raw)
In-Reply-To: <868qsumcir.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Dec 2024 16:26:36 +0200")
[வியாழன் டிசம்பர் 05, 2024] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm@gmail.com>
>> 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
>>
>> [வியாழன் டிசம்பர் 05, 2024] Eli Zaretskii wrote:
>>
>> >> > However, maybe the regexp should only match keywords in upper-case,
>> >> > and ignore-case should not be used?
>> >>
>> >> 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.
>>
>> I do not really understand how info-lookup does its job but 'read' still
>> matches if I use
>>
>> (info-lookup-maybe-add-help
>> :mode 'f90-mode
>> :parse-rule "[A-Za-z0-9_]+"
>> :regexp "[A-Z0-9_]+"
>> :doc-spec '(("(gfortran)Keyword Index")))
>>
>> 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.
next prev parent reply other threads:[~2024-12-15 8:26 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-30 12:56 Proposal: Include C Manual from RMS in Emacs git, and/or release Jeremy Bryant
2024-11-30 13:25 ` Philip Kaludercic
2024-11-30 13:38 ` Arsen Arsenović
2024-11-30 14:12 ` Eli Zaretskii
2024-11-30 18:08 ` Arsen Arsenović
2024-11-30 20:05 ` Eli Zaretskii
2024-11-30 21:09 ` [External] : " Drew Adams
2024-12-01 6:15 ` Eli Zaretskii
2024-12-02 3:00 ` Texinfo reputation (was: Re: [External] : Re: Proposal: Include C Manual from RMS in Emacs git, and/or release) Max Nikulin
2024-12-02 12:47 ` Eli Zaretskii
2024-12-03 2:51 ` Texinfo reputation Max Nikulin
2024-12-03 12:38 ` Eli Zaretskii
2024-12-03 18:51 ` Dr. Arne Babenhauserheide
2024-12-05 4:56 ` Max Nikulin
2024-12-05 7:45 ` Dr. Arne Babenhauserheide
2024-12-06 4:47 ` Richard Stallman
2024-12-01 9:53 ` Proposal: Include C Manual from RMS in Emacs git, and/or release Arsen Arsenović
2024-12-01 10:12 ` Eli Zaretskii
2024-12-01 10:54 ` Arsen Arsenović
2024-12-01 13:04 ` Johan Myréen
2024-12-04 6:09 ` Richard Stallman
2024-11-30 13:50 ` Eli Zaretskii
2024-12-01 4:02 ` Sean Whitton
2024-12-01 7:45 ` Eli Zaretskii
2024-12-01 8:36 ` Sean Whitton
2024-12-01 10:01 ` Eli Zaretskii
2024-12-01 11:13 ` Sean Whitton
2024-12-05 5:05 ` Making the GNU C Manual easier to find in Info Richard Stallman
2024-12-05 6:30 ` Eli Zaretskii
2024-12-05 7:25 ` Integration of Info manuals in programming modes; was: " Dr. Arne Babenhauserheide
2024-12-05 7:46 ` Integration of Info manuals in programming modes Eli Zaretskii
2024-12-05 8:52 ` Visuwesh
2024-12-05 9:14 ` Eli Zaretskii
2024-12-05 9:49 ` Visuwesh
2024-12-05 11:17 ` Eli Zaretskii
2024-12-05 11:28 ` Visuwesh
2024-12-05 12:01 ` Eli Zaretskii
2024-12-05 12:39 ` Visuwesh
2024-12-05 14:26 ` Eli Zaretskii
2024-12-15 8:26 ` Visuwesh [this message]
2024-12-08 8:13 ` Integration of Info manuals in programming modes, " James Thomas
2024-12-08 8:38 ` James Thomas
2024-12-08 11:34 ` Eli Zaretskii
2024-12-08 20:10 ` Björn Bidar
[not found] ` <86msh5b48w.fsf@gmx.net>
2024-12-10 1:08 ` James Thomas
[not found] ` <87zfl60wbw.fsf@>
2024-12-08 20:46 ` Eli Zaretskii
2024-12-11 4:32 ` Richard Stallman
2024-12-13 23:54 ` Björn Bidar
[not found] ` <87msgzp2a9.fsf@>
2024-12-14 19:11 ` Dr. Arne Babenhauserheide
2024-12-05 10:06 ` Stephen Berman
2024-12-05 15:07 ` Dr. Arne Babenhauserheide
2024-12-05 16:04 ` Eli Zaretskii
2024-12-09 4:58 ` Integration of Info manuals in programming modes; was: Making the GNU C Manual easier to find in Info Richard Stallman
2024-12-09 22:49 ` Dr. Arne Babenhauserheide
2024-12-11 4:35 ` Richard Stallman
2024-12-02 4:10 ` Proposal: Include C Manual from RMS in Emacs git, and/or release Richard Stallman
2024-12-02 12:57 ` Eli Zaretskii
2024-12-03 23:03 ` [ELPA] New package c-intro-and-ref -- was " Jeremy Bryant
2024-12-04 12:33 ` Eli Zaretskii
2024-12-04 22:58 ` Jeremy Bryant
2024-12-05 5:45 ` Eli Zaretskii
2024-12-07 13:30 ` Improving info-look.el for (c) -was- " Jeremy Bryant
2024-12-07 15:09 ` Eli Zaretskii
2024-12-05 5:03 ` Max Nikulin
2024-12-05 18:47 ` Philip Kaludercic
2024-12-05 19:04 ` Eli Zaretskii
2024-12-06 10:44 ` Philip Kaludercic
2024-12-06 12:10 ` Eli Zaretskii
2024-12-06 22:40 ` Philip Kaludercic
2024-12-05 19:17 ` Stefan Monnier
2024-12-05 20:35 ` chad
2024-12-06 4:57 ` Visuwesh
2024-12-06 10:42 ` Philip Kaludercic
2024-12-06 14:58 ` Max Nikulin
2024-12-06 16:30 ` Eli Zaretskii
2024-12-08 16:41 ` Max Nikulin
2024-12-08 5:15 ` Richard Stallman
2024-12-08 7:15 ` Xiyue Deng
2024-12-08 16:50 ` Max Nikulin
2024-12-11 4:32 ` Richard Stallman
2024-12-12 3:22 ` Debian package with GNU manuals (was: Re: [ELPA] New package c-intro-and-ref) Max Nikulin
2024-12-04 20:02 ` [ELPA] New package c-intro-and-ref -- was Re: Proposal: Include C Manual from RMS in Emacs git, and/or release Suhail Singh
[not found] ` <87wmgf9h70.fsf@jeremybryant.net>
2024-12-04 23:52 ` Suhail Singh
2024-12-07 13:21 ` Jeremy Bryant
2024-12-08 20:44 ` Suhail Singh
2024-12-07 4:22 ` Richard Stallman
2024-12-07 12:29 ` Jeremy Bryant
2024-12-07 14:55 ` Björn Bidar
[not found] ` <87h67fr18v.fsf@>
2024-12-10 5:38 ` Richard Stallman
2024-12-13 23:44 ` Björn Bidar
[not found] ` <87r06bp2qm.fsf@>
2024-12-14 21:19 ` Dr. Arne Babenhauserheide
2024-12-15 6:31 ` Eli Zaretskii
2024-12-05 5:05 ` Richard Stallman
2024-12-05 6:27 ` Eli Zaretskii
2024-12-03 20:07 ` Björn Bidar
[not found] ` <87cyi8h6n8.fsf@>
2024-12-07 16:02 ` Björn Bidar
2024-12-08 5:10 ` Richard Stallman
2024-12-08 20:07 ` Björn Bidar
2024-12-09 15:11 ` Improve access to documentation in Info format (was: Proposal: Include C Manual from RMS in Emacs git, and/or release) Suhail Singh
2024-12-11 4:37 ` Richard Stallman
2024-12-11 14:13 ` Improve access to documentation in Info format Suhail Singh
2024-12-13 23:41 ` Björn Bidar
[not found] ` <87v7vnp2vx.fsf@>
2024-12-14 21:16 ` Dr. Arne Babenhauserheide
[not found] ` <874j3e2b2i.fsf@>
2024-12-11 4:32 ` Proposal: Include C Manual from RMS in Emacs git, and/or release Richard Stallman
2024-12-08 23:03 ` John ff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87seqp8i82.fsf@gmail.com \
--to=visuweshm@gmail.com \
--cc=arne_bab@web.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jb@jeremybryant.net \
--cc=rms@gnu.org \
--cc=spwhitton@spwhitton.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).