all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: David Abrahams <dave@boostpro.com>
Cc: emacs-pretest-bug@gnu.org, 1761@emacsbugs.donarmstrong.com
Subject: bug#1761: 23.0.60; Can't reach info nodes that aren't in TOC
Date: Fri, 02 Jan 2009 15:48:59 +0100	[thread overview]
Message-ID: <87zli9n4pw.fsf@escher.local.home> (raw)
In-Reply-To: <87fxk2t9uw.fsf@mcbain.luannocracy.com> (David Abrahams's message of "Fri, 02 Jan 2009 03:01:27 -0500")

On Fri, 02 Jan 2009 03:01:27 -0500 David Abrahams <dave@boostpro.com> wrote:

> This is arguably a feature request, but it seems so glaring that you
> might consider it a bug.  If I'm in an xterm and type `info dbus' I get
> a nice info session about emacs/dbus integration.  But there doesn't
> seem to be any way to visit the same page from within emacs using
> info-mode other than `M-: (info "dbus")'.  This seems needlessly
> inconvenient.  `C-u M-x info <RET> dbus <RET>' ought to get me to the
> same node if there's no info file named "dbus" in the current working
> directory.  Also, there should be some syntax to disambiguate:
> `C-u M-x info <RET> :dbus <RET>' maybe

I also wanted something like that, so I wrote this as a start:

(defun srb-info ()
  "Enter Info at the Info file the user chooses, tabbing for completion.
If you type parentheses around the Info file name and then type a
node name, e.g. `(emacs)Buffers', then Info enters the file at
that node (completion for nodes below the file level is not
provided)."
  (interactive)
  (require 'info)
  (let (files idx info-files info-file)
    (dolist (d Info-default-directory-list files)
      (when (file-readable-p d)
	(setq files (cons (directory-files d) files))))
    (setq files (append (car files) (cadr files)))
    (dolist (f files)
      (setq idx (string-match "\\." f))
      (setq info-files (cons (substring f 0 idx) info-files)))
    (dolist (f info-files)
      (when (string-match "-[1-9][0-9]?$" f)
	(setq info-files (delete f info-files))))
    (setq info-file (completing-read "Info file name: " info-files))
    (unless (string-match "^\([^ ]+\)" info-file)
      (setq info-file (concat "(" info-file ")")))
    (Info-goto-node info-file)))

Steve Berman






  parent reply	other threads:[~2009-01-02 14:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-02  8:01 bug#1761: 23.0.60; Can't reach info nodes that aren't in TOC David Abrahams
2009-01-02  9:11 ` Michael Albinus
2009-01-02 14:48 ` Stephen Berman [this message]
2009-01-06 21:06   ` Juri Linkov
2009-01-06 22:17     ` Stephen Berman
2009-01-07  0:48       ` David Abrahams
2012-02-09 21:42 ` Glenn Morris
2012-02-10  9:52   ` Andreas Schwab
2012-02-10 10:33     ` Eli Zaretskii
2012-02-10 12:08       ` Andreas Schwab
2012-02-10 15:27         ` Eli Zaretskii
2012-02-10 17:57           ` Andreas Schwab
2012-02-12 21:20           ` Juri Linkov

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zli9n4pw.fsf@escher.local.home \
    --to=stephen.berman@gmx.net \
    --cc=1761@emacsbugs.donarmstrong.com \
    --cc=dave@boostpro.com \
    --cc=emacs-pretest-bug@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.