Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation lookup #7

Open
olejorgenb opened this issue Sep 19, 2017 · 1 comment
Open

Documentation lookup #7

olejorgenb opened this issue Sep 19, 2017 · 1 comment
Assignees

Comments

@olejorgenb
Copy link
Member

olejorgenb commented Sep 19, 2017

Ideally we want this inline in emacs. Maybe use https://github.com/jinzhu/zeal-at-point .

Preliminary research:

We can easily get the corresponding native c function when we can evaluate the js function:

global.display.focus_window.change_workspace
//: function change_workspace(workspace) {
//: 	/* proxy for native symbol meta_window_change_workspace(); */
//: }

Doesn't seem to be a global (all gnome packages) index unfortunately. It's not possible in general to extract the package name from the method name. (Some packages have multiple words). We can of course hard code such mappings.

To control which browser window to open a link in: simply focus it before opening the link.

@olejorgenb
Copy link
Member Author

olejorgenb commented Sep 29, 2017

Yey! https://developer.gnome.org/symbols/?q=meta_window_get_mutter_hints

There's also a endpoint for looking up partial symbols: eg. https://developer.gnome.org/symbols/lookup/get_children
The query will be surrounded by wildcards. It's possible to embed wildcards using % (URI encoded %25).
Max 50 results.
Source: https://git.gnome.org/browse/library-web/tree/web/api.py

There is a search box at the bottom of https://developer.gnome.org/references

olejorgenb added a commit that referenced this issue Oct 1, 2017
Look up the symbol at point using the developer.gnome.org web resources.

- Async lookup
- No error handling of the http result (url.el sucks..)
- Firefox is not made urgent, but this is most likely DE/system dependent? (same
call have worked in notion at least)

Other possible improvements:
If the function is in scope we can use `toString()` to get the bound c symbol
and look it up directly.

Ref: #7
@olejorgenb olejorgenb self-assigned this Oct 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant