hyperbole-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implicit links


From: Robert Weiner
Subject: Re: implicit links
Date: Tue, 18 May 2021 19:37:55 -0400

Hi Erich:

You understand things well.  You are doing things right.  It must be a bug.  
We’ll work on it.  Thanks for the report.

-- Bob

> On May 18, 2021, at 9:26 AM, Dr. Erich Ruff <dr.erich.ruff@t-online.de> wrote:
> 
> 
> Hello Bob,
> 
> thank you for your immediate answer.
> 
> I wanted to activate with the 'implicit-link'  <elink: fi>  the explicit
> button   <(fi)> in the same document. Or did I not understand the manual?
> 
> 
> Here the info:
> 
> 
> the 'explicit button' is named:  <(fi)>  at line 850 of my file
> 
> here the output of {C-h A}
> 
> -------------------- begin --------------------
> 
> A press of the Action Key
> WHEN  (hbut:at-p)
> CALLS (hui:hbut-act) WHICH WILL:
> 
>  Execute action for optional Hyperbole button symbol BUT in current buffer.
>  The default is the current button.
> 
> link-to-regexp-match BUTTON SPECIFICS:
> 
> Find REGEXP’s Nth occurrence in SOURCE and display location at window top.
> SOURCE is a pathname unless optional BUFFER-P is non-nil, then SOURCE must be
> a buffer name or buffer.
> Return t if found, signal an error if not.
>   lbl-key:         "fi"
>   loc:             "/home/er/git/wlnm/zur-wlnm.tex"
>   categ:           explicit
>   actype:          link-to-regexp-match
>   args:            ("Thathandlung" 1 "/mnt/fichte/sw-01.txt")
>   creator:         "dr.erich.ruff@t-online.de"
>   create-time:     "May 18 09:30:40 CEST 2021"
> -------------------- end -----------------------
> 
> 
> 
> 
> 
> the 'implicit-button'  on line 1:
> 
> <elink: fi: /home/er/git/wlnm/zur-wlnm.tex>
> 
> works with fullpath
> 
> ------------------ begin fi-fullpath ---------------
> A press of the Action Key
> WHEN  (hbut:at-p)
> CALLS (hui:hbut-act) WHICH WILL:
> 
>  Execute action for optional Hyperbole button symbol BUT in current buffer.
>  The default is the current button.
> 
> elink BUTTON SPECIFICS:
> 
> At point, activate a link to an explicit button.
> This executes the linked to explicit button’s action in the
> context of the current buffer.
> 
> Recognizes the format ’<elink:’ button_label [’:’ button_file_path] ’>’,
> where : button_file_path is given only when the link is to another file,
> e.g. <elink: project-list: ~/projs>.
>   lbl-key:         "elink_fi"
>   lbl-start:       3
>   lbl-end:         46
>   categ:           ibtypes::elink
>   loc:             "/home/er/git/wlnm/zur-wlnm.tex"
>   actype:          link-to-ebut
>   args:            ("fi" "/home/er/git/wlnm/zur-wlnm.tex")
> 
> ------------------ end fi-fullpath ---------------
> 
> 
> 
> the 'implicit-button'  on line 3
> <elink: fi:> or <elink: fi> does not work
> 
> ------------------ begin fi-no path --------------
> 
> A press of the Action Key
> WHEN  (hbut:at-p)
> CALLS (hui:hbut-act) WHICH WILL:
> 
>  Execute action for optional Hyperbole button symbol BUT in current buffer.
>  The default is the current button.
> 
> elink BUTTON SPECIFICS:
> 
> At point, activate a link to an explicit button.
> This executes the linked to explicit button’s action in the
> context of the current buffer.
> 
> Recognizes the format ’<elink:’ button_label [’:’ button_file_path] ’>’,
> where : button_file_path is given only when the link is to another file,
> e.g. <elink: project-list: ~/projs>.
>   lbl-key:         "elink_fi"
>   lbl-start:       49
>   lbl-end:         61
>   categ:           ibtypes::elink
>   loc:             "/home/er/git/wlnm/zur-wlnm.tex"
>   actype:          link-to-ebut
>   args:            ("fi" nil)
> 
> -------------------- end -----------------------
> 
> 
>> On Di 18 Mai 2021 at 14:59, Robert Weiner <rswgnu@gmail.com> wrote:
>> 
>> Please press {C-h A} with point over your fi explicit button and rhen copy 
>> the output to show us what it does.
>> 
>> The link-to-ebut problem could be a bug, we’ll have to see but also want to 
>> help you with the simplest way to do what you want and as Jean notes, that 
>> may be by using a builtin implicit button type.  We just need to know the 
>> actual effect you want to achieve in order to answer.
>> 
>> -- Bob
>> 
>>>> On May 18, 2021, at 7:05 AM, Jean Louis <bugs@gnu.support> wrote:
>>> 
>>> * Dr. Erich Ruff <dr.erich.ruff@t-online.de> [2021-05-18 11:06]:
>>>> I'm trying to learn to use hyperbole and I make very slow progress
>>>> because of the very terse documentation with only a minimum of
>>>> real-life examples.
>>>> 
>>>> Because of working most of my time in LaTeX, I don't use org-mode. So
>>>> it is a relief to have hyperlinks working in another context as org.
>>> 
>>> There is `org-link-minor-mode' that helps you have Org links in any
>>> kind of the mode. I think you need to install it from Melpa.
>>> 
>>> In the case of LaTeX I would use GNU Hyperbole
>>> 
>>>> Implicit buttons are created - as I understood - as:
>>>> 
>>>> <elink: explicit-button-label: path-to-remote-doc>
>>>> 
>>>> but referencing an ebut, labeled 'fi' in the same and not in an extern
>>>> *.tex.file results in this error:
>>>> 
>>>> -->   hypb:error: (link-to-ebut): No button ‘fi’ in ‘nil’
>>> 
>>> With Hyperbole V8, let us say you wish to have a link link:
>>> 
>>> <doc: NAME-OF-FILE>
>>> 
>>> Then you have to decide which function to handle the NAME-OF-FILE. The
>>> function can be stored in .emacs file
>>> 
>>> Then you would do following:
>>> 
>>> (defil any-name-of-function "<doc:" ">" ".*" 'my-function)
>>> 
>>> Let us say your function is to open file within Emacs:
>>> 
>>> (defun my-function (file)
>>> (let ((file (string-trim file))) ;; I would string trim to avoid any spaces 
>>> around
>>>   (find-file file)))
>>> 
>>> Then the button like this is opening ~/tmp or any file there.
>>> 
>>> <doc: ~/tmp>
>>> 
>>> But to open a file Hyperbole already knows how to do it as this
>>> is already implicit link:
>>> 
>>> "~/tmp"
>>> 
>>> Which kind of files do you try to open?
>>> 
>>> Are those files to be opened with external viewer?
>>> 
>>> 
>>> Jean
>>> 
>>> Take action in Free Software Foundation campaigns:
>>> https://www.fsf.org/campaigns
>>> 
>>> Sign an open letter in support of Richard M. Stallman
>>> https://stallmansupport.org/
>>> https://rms-support-letter.github.io/
>>> 
>>> 
> 
> 
> --
> mit freundlichen Grüßen
> E. Ruff
> 
> -----------------------------------------------------------------------
>                Please send PLAIN text-mail  _ONLY_
> -----------------------------------------------------------------------
> Dr. phil. Erich Ruff                 Phone: +0049 (-0) 8142/410 43 33
> Psychologischer Psychotherapeut      Email: Erich_Ruff@T-Online.de
> Freilandstr. 15 A                    Email: Dr.Erich.Ruff@T-Online.de
> D-82194 Gröbenzell                   Email: Dr.Erich.Ruff@Gabelsberger.org
> homepage                             http://www.Gabelsberger.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]