bug-hyperbole
[Top][All Lists]
Advanced

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

bug#36941: Please include option to link to maildir files


From: Robert Weiner
Subject: bug#36941: Please include option to link to maildir files
Date: Wed, 7 Aug 2019 08:11:10 -0400

> On Aug 7, 2019, at 3:20 AM, Jean Louis <bugs@gnu.support> wrote:
> 
> * Robert Weiner <address@hidden> [2019-08-07 04:33]:
>>> On Tue, Aug 6, 2019 at 4:29 AM Jean Louis <bugs@gnu.support> wrote:
>>> 
>>> 
>>> That is why I suggested making customization group for buttons. As that 
>>> would easy everything. One can add Elisp function and link type is added.
>>> 
>> 
>> Can you show a very simple example of what you want with a detailed 
>> explanation?  I did not follow your prior org mode examples in detail.  I 
>> don't understand that last sentence other than that Org lets you specify the 
>> type of link as part of the link text whereas Hyperbole doesn't embed the 
>> types in the buffer text itself.  Just produce a very simple use case
>> and explain it step by step and then I will be able to tell what if
>> anything is missing from Hyperbole now that you need to build what you want.
> 
> Request is for simple customization option so that new links and button types 
> can easily be customized and created.
> 
> Do this:
> 
> 1. M-x customize-group RET org-link RET
> 
> 2. Find "Org Link Abbrev List"
> 
> 3. That is what Hyperbole needs, customization of links. Or maybe it
>   could simply re-use Org functionality.

As of the 7.0.3a test release, any Org links should work via the Action Key but 
only in Org mode.  For this kind of behavior anywhere, you would define an 
implicit button type that recognized a double quoted link type name followed by 
some number of parameters and then its action type would dispatch to functions 
from a list of type names, just as Org mode does now.  I will show you a sample 
implementation when I get a chance but my point is that no new features are 
needed in Hyperbole to implement this, except that the type and parameters will 
be displayed in the buffer unless you create the buttons as explicit ones.

> 
> For example I could add a new link with protocol "SMS" and Value Menu
> Format: SMS:%s
> 
> Or maybe new protocl "gpatent" meaning Google Patent with value
> "https://www.google.com/patents/US%s";
> 
> Then if I make this link in Org:
> 
> [[gpatent:481550][Ore washer and concentrator, by Arthur L. Dana]]
> 
> It will be shown as "Ore washer and concentrator, by Arthur L. Dana"
> and if I click on this link, I can see the Google Patent online.
> 
> However, web search is not as important: More important is elisp
> functions. Than I would not need to work with Hyperbole intervals.
> 
> But functions are not well implemented in Org. They allow only
> function without parameter.
> 
> What we need is link that allows parameters, which can be customized
> to run on such parameter.
> 
> Synonym is <[Media]>: "~/Media"
> 
> However, that implementation does not look well.

We are still open to other syntaxes but the label must itself be delimited.
> 
> As Hyperbola is using special file outside of the text to define
> links, I see no reason why such links, even parameters could not be defined 
> in that separate file.

They are with explicit buttons which each have an action type that can take an 
arbitrary number of parameters and prompt for each one.

> 
> Even simple words could be defined in that separate file to be links for 
> something. Isn't it?

That would be implicit button types.

> 
> I could define word GNU in the directory, to be the link in the file 
> about-gnu.txt to https://www.gnu.org
> 
> Then for example, I could define word "notes" to be link to the action
> "notes" with parameter ID: 123.

Basically, you want to be able to define implicit link types as you would in a 
database table, as a list of typed fields and then instantiate these types 
within buffers just as you now do.  The missing part is being able to create, 
edit and look up the types from a table rather than as a list of types that we 
have now that covers not just link types but all button types.

Bob





reply via email to

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