linux-l: Re: Eigenartige Reaktion von 'tkman' unter X -> Emacs

Robin S. Socha robin at socha.net
Fr Jun 9 08:22:50 CEST 2000


* Guenter Ewald <Gewald at t-online.de> writes:
> Tkman hat ja z.B. ordentliche Querverweise. 

Alles Schnickschnack. Das Einzig Wahre Hilfesystem (EWH(tm)) unter Linux
heisst selbstverständlich Emacs. Der beste info- und man-browser aller
Zeiten. Honest.

Für den Anfang:

;:*=======================
;:* displaying manual pages
;; This file defines "manual-entry", and the remaining definitions all
;; begin with "Manual-".  This makes the autocompletion on "M-x man" work.
(require 'man)

Aber das ist irgendwie langweilig. Also:

;:*======================= 
;:* manual follows xref instead of opening a new buffer
;: Glynn Clements <glynn @ sensei.co.uk>
(defun Manual-follow-xref (&optional name-or-event)
  "Invoke `manual-entry' on the cross-reference under the mouse.
   When invoked noninteractively, the arg may be an xref string to parse instead."
  (interactive "e")
  (if (eventp name-or-event)
      (let* ((p (event-point name-or-event))
	     (extent (and p (extent-at p
			     (event-buffer name-or-event)
			     'highlight)))
	     (data (and extent (extent-property extent 'man))))
	(if (eq (car-safe data) 'Manual-follow-xref)
	    (eval data)
	  (error "no manual cross-reference there.")))
    (let ((buff (current-buffer)))
      (or (and (manual-entry name-or-event)
	       (or (eq (current-buffer) buff)
		   (kill-buffer buff)))
	  ;: If that didn't work, maybe it's in a different section than the
	  ;: man page writer expected.  For example, man pages tend assume
	  ;: that all user programs are in section 1, but X tends to generate
	  ;: makefiles that put things in section "n" instead...
	  (and (string-match "[ \t]*([^)]+)\\'" name-or-event)
	       (progn
		 (message "No entries found for %s; checking other sections..."
			  name-or-event)
		 (and (manual-entry
		       (substring name-or-event 0 (match-beginning 0)) nil t)
		      (or (eq (current-buffer) buff)
			  (kill-buffer buff)))))))))

Oder wie wäre es hiermit:

;; -*- Mode: Emacs-Lisp -*-
;; File:		superman.el
;; Description: 	Background manual page formatter & mode
;; Author:		Barry A. Warsaw <bwarsaw at cen.com>
;; ========== Features ==========
;; + Runs "man" in the background and pipes the results through a
;;   series of sed and awk scripts so that all retrieving and cleaning
;;   is done in the background. The cleaning commands are configurable.
;; + Syntax is the same as Un*x man
;; + Functionality is the same as Un*x man, including "man -k" and
;;   "man <section>, etc.
;; + Provides a manual browsing mode with keybindings for traversing
;;   the sections of a manpage, following references in the SEE ALSO
;;   section, and more.
;; + Multiple manpages created with the same man command are put into
;;   a narrowed buffer circular list.

Oder das hier:

;;; turbo-man.el --- browse UNIX manual pages (quickly)
;; Keywords: help

Oder gleich alles auf einmal:

;;!emacs
;;
;; FILE:         hsuperman.el
;; SUMMARY:      Fixes to Superman V1.0 for compatibility with 'manual-entry'.
;; AUTHOR:       Bob Weiner
;; ORG:          Brown U.
;; Based on "superman.el" by Barry A. Warsaw <bwarsaw at cen.com>
;; and "man.el", a part of GNU Emacs.
;; Available for use and distribution under the same terms as GNU Emacs.

Vorschlag: ich mache mal einen Vortrag "Der Weg durch den
Informationsdschungel" frisch. /usr/doc, man, info, apropos, grep, find,
locate, freshmeat, LDP, etc. Interessenten?
-- 
Robin S. Socha <http://socha.net/>



Mehr Informationen über die Mailingliste linux-l