Loading ...
Sorry, an error occurred while loading the content.
 

[jasspa] Solution to hypertexting to the help from list-commands buffer

Expand Messages
  • Jon Green
    ... The following macro will do it. Paste the following into file mylists.emf and then it will find the help using the key. This type of mechanism
    Message 1 of 2 , Mar 15, 2000
      Thomas Hundt wrote:
      >
      > 1. Help file: ^HC, list-commands, creates a buffer o' commands which may be
      > double-clicked on to open the relevant help file. This is a Good Thing.
      > However, I can't figure out how to open one via the keyboard (e.g., after
      > doing a search for something [see below], my cursor landed on find-zfile
      > and I wanted to find out what the heck that was -- how to open it?
      > Take hand off keyboard, move mouse, click... seems kinda inefficient.)
      >

      The following macro will do it. Paste the following into file "mylists.emf"
      and then it will find the help using the <RETURN> key. This type of
      mechanism should go into the base macro.

      I'm now wondering when the @s1 construct was added - this is recent
      but I'm not sure how recent ??

      Regards
      Jon.

      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;
      ; Author : $Author$
      ; Created By : Jon Green
      ; Created : Wed Mar 15 08:18:46 2000
      ; Last Modified : <000315.0834>
      ;
      ; Description : Extensions to access the help for the command from the
      ; keyboard. a <RETURN> invokes the help page.
      ;
      ; Notes
      ;
      ; History
      ;
      ; Copyright (c) 2000 Samsung (SERI) Ltd.
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

      ; Forward reference the ehf find command.
      define-macro-file hkehf ehf-find-help


      ; Local macro to process the links from the keyboard.
      ; Bound to <RETURN>. Note that we process from the
      ; end of the line. This makes it easy to process
      ; the command where there are multiple key bindings.
      0 define-macro lists-process-link-by-key
      set-mark
      end-of-line
      !force search-backward "^ +\\([-a-zA-Z0-9]+\\)"
      !if $status
      ; Get the name of the command out and help
      ; on it.
      set-variable #l0 @s1
      ehf-find-help #l0
      !return
      !endif
      exchange-point-and-mark
      ml-write "Error! Not in a link"
      !abort
      !emacro

      buffer-bind-key "lists-process-link-by-key" "return"
    • Jon Green
      Oops, forgot that the buffer binding must be in a fhook extension. So the macro again is... Sorry Jon.
      Message 2 of 2 , Mar 15, 2000
        Oops, forgot that the buffer binding must be in a
        fhook extension. So the macro again is...

        Sorry
        Jon.


        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        ;
        ; Author : $Author$
        ; Created By : Jon Green
        ; Created : Wed Mar 15 08:18:46 2000
        ; Last Modified : <000315.0906>
        ;
        ; Description : Extensions to access the help for the command from the
        ; keyboard. a <RETURN> invokes the help page.
        ;
        ; Notes
        ;
        ; History
        ;
        ; Copyright (c) 2000 Samsung (SERI) Ltd.
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

        ; Forward reference the ehf find command.
        define-macro-file hkehf ehf-find-help


        ; Local macro to process the links from the keyboard.
        ; Bound to <RETURN>. Note that we process from the
        ; end of the line. This makes it easy to process
        ; the command where there are multiple key bindings.
        0 define-macro lists-process-link-by-key
        set-mark
        end-of-line
        !force search-backward "^ +\\([-a-zA-Z0-9]+\\)"
        !if $status
        ; Get the name of the command out and help
        ; on it.
        set-variable #l0 @s1
        ehf-find-help #l0
        !return
        !endif
        exchange-point-and-mark
        ml-write "Error! Not in a link"
        !abort
        !emacro

        0 define-macro my-fhook-lists
        buffer-bind-key "lists-process-link-by-key" "return"
        !emacro
      Your message has been successfully submitted and would be delivered to recipients shortly.