emacs-eaf / eaf-browser Goto Github PK
View Code? Open in Web Editor NEWA modern, customizable and extensible browser in Emacs
License: GNU General Public License v3.0
A modern, customizable and extensible browser in Emacs
License: GNU General Public License v3.0
Hi,
Describe the bug
EAF-browser can not scroll some websites by pressing the C-n
, C-p
, prior
, next
keys.
To Reproduce
Browse this website by Eaf-browser:
https://stevedonovan.github.io/rust-gentle-intro/1-basics.html
and then press C-n
, C-p
, prior
, or next
,
No action will be performed.
Expected behavior
The website should be scrolled accordingly.
Versions (please complete the following info):
[EAF] Browser https://www.google.com/search?q=quartz serialize loading time: 3.7765350341796875s
[EAF] Browser https://blog.csdn.net/u013772876/article/details/78879453 loading time: 8.681013107299805s
[74882:71427:0816/123711.673469:ERROR:ssl_client_socket_impl.cc(982)] handshake failed; returned -1, SSL error code 1, net_error -101
[74882:71427:0816/123711.674002:ERROR:ssl_client_socket_impl.cc(982)] handshake failed; returned -1, SSL error code 1, net_error -101
[74882:71427:0816/123711.674249:ERROR:ssl_client_socket_impl.cc(982)] handshake failed; returned -1, SSL error code 1, net_error -100
[74882:71427:0816/123711.674499:ERROR:ssl_client_socket_impl.cc(982)] handshake failed; returned -1, SSL error code 1, net_error -100
[74882:71427:0816/123713.546205:ERROR:ssl_client_socket_impl.cc(982)] handshake failed; returned -1, SSL error code 1, net_error -100
[74882:71427:0816/123713.546531:ERROR:ssl_client_socket_impl.cc(982)] handshake failed; returned -1, SSL error code 1, net_error -101
[74882:71427:0816/123714.021134:ERROR:ssl_client_socket_impl.cc(982)] handshake failed; returned -1, SSL error code 1, net_error -100
[74882:71427:0816/123714.021641:ERROR:ssl_client_socket_impl.cc(982)] handshake failed; returned -1, SSL error code 1, net_error -100
[EAF] Browser https://www.google.com/search?q=quartz serialize loading time: 0.20415902137756348s
Traceback (most recent call last):
File "/Users/xianbin/.doom.d/site-lisp/eaf/app/browser/buffer.py", line 283, in update_position
pos_percentage = '%.1f%%' % ((position + view_height) / page_height * 100)
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero
*eaf*
buffer:Qt: Session management error: Could not open network socket
Traceback (most recent call last):
File "/home/luigi/.emacs.spacemacs/elpa/27.2/develop/eaf-20210912.1117/core/utils.py", line 60, in on_signal_received
self._func(obj, *args, **kwargs)
File "/home/luigi/.emacs.spacemacs/elpa/27.2/develop/eaf-20210912.1117/eaf.py", line 170, in new_buffer
self.create_buffer(buffer_id, url, module_path, arguments)
File "/home/luigi/.emacs.spacemacs/elpa/27.2/develop/eaf-20210912.1117/eaf.py", line 187, in create_buffer
app_buffer = module.AppBuffer(buffer_id, url, arguments)
File "/home/luigi/.emacs.spacemacs/elpa/27.2/develop/eaf-20210912.1117/app/browser/buffer.py", line 79, in __init__
self.buffer_widget.dark_mode_js = open(os.path.join(os.path.dirname(__file__),
FileNotFoundError: [Errno 2] No such file or directory: '/home/luigi/.emacs.spacemacs/elpa/27.2/develop/eaf-20210912.1117/app/browser/node_modules/darkreader/darkreader.js'
Process *eaf* aborted (core dumped)
Describe the bug
after running eaf-open-browser and writing the website, it gets stuck on opening **website**
where website is any working website
To Reproduce
eaf
layer, let it install EAF, and run eaf-open-browser in emacsExpected behavior
open the website
Versions (please complete the following info):
./install-eaf.py
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
This problems happen both using chemacs2 and not using it!
如题,调用命令 eaf-py-proxy-insert_or_download_youtube_video 下载 YouTube 视频,出现题目提示。
EAF buffer:
qt.webenginecontext:
GL Type: core_profile
Surface Type: OpenGL
Surface Profile: CoreProfile
Surface Version: 4.1
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yes
Init Parameters:
* application-name eaf.py
* browser-subprocess-path /Users/c/Library/Python/3.10/lib/python/site-packages/PyQt6/Qt6/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
* disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture
* disable-speech-api
* enable-features NetworkServiceInProcess,TracingServiceInProcess
* enable-threaded-compositing
* in-process-gpu
* use-gl core_profile
[EAF] Browser https://www.youtube.com/watch?v=wiRspmb_jp4&ab_channel=BlondieinChina%0A loading time: 4.194756984710693s
在终端中测试:
~ via ⬢ v19.1.0
➜ which youtube-dl
/usr/local/bin/youtube-dl
~ via ⬢ v19.1.0
➜ /usr/bin/env python3
Python 3.10.8 (main, Oct 13 2022, 10:19:13) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.which("youtube-dl")
'/usr/local/bin/youtube-dl'
在 Emacs 中测试:
(executable-find "youtube-dl")
结果:"/usr/local/bin/youtube-dl"
。
明明终端和 Emacs 可以找到 youtube-dl,但是 EAF 就是找不到 youtube-dl,我不知道如何进一步排查?
哪里可能出问题?
用eaf-browser打开www.youku.com网站,点击上面的视频,显示加载失败。
如题,请问这个问题有没有办法解决?
YouTube视频可以正常播放。
(defcustom eaf-browser-caret-mode-keybinding
'(("j" . "caret_next_line")
("k" . "caret_previous_line")
("l" . "caret_next_character")
("h" . "caret_previous_character")
("w" . "caret_next_word")
("b" . "caret_previous_word")
(")" . "caret_next_sentence")
("(" . "caret_previous_sentence")
("g" . "caret_to_bottom")
("G" . "caret_to_top")
("/" . "caret_search_forward")
("?" . "caret_search_backward")
("." . "caret_clear_search")
("v" . "caret_toggle_mark")
("o" . "caret_rotate_selection")
("y" . "caret_translate_text")
("q" . "caret_exit")
("C-n" . "caret_next_line")
("C-p" . "caret_previous_line")
("C-f" . "caret_next_character")
("C-b" . "caret_previous_character")
("M-f" . "caret_next_word")
("M-b" . "caret_previous_word")
("M-e" . "caret_next_sentence")
("M-a" . "caret_previous_sentence")
("C-<" . "caret_to_bottom")
("C->" . "caret_to_top")
("C-s" . "caret_search_forward")
("C-r" . "caret_search_backward")
("C-." . "caret_clear_search")
("C-SPC" . "caret_toggle_mark")
("C-o" . "caret_rotate_selection")
("C-y" . "caret_translate_text")
("C-q" . "caret_exit")
("c" . "insert_or_caret_at_line")
("M-c" . "caret_toggle_browsing")
("" . "caret_exit"))
"The keybinding of EAF Browser Caret Mode."
:type 'cons)
Is your feature request related to a problem? Please describe.
I want to daily drive eaf-browser, but there are a few extension i just cant live without
Describe the solution you'd like
It would be a nice if i can install extensions. either by using the web app by firefox or if i have to install it manually it would be fine also
Describe alternatives you've considered
I tried looking for additional emacs packages to no avail
Additional context
-
Traceback (most recent call last):
File "~\.doom.d\localpackages\emacs-application-framework\core\utils.py", line 52, in on_signal_received
self._func(obj, *args, **kwargs)
File "~\.doom.d\localpackages\emacs-application-framework\eaf.py", line 155, in new_buffer
self.create_buffer(buffer_id, url, module_path, arguments)
File "~\.doom.d\localpackages\emacs-application-framework\eaf.py", line 170, in create_buffer
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "~/.doom.d/localpackages/emacs-application-framework/app/browser/buffer.py", line 730, in <module>
raw_rules = f.readlines()
File "[redacted]\Python310\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 3168: character maps to <undefined>
Describe the bug
Opening any browser page results in a UnicodeDecodeError, which the stack trace links to easylist.txt being read in the adblock code.
To Reproduce
Expected behavior
easylist.txt to be read without issues, followed by successfully opening duckduckgo.com
Versions (please complete the following info):
Additional context
Patch: Uninstall braveblock package. The current code takes this as a signal to not adblock, which avoids the problematic file-read.
升级 Darkreader 以后, JS会报错
*eaf*
buffer, if there is any error shown in the *eaf*
buffer, paste it here.QGLXContext: Failed to create dummy context
qt.webenginecontext:
GL Type: desktop
Surface Type: OpenGL
Surface Profile: NoProfile
Surface Version: 1.4
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: no
Init Parameters:
* application-name eaf.py
* browser-subprocess-path /home/mattias/.local/lib/python3.10/site-packages/PyQt6/Qt6/libexec/QtWebEngineProcess
* disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture
* disable-setuid-sandbox
* disable-speech-api
* disable-web-security
* enable-features NetworkServiceInProcess,TracingServiceInProcess
* enable-gpu-rasterization
* enable-native-gpu-memory-buffers
* enable-threaded-compositing
* ignore-gpu-blocklist
* in-process-gpu
* use-gl desktop
QQuickWidget: Failed to make context current
QQuickRenderControl: grabs are not supported with the current Qt Quick backend
[8028:8028:0914/183304.065229:ERROR:shared_context_state.cc(410)] SharedContextState::InitializeGL failure max_texture_units : 0 is less that minimum required : 8
[8028:8028:0914/183304.065284:ERROR:gpu_channel_manager.cc(865)] ContextResult::kFatalFailure: Failed to Initialize GL for SharedContextState
[8028:8028:0914/183304.065676:ERROR:shared_image_stub.cc(524)] SharedImageStub: unable to create context
[8028:8028:0914/183304.065712:ERROR:gpu_channel.cc(568)] GpuChannel: Failed to create SharedImageStub
...
The ...
are the last 4 lines (the ones starting with [8028...]
repeating without stopping.
Describe the bug
It looks like eaf-browser is unable to generate a webpage.
To Reproduce
M-x eaf-open-browser RET duckduckgo.com RET
and nothing happens.
Expected behavior
A webpage should be displayed.
Versions (please complete the following info):
GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-09-14
Additional context
I haven't tested on my Linux computer but I think it's related to WSL
Hi,
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Open google.com, type the string "foo1 foo2 bar1 bar2" in the search book.
I'd like to be able to use Ctrl + left/right arrow to quickly move the cursor among words,
and use Ctrl + Backspace, Ctrl + Delete to delete words.
Describe alternatives you've considered
I tried these key bindings from Emacs but it doesn't work:
(define-key eaf-mode-map* (kbd "C-<backspace>") 'eaf-send-key)
(define-key eaf-mode-map* (kbd "M-<backspace>") 'eaf-send-key)
The fact that eaf browser uses a very rare user agent (QtWebengine 5) makes it very easy for fingerprinting
I would like a var in elisp which i can set in my config.
When i used normal browsers I used to use extensions to do it but sadly eaf doesnt support them
braveblock does not support apple m1/m2
Is your feature request related to a problem? Please describe.
如题,每次都要输入全部url
Describe the solution you'd like
open_link的时候能根据历史访问记录模糊搜索,弹出类似ivy、consult的minibuffer
Describe alternatives you've considered
Additional context
git pull
, please refer to Mandatory Procedures to Keep Your EAF Up-to-Date first.*eaf*
buffer, if there is any error shown in the *eaf*
buffer, paste it here.QXcbConnection: XCB error: 3 (BadWindow), sequence: 10845, resource id: -1396455504, major code: 7 (ReparentWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 10956, resource id: -1396455504, major code: 7 (ReparentWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 11684, resource id: -1396455504, major code: 7 (ReparentWindow), minor code: 0
....repeating
Describe the bug
when opening eaf browser on emacs 29 it opens it on a frame instead of buffer. The buffer where it suppose to render will be blank.
To Reproduce
Open eaf-browser using (eaf-open-browser)
Expected behavior
it should be rendered inside the buffer
Versions (please complete the following info):
Screenshots
Additional context
I just upgraded from emacs 28 to 29.
Ebuku has more features than eaf bookmarks.
https://github.com/flexibeast/ebuku/
I think it's easiest to just follow the video. The first call to eaf-py-proxy-caret_at_line
should display a marked region but there is none.
Calling eaf-py-proxy-caret_toggle_mark
afterwards seems to work, but because _caret_at_line
calls self.buffer.caret_next_word()
, the caret position is off one word.
Below is adblock code, but it will block main thread after add, don't know why.
self.interceptor = AdBlockInterceptor(self.profile, self)
with open(os.path.join(os.path.dirname(__file__), "easylistchina+easylist.txt")) as f:
raw_rules = f.readlines()
ad_rules = AdblockRules(raw_rules, use_re2=True)
class AdBlockInterceptor(QWebEngineUrlRequestInterceptor):
def __init__(self, profile, buffer):
QWebEngineUrlRequestInterceptor.__init__(self)
profile.setUrlRequestInterceptor(self)
self.buffer = buffer
def interceptRequest(self, info):
# Ad Test site:
# https://d3ward.github.io/toolz/adblock.html
if self.buffer.enable_adblocker:
url = info.requestUrl().toString()
if ad_rules.should_block(url):
print("Block Ad: ", url)
info.block(True)
Hello, after installing EAF and browser application I get:
Traceback (most recent call last):
File "/home/ucsky/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 25, in <module>
from PyQt5 import QtWebEngineWidgets as NeverUsed # noqa
ModuleNotFoundError: No module named 'PyQt5'
Process *eaf* exited abnormally with code 1
Ubuntu version:
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
Emacs version:
GNU Emacs 26.3
What I have in mind is to run certain JavaScript in the browser on a key press.
I see that there is (eaf-py-proxy-eval_js)
but it always prompts in the minibuffer, which is no option for me on a long script.
(eaf-py-proxy-eval_js_file)
would work but I don't want the overhead associated with reading from a file.
So what I have in mind is something like: (eaf-py-proxy-eval-js-string "alert('foo')")
.
In buffer.py
I see self.buffer_widget.eval_js(...)
but I don't see a way to directly access in Emacs.
Is this possible?
Is it possible to add support for either firefox or chrome addons in eaf-browser?
Describe the bug
Invoking eaf-import-chrome-bookmarks
results in a wrong-number-of-arguments
error.
Expected behavior
Bookmarks are imported
Inspecting the Emacs Lisp command, it looks like this is simply because eaf-read-input
takes four arguments, but only three are passed to it. Replacing (when (eaf-read-input "Are you sure to import chrome bookmarks to EAF" "yes-or-no" "")
with (when (eaf-read-input "Are you sure to import chrome bookmarks to EAF" "yes-or-no" "" "")
solves the issue. (The same fix should be applied to the Firefox command.)
用 C-v
M-v
翻页是正常的,但如果用 j
/k
翻页会触发 zoom in
或 zoom out
*eaf*
Dexie.delete('webtorrent-chunks-a7370e12ba0af21988647bb5fde350a5fba5a0fe') was blocked
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. [object Object]
[object DOMException]
Describe the bug
When trying to play any video in the browser, I get "The media could not be loaded, ether because the server or network failed or because the format is not supported.
To Reproduce
I'm on master branch: de18acc
Expected behavior
Playing video should work.
Versions (please complete the following info):
Screenshots
Hi,
Describe the bug
It seems that the function toggle_dark_mode
is broken for eaf-browser.
To Reproduce
M-d
to toggle the dark mode.Expected behavior
The dark mode should be disabled.
Versions (please complete the following info):
链接: https://web.okjike.com/login
上述第四步, 处于登录状态.
Is your feature request related to a problem? Please describe.
To be added to the wishlist? Would it be possible to save the current web page to a file ?
Describe the solution you'd like
I would love to be able to save the current web page to a file ?
Describe alternatives you've considered
Even better ... to save the current web page as a markdown or orgmode file ?
使用 eaf-browser 打开 leetcode.cn,Vimium 快捷键跳转的很舒服
直到最后一步,点进具体的某个题目后,就会报错
Ooops, page crashed
Crash ID: 1bd53292
OS: Arch Linux
Is your feature request related to a problem? Please describe.
Way back, I used Uzbl and got used to following links with f l
; I was able to make this work with the EAF browser by, naïvely, doing (eaf-bind-key nil "f" eaf-browser-keybinding)
. Of course, this also ruined being able to use f
, on its own.
Describe the solution you'd like
I don't know if it already exists but, if there were a eaf-py-proxy-insert_or_continue_binding
function, I could assign f
to that and, when typing in a textbox, f
would get inserted and, when not, it would look to the next key typed to determine if there's something to execute (or if the multi-key binding doesn't, in fact, exist).
Describe alternatives you've considered
N/A
Additional context
N/A
Hi,
Describe the bug
I'm using eaf-browser in dark-mode (follow mode) and see that when images are inverted, they are very difficult to see, like in the below screenshot:
To Reproduce
Use eaf-browser to browse the website: https://caml.inria.fr/pub/docs/u3-ocaml/ocaml-mixins.html
and scroll down to see the inverted image.
Expected behavior
Images shouldn't be inverted
Describe the bug
eaf-open-browser https://github.com/emacs-eaf/eaf-browser
命令时, 可以打开输入的网址m
执行 insert_or_save_as_bookmark
功能将 eaf-browser
网页加入书签M-x restart-emacs
eaf-open-bookmark
打开 eaf-browser
网页时无法打开, *eaf*
buffer 报错如下:[EAF] Browser https://github.com/emacs-eaf/eaf-browser loading time: 2.0354702472686768s
[81204:81257:0512/090949.757963:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -100
[81204:81257:0512/090949.758076:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -100
[81204:81257:0512/090949.767721:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -100
[81204:81257:0512/090949.768067:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -100
[81204:81257:0512/090950.404437:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -100
[81204:81257:0512/090950.415242:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -100
[81204:81257:0512/090950.487333:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -100
[81204:81257:0512/090950.497487:ERROR:ssl_client_socket_impl.cc(975)] handshake failed; returned -1, SSL error code 1, net_error -100
Versions (please complete the following info):
ArchLinux
, KDE
Emacs-Application-Framework, commit@9bf8caba36e27fafcef5d8e68969a1a8eb5432ed
GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
only I can just say sometimes when I open more than 3 windows with different links it starts to overflow and take all of my memory
I couldn't take screenshots because when it happen my laptop became like turtle
Hi,
I'm using EAF browser in dark mode, and the current background color of selected is kind of hard to see
I figured out that it is configured by the code selectionColor: 'auto'
at line 357 in node_modules/darkreader/darkreader.js
(this file is downloaded after installation)
Can you advise if it is possible to implement a feature in EAF-browser that allows to change this setting in darkreader.js
?
For example, here is the screenshot where I set selectionColor: '#ffb012'
, which is much easier to see the selected text.
I'm not so familar with Node.js, hence not sure if it is possible to implement such feature from the Emacs codebase of EAF-browser.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.