summaryrefslogtreecommitdiffstats
path: root/2022/talks/buttons.md
blob: dc4e9a39832f9a099dda8d3511ad84f1023d587c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[[!sidebar content=""]]
[[!meta title="Linking personal info with Hyperbole implicit buttons"]]
[[!meta copyright="Copyright © 2022 Mats Lidell"]]
[[!inline pages="internal(2022/info/buttons-nav)" raw="yes"]]

<!-- Initially generated with emacsconf-generate-talk-page and then left alone for manual editing -->
<!-- You can manually edit this file to update the abstract, add links, etc. --->


# Linking personal info with Hyperbole implicit buttons
Mats Lidell (he/him/his, <mailto:matsl@gnu.org>)

[[!inline pages="internal(2022/info/buttons-before)" raw="yes"]]

GNU Hyperbole, The Everyday Hypertextual Information Manager, supports
hypertext links. Linking is done though buttons that can be either of
two types, implicit buttons and explicit buttons.

In this talk I will show how the Hyperbole support of implicit buttons
can be used to create links to personal data.

Outline:

1.  Short introduction to Hyperbole
2.  Description of what an implicit button is
3.  Description of how Hyperbole supports creating new implicit buttons using the Hyperbole defil macro
4.  Examples of applying the defil macro together with different personal data structures

# Discussion

-   Hyperbole - <https://www.gnu.org/software/hyperbole/>
-   <https://savannah.gnu.org/projects/hyperbole/>
-   Get a lot of power and put buttons everywhere without having to
    learn a lot of syntax. This is what is cool about hyperbole. 
-   You can expand and collapse trees if you export hyperbole kotl-files
    (unlike exporting from org-mode)
- These hyperbole buttons looks quite cool!
- the mapping is agnostic if you are looking at the code or any other document, that is quite powerful, thanks for the presentation!
-  I was in the other room and just came in at the last moment to hear about hyperbole for the first time! 

## Questions

-   Q: So with one line of code you can create custom hyperbutton types
    that are live in any Emacs buffer.  Is that right?
    -   A: Yes.
-   Q:Is there a good way to share common patterns for links other than
    the ones that you shared? shall those be PRs to your repository?
    -   A: 
        -   No, I view these buttons first as specific for your
            application or supporting your way of working so would have
            less value in sharing. On sharing is that they could be used
            for collabration between different users where each user
            would define their own mapping to work in their environment.
            In the file example in the presentation each users could
            have has stored the data in different local folders but use
            the same pattern to link to the data.
        -   Thinking about it again now I realize that you mean sharing
            as examples or for inspiration. That is a good idea. We
            don't have any example section but we could add that. You
            can also post ideas and examples to the Hyperbole user
            mailing list.
-   Q: I liked the link to evaluate Calc expressions. Any way to get the
    outcome into the buffer and not just in the message window? It could replace embedded calc mode with more control... I guess any elisp code can be used for the target evaluation.
    -ericsfraga
    -   A: You can mix Hyperbole buttons with Org source blocks too, so
        you could get things in a buffer that way too.
    -   The example uses a lambda expression to get the result
        displayed. To get the result inserted in the buffer would just
        require a function to do that instead of displaying it in the
        message window.
    -   This would be a simple example of this (It will insert the
        result after the button, removing rest of the line but keep the
        point in the button allowing you to change it to calculate a new
        result.)
		````
		(defil demo-do-math "<<" ">>" ".*"
		  '(lambda (x) (save-excursion (search-forward ">>")
			(kill-line) (insert " " (calc-eval x) " "))))
		````
-   Q: How did you present the right buffer with shortcuts at the right
    of your buffer? -- a lot of people are wondering.
    -   A:  interaction-log mode -
        <https://github.com/michael-heerdegen/interaction-log.el>
    -   In combination with displaying it in a separate frame.
-   Q:What kind of cool actions do you use in Hyperbole?
    -   A: Among other things... 
        -   You can expand and collapse trees if you export hyperbole
            kotl-files (unlike exporting from org-mode) kotl-files are
            Hyperbole outliner files.
        -   I use implicit button defined with the defib macro that
            allows me to match to text with no start and stop 
            delimiters. That way I can match on identifiers used in
            other systems verbatim, such as identifiers in ticketing
            systems. Much like the in Hyperbole built in debbugs for the
            pattern "bug#id-number"
-   Q: Does the links/buttons created in hyperbole (like that one with
    the url) get exported on org-mode files too? (like when exported to
    html).
    -   A: There is currently no support for turning the implicit
        buttons into html-links on export. In practice I would think
        that to be hard and would only support parts of the
        functionality but is an interesting idea.

[[!inline pages="internal(2022/info/buttons-after)" raw="yes"]]

[[!inline pages="internal(2022/info/buttons-nav)" raw="yes"]]