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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

eww web browsing layer #4155

Closed
wants to merge 7 commits into from
Closed

eww web browsing layer #4155

wants to merge 7 commits into from

Conversation

axyz
Copy link
Contributor

@axyz axyz commented Dec 12, 2015

As proposed on #4107 here it is an initial implementation of vimperator style keybindings for the eww browser.

the layer provides also a helm-eww-bookmarks function to quickly work with saved urls.

The layer seems to work, but it need to be reviewed:

  • I'm not sure about function naming: I've seen a lot of variants around so I've prototyped everything with short names to be able to add prefixes as requested.
  • I'd like to add a <SPC> h w key to open helm-eww-bookmarks from everywhere, but the functions needed to populate and generate it are enclosed in the eww use-package and I was not able to have them defined on spacemacs start, but only on the first eww launch (I'd like to avoid to force code outside of a deferred use-package)

new ideas and new keybindings are also welcomed.

also with just those few keys and the magic of lnum is now a pleasure to me to quickly google or stackoverflow something right inside emacs 馃槃

@syl20bnr
Copy link
Owner

Nice work! But what I feared is confirmed here, some precious normal state key bindings are not available.

I propose this design articulated around 3 main states and switch rules:

  • evilified or a state from scratch used to navigate
  • normal state untouched
  • insert state untouched
  • ESC in navigation state -> normal state
  • ESC in normal state -> navigation state
  • ESC in insert state -> normal state
  • i in both navigation and normal state -> insert state

@syl20bnr
Copy link
Owner

I implemented the above design in evilified state, now in all evilified states the following is true:

  • pressing ESC in evilified state -> normal state
  • pressing ESC in normal state -> evilified state

I also updated evil-escape to be able to perform the same operations (will be available on MELPA in a couple of hours).

So now if you just evilify eww you'll get the behavior of my previous post for free :-)

@axyz
Copy link
Contributor Author

axyz commented Dec 12, 2015

Great! I'll try this out soon ;)

@axyz
Copy link
Contributor Author

axyz commented Dec 12, 2015

Seems to work so far, is it safe to overwrite some unwanted keys on normal mode as well? Such as o inserting a new line that could make sense on an textarea, but is quite annoying if you just want to open a new url thinking to be in evilified state while you are in normal and then have the website layout modified by a new line (may happen often)

@axyz
Copy link
Contributor Author

axyz commented Dec 12, 2015

When you are over a link in evilified state and press o ace-jump will start... while if you are not over a link open new url works correctly, needs to be investigated, may be related to some eww specific map for when you are over links? (similar to eww-text-map or eww-submit-map)

@syl20bnr
Copy link
Owner

@axyz I tried it and I was not able to correctly do a search in google, can you give me a repro step to do a successful search when landing on the google homepage ?

@axyz
Copy link
Contributor Author

axyz commented Dec 14, 2015

@syl20bnr you are right, but it seems to be a google/eww related bug.

a search on bing or wikipedia seems to work, while on google I get find-coding-systems-region: Wrong type argument: integer-or-marker-p, nil.

the layer seems to work correctly as that error is raised by eww-submit that is invoked when pressing enter on an input.

Do you get the same error?

@syl20bnr
Copy link
Owner

syl20bnr commented Jan 4, 2016

I tried the layer and there are numerous bugs especially with input fields where I am able to delete anything in the buffer when in normal state. Also the focus seems to remain in the input field even when I leave it. There is definitely something to be done when leaving an input focus.

I used duckduckgo to test.

@cal2195
Copy link

cal2195 commented Sep 6, 2017

Is there any progress on this PR? :)

@szobov
Copy link

szobov commented Dec 26, 2018

Hi there!
Thanks a lot for your work!
But what could we do to make this PR to be merged?

@Compro-Prasad
Copy link
Contributor

@szobov You can test this PR by rebasing/merging to the latest develop and check if everything works as mentioned in this PR. If it doesn't then report the errors and we can have a proper discussion to get it merged or not.

@duianto
Copy link
Collaborator

duianto commented Jun 20, 2019

There's another PR for adding a eww layer: Add eww layer #9871
It seems like syl20bnr might be using it as a starting point, so the development is probably on going there.

This PR was last updated, Dec 14, 2015, and it had some issues.
Therefore we'll close this PR in favor of the other one.

@duianto duianto closed this Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants