unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: [drew.adams@oracle.com: links in Help buffer aren't alwayscorrect]
Date: Tue, 13 Dec 2005 11:52:33 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICAECNDAAA.drew.adams@oracle.com> (raw)
In-Reply-To: <dnmvnj$afd$1@sea.gmane.org>

    > The text "buffer-list" in the last sentence is linked to the
    > help for the `buffer-list' function, not the `buffer-list' frame
    > parameter. Either there should be no link here (if there is no
    > way to show help on the parameter) or
    > the link should point to help on the frame parameter.

    Since there is no describe-frame-parameter command, and the phrase
    "frame paramter" follows the quoted symbol (unlike the phrases listed
    in help-xref-symbol-regexp, which precede quoted symbols), we can avoid
    hyperlinking such phrases by changing help-make-xrefs in help-mode.el
    from:

                   ;; Quoted symbols
                   (save-excursion
                     (while (re-search-forward
    help-xref-symbol-regexp nil t)
                       (let* ((data (match-string 8))
                              (sym (intern-soft data)))
                         (if sym

    to:

                   ;; Quoted symbols
                   (save-excursion
                     (while (re-search-forward
    help-xref-symbol-regexp nil t)
                       (let* ((data (match-string 8))
                              (sym (intern-soft data)))
                         (if (and sym
                                  (save-match-data
                                    (not (looking-at "[ \t\n]+frame
    parameter"))))

I agree with the intention, but have doubts about the implementation - it
seems fragile, depending as it does on the exact text in the doc string. If
someone writes "frame parameter `buffer-list'" instead of "the `buffer-list'
frame parameter" then it won't work correctly. Likewise, if someone writes a
French doc string for a function or var that refers to a frame parameter.

But I guess the same could be said for the use of `help-xref-symbol-regexp',
generally. Given that we do use `help-xref-symbol-regexp' in a way that
depends on the exact doc-string text, wouldn't it be better to add the
doc-string convention to always precede the specific name by the type, so,
for instance, this doc string would say "frame parameter `buffer-list'"?
Then, "frame parameter could be added to `help-xref-symbol-regexp'.

There may not be a `describe-frame-parameter' function, but the
`help-make-xrefs' code could use a preceding "frame parameter" to link to
the Info section describing the `buffer-list' parameter. Or, at the very
least, it could test for preceding "frame parameter" in order to do nothing
(add no link) if it is present.

  reply	other threads:[~2005-12-13 19:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13  3:15 [drew.adams@oracle.com: links in Help buffer aren't always correct] Richard Stallman
2005-12-13 17:17 ` Kevin Rodgers
2005-12-13 19:52   ` Drew Adams [this message]
2005-12-13 23:53     ` [drew.adams@oracle.com: links in Help buffer aren't alwayscorrect] Kevin Rodgers
2005-12-14 18:10       ` Kevin Rodgers
2005-12-14 20:02       ` Richard M. Stallman
2005-12-14 22:48         ` [drew.adams@oracle.com: links in Help buffer aren'talwayscorrect] Drew Adams
2005-12-15  1:11           ` Kevin Rodgers
2005-12-15  2:01             ` [drew.adams@oracle.com: links in Help bufferaren'talwayscorrect] Drew Adams
2005-12-15  3:16             ` [drew.adams@oracle.com: links in Help buffer aren'talwayscorrect] Stefan Monnier
2005-12-15 17:08             ` Richard M. Stallman
2005-12-15  4:39           ` Eli Zaretskii
2005-12-15 15:39             ` bad mailer Subject meddling (was: links in Help buffer aren't always correct) Drew Adams
2005-12-15 18:47               ` Alfred M. Szmidt
2005-12-16  5:08                 ` Richard M. Stallman
2005-12-16  7:55                 ` Eli Zaretskii
2005-12-15 19:43               ` Eli Zaretskii
2005-12-15 17:08           ` [drew.adams@oracle.com: links in Help buffer aren'talwayscorrect] Richard M. Stallman
2005-12-16 18:53             ` Kevin Rodgers

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=DNEMKBNJBGPAOPIJOOICAECNDAAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).