Git Product home page Git Product logo

emacs-application-framework's People

Contributors

atnewhope avatar c1-g avatar chenzaichun avatar clemera avatar ctrl2wei avatar dalanicolai avatar dependabot[bot] avatar dima-369 avatar edmondfrank avatar gkowzan avatar hollowman6 avatar kuxiade avatar lhpfvs avatar loyalpartner avatar luhuaei avatar lujun9972 avatar mackong avatar manateelazycat avatar matthewzmd avatar mumu-lhl avatar springhan avatar stardiviner avatar taquangtrung avatar tumashu avatar vconcat avatar wsw0108 avatar xhcoding avatar yqu212 avatar zbelial avatar zsxh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emacs-application-framework's Issues

使用出现错误

每个命令都会出现这个错误 eaf exited abnormally with code 1

我想了解这个错误代码1可能是我哪里出现问题了

同时开启多个 app 会重叠

同时开启 "Pdf Viewer" 和 "Video Player",其中一个会覆盖另一个。
但是两个 app 可以同时运行,用鼠标可以聚焦/操作。应该是再一个 buffer 中。
下图中,中间的黑条部分是视频。

1

OS

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.4 (stretch)
Release: 9.4
Codename: stretch

Emacs

GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian
GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.11, cairo version 1.14.8) of 2018-07-14

Can you please guide on adding custom widgets?

I m trying to build an svg browser and editor... which will allow me render svg from plantuml or graphvz. after roaming from various sources i remember you had something similar which is able to render Qt into emacs buffer,

can you please advise on how can i perform the same thing to display the graph engine into emacs buffer ?

Cannot type capital letters in eaf's browser

When I try to type capital letters in an eaf browser buffer's input field, I get an error saying that the buffer is read-only. However, lower case letters work, and both trigger the self-insert-command.

System and emacs info:
Kubuntu 18.04
emacs 25.2.2
Possible conflicting plugin: evil

Suggestion: save eaf buffers in bookmarks

I really enjoy the speed and capabilities of eaf. However, it would be nicer and more user-friendly if we can save eaf buffers in bookmarks (or something similar to bookmarks)
Examples:

  • Browser: Save Google homepage in a bookmark so we don't need to manually type eaf-open-url RET https://www.google.com every time when we need to open google.
  • PDF Viewer: Save pdf files in a bookmark. When opening a pdf file directly from a bookmark, it goes to the position we saved last time, without manually finding the file. (similar behavior exists in pdf-tools already)
  • Same idea goes with video player, image viewer ...

Can eaf based on file manager develop kinds of application?

As a whole computer system , no matter what kinds of version linux, Mac and windows, all based file manager, I think emacs should do this too, espacially for amzoning eaf. For example, before open images or pdfs and other files with application, we first in the file manager, and then hit enter ,it auto run its application.i think if do this ,emacs can be described as the system fact.
As the file manager , the total commander is the best ,but shortcut the vim is the best. so if can combise the vim shortcut and the total commander function to implemente file manager ,eaf may be as described the really computer system

setup issues on Red Hat Enterprise Linux 6

At least python 3.5 is needed. Python 3.4 failed to install pyqt5. So I
had to create virtual environment for python 3.5 on my anaconda
installation.

On RH 6, dbus-daemon is not launched by default. So I had to add the
following bash starupt script:

if [ -z $DBUS_SESSION_BUS_ADDRESS ]; then
    eval `dbus-launch`
    export DBUS_SESSION_BUS_ADDRESS
fi

On RH 6, libc.so version is 2.12, but at least 2.14 is needed.
For now I use RH 7 as a work around.

I thought I would share this information in case you want to update your setup instruction.

Support for Wayland

Hi,

I have tried it on Wayland. It does not work.
Is there any plan to support wayland?

NameError: name 'unicode' is not defined

Environment

archlinux 福 ~/.emacs.d/elisp 
6620 ◯ : emacs --version                                                                                                                    
GNU Emacs 26.1
Linux archlinux 4.14.21-1-MANJARO #1 SMP PREEMPT Fri Feb 23 00:01:40 UTC 2018 x86_64 GNU/Linux

install

sudo pacman -S python-xlib python-pyqt5 python-pymediainfo has no problem.

archlinux 福 ~/.emacs.d/elisp 
6625 ◯ : sudo pip install PyMuPDF                                                                                                         ⏎ 

Requirement already satisfied: PyMuPDF in /usr/lib/python3.6/site-packages (1.13.11)
picard 2.0.0.dev7 requires PyQt5, which is not installed.

M-x eaf-open

In minbuffer, I type my path to pdf file

user-error: Minibuffer window is not active
Quit
Type C-w C-o to delete the help window, C-M-v to scroll help.
evil-forward-char: End of buffer [4 times]
helm-M-x: D-Bus error: "Traceback (most recent call last):
  File \"/usr/lib/python3.6/site-packages/dbus/service.py\", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File \"/home/czxyl/.emacs.d/elisp/emacs-application-framework/eaf.py\", line 65, in new_buffer
    return self.create_app(buffer_id, url, \"app.pdfviewer.buffer\")
  File \"/home/czxyl/.emacs.d/elisp/emacs-application-framework/eaf.py\", line 92, in create_app
    self.create_buffer(buffer_id, module.AppBuffer(buffer_id, url))
  File \"/home/czxyl/.emacs.d/elisp/emacs-application-framework/app/pdfviewer/buffer.py\", line 34, in __init__
    self.add_widget(PdfViewerWidget(url, QColor(0, 0, 0, 255)))
  File \"/home/czxyl/.emacs.d/elisp/emacs-application-framework/app/pdfviewer/buffer.py\", line 54, in __init__
    self.document = fitz.open(url)
  File \"/usr/lib/python3.6/site-packages/fitz/fitz.py\", line 628, in __init__
    elif type(filename) == unicode:
NameError: name 'unicode' is not defined
"
Quit [2 times]

Above is Messages buffer output.

How can I fix this?

BTW, image view and videw player work fine

eaf-open broken in Kali Linux

Stage:
sudo apt install python-xlib python-pyqt5 python-pymediainfo success
sudo pip install PyMuPDF grip success
emacs -Q
M-x eaf-open with ~/doc/RealWorldHaskell.pdf

Output Message:

EAF process starting...
*eaf* exited abnormally with code 1

When I manual execute python ~/.emacs.d/emacs-application-framework/app/pdfviewer/buffer.py
with error:

Traceback (most recent call last):
  File "buffer.py", line 28, in <module>
    from core.buffer import Buffer
ImportError: No module named core.buffer

Sys info:

Linux kali 4.15.0-kali2-amd64 #1 SMP Debian 4.15.11-1kali1 (2018-03-21) x86_64 GNU/Linux
emacs --version GNU Emacs 27.0.50
python --version  Python 2.7.14+
python3 --version ython 3.6.5rc1

Could not load the Qt platform plugin "xcb" in "" even though it was found

eaf error message

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

slackware14.2
emacs26.1

ModuleNotFoundError: No module named 'PyQt5.QtCore'

I installed all dependencies:

sudo pip3 install dbus-python pymupdf grip qrcode python-xlib pyqt5 pyqtwebengine

and when I try eaf-open-browser RET https://www.google.com and I get:

Traceback (most recent call last):
  File "/home/noloop/.emacs.d/emacs-application-framework/eaf.py", line 25, in <module>
    from app.browser.buffer import AppBuffer as NeverUsed # noqa
  File "/home/noloop/.emacs.d/emacs-application-framework/app/browser/buffer.py", line 22, in <module>
    from PyQt5.QtCore import QUrl
ModuleNotFoundError: No module named 'PyQt5.QtCore'

Can't run eaf-demo. ImportError: cannot import name 'QtWebEngineWidgets'

Ubuntu 16.04 LTS
GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-09-21 on lcy01-07, modified by Debian

When I run eaf-open with a URL or eaf-demo, it just displayed "eaf exited abnormally with code 1" and failed. Below is the error info from *eaf* buffer.

Traceback (most recent call last):
  File "/home/wei/.emacs.d/emacs-application-framework/eaf.py", line 25, in <module>
    from app.browser.buffer import AppBuffer as NeverUsed
  File "/home/wei/.emacs.d/emacs-application-framework/app/browser/buffer.py", line 24, in <module>
    from core.browser_buffer import BrowserBuffer
  File "/home/wei/.emacs.d/emacs-application-framework/core/browser_buffer.py", line 22, in <module>
    from core.browser import BrowserView, webview_scroll
  File "/home/wei/.emacs.d/emacs-application-framework/core/browser.py", line 23, in <module>
    from PyQt5 import QtWebEngineWidgets
ImportError: cannot import name 'QtWebEngineWidgets'
Traceback (most recent call last):
  File "/home/wei/.emacs.d/emacs-application-framework/eaf.py", line 25, in <module>
    from app.browser.buffer import AppBuffer as NeverUsed
  File "/home/wei/.emacs.d/emacs-application-framework/app/browser/buffer.py", line 24, in <module>
    from core.browser_buffer import BrowserBuffer
  File "/home/wei/.emacs.d/emacs-application-framework/core/browser_buffer.py", line 22, in <module>
    from core.browser import BrowserView, webview_scroll
  File "/home/wei/.emacs.d/emacs-application-framework/core/browser.py", line 23, in <module>
    from PyQt5 import QtWebEngineWidgets
ImportError: cannot import name 'QtWebEngineWidgets'
Traceback (most recent call last):
  File "/home/wei/.emacs.d/emacs-application-framework/eaf.py", line 25, in <module>
    from app.browser.buffer import AppBuffer as NeverUsed
  File "/home/wei/.emacs.d/emacs-application-framework/app/browser/buffer.py", line 24, in <module>
    from core.browser_buffer import BrowserBuffer
  File "/home/wei/.emacs.d/emacs-application-framework/core/browser_buffer.py", line 22, in <module>
    from core.browser import BrowserView, webview_scroll
  File "/home/wei/.emacs.d/emacs-application-framework/core/browser.py", line 23, in <module>
    from PyQt5 import QtWebEngineWidgets
ImportError: cannot import name 'QtWebEngineWidgets'
Traceback (most recent call last):
  File "/home/wei/.emacs.d/emacs-application-framework/eaf.py", line 25, in <module>
    from app.browser.buffer import AppBuffer as NeverUsed
  File "/home/wei/.emacs.d/emacs-application-framework/app/browser/buffer.py", line 24, in <module>
    from core.browser_buffer import BrowserBuffer
  File "/home/wei/.emacs.d/emacs-application-framework/core/browser_buffer.py", line 22, in <module>
    from core.browser import BrowserView, webview_scroll
  File "/home/wei/.emacs.d/emacs-application-framework/core/browser.py", line 23, in <module>
    from PyQt5 import QtWebEngineWidgets
ImportError: cannot import name 'QtWebEngineWidgets'

非常感谢你的代码
Awesome Works!

当窗口焦点位于eaf buffer时,emacs无法用f11切换到全屏

如题所示,如果手动切换焦点到minibuffer,则可以按f11切换到全屏。
此外,如果Emacs已经全屏,反而可以用f11切换回窗口状态。

复现步骤

  1. emacs -Q
  2. 添加load-path
  3. 确保Emacs是窗口状态
  4. M-x eaf-open 随便打开什么东西
  5. 尝试用f11切换,此时应当切换失败 (Emacs窗口闪烁一下但是没有报错, 也没有切换成功)
  6. 把焦点切换到非eaf buffer,进入全屏,焦点回到eaf buffer
  7. f11切换,此时应当成功

相关信息

OS: Archlinux
Qt library version: qt5-base 5.12.0-2 qt5-webengine 5.12.0-2 qt5-x11extras 5.12.0-2
PyQt bindings version: PyQt5 5.11.3 PyQt5-sip 4.19.13 python-xlib 0.23
Emacs version: 26.1
EAF version: commint d9681a9
Xorg: xorg-server 1.20.3-1

执行eaf-open后没有任何反应

Ubuntu 16.04.1 LTS
emacs26

使用M-x eaf-open 打开 pdf时,没有任何反应,*message* buffer中的信息为:

EAF process starting...
Opening /home/xxx/papers/1.pdf with eaf.pdfviewer

*eaf* buffer的信息为:

EAF process start.

使用M-x eaf-open www.baidu.com 时,*message* buffer中显示:

and :Symbol's value as variable is void: thing-at-point-short-url-regexp

*eaf* buffer中无任何显示。

ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

I already pip installed pyqt5 according to README sudo pip install dbus-python PyMuPDF grip qrcode pyqt5 python-xlib

When I try to open a pdf file, minibuffer gives this error:*eaf* exited abnormally with code 1

This is what I am seeing in *eaf* buffer:

Traceback (most recent call last):
  File "/home/matthewzmd/.emacs.d/site-elisp/emacs-application-framework/eaf.py", line 25, in <module>
    from app.browser.buffer import AppBuffer as NeverUsed # noqa
  File "/home/matthewzmd/.emacs.d/site-elisp/emacs-application-framework/app/browser/buffer.py", line 24, in <module>
    from core.browser_buffer import BrowserBuffer
  File "/home/matthewzmd/.emacs.d/site-elisp/emacs-application-framework/core/browser_buffer.py", line 22, in <module>
    from core.browser import BrowserView, webview_scroll
  File "/home/matthewzmd/.emacs.d/site-elisp/emacs-application-framework/core/browser.py", line 25, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage, QWebEngineContextMenuData
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

this and that didn't solve the problem.

let `eaf-open-camera` support camera taking photograph

I have not found any keybinding actions on eaf-open-camera. Can it support taking photograph and save to file?

And if it can support Emacs' built-in major-mode keybindings [C-h m] to list out current major-mode keybindings/commands will be helpful. I don't know whether this is possible for eaf buffer.

can't run eaf-terminal in wayland

I'm not sure if you intend to support running under wayland at all, but while most of the existing apps will at least open (though they seem to be integrated into emacs), eap-open-terminal fails with:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QSocketNotifier: Can only be used with threads started with QThread
EAF process start.
No data in session file, no need restore session.
X protocol error:
<class 'Xlib.error.BadWindow'>: code = 3, resource_id = <class 'Xlib.xobject.resource.Resource'>(0x00000002), sequence_number = 13, major_opcode = 7, minor_opcode = 0
CameraBin error: "Internal data stream error."
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QSocketNotifier: Can only be used with threads started with QThread
EAF process start.
Traceback (most recent call last):
  File "/home/matt/src/emacs-application-framework/eaf.py", line 114, in create_app
    self.create_buffer(buffer_id, url, module_path, arguments)
  File "/home/matt/src/emacs-application-framework/eaf.py", line 126, in create_buffer
    module = importlib.import_module(module_path)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/matt/src/emacs-application-framework/app/terminal/buffer.py", line 24, in <module>
    import QTermWidget
ModuleNotFoundError: No module named 'QTermWidget'

I've tried the following:
in Emacs (and even inside a let statement in a modified eap-start-process):

(setenv "QT_QPA_PLATFORM" "wayland")

in my .zshenv:

export QT_QPA_PLATFORM=wayland

Not sure what comes next, but htanks for htis interesting tool.

Error using `eaf-open` in spacemacs

From buffer *eaf*

Traceback (most recent call last):
  File "/home/compro/.spacemacs.d/emacs-application-framework/core/eaf.py", line 174, in <module>
    bus = dbus.SessionBus()
  File "/usr/lib/python3.6/site-packages/dbus/_dbus.py", line 211, in __new__
    mainloop=mainloop)
  File "/usr/lib/python3.6/site-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 122, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.BadAddress: '=' character not found or has no value following it

Using it on Arch Linux, GNOME.

Feature request: org-mode preview

You're back with an awesome project !
Congratulations :)

I've just seen that you've made a markdown preview.
Do you think it could be possible to have the same for org-mode file ?
It could be an awesome application for Emacs world domination ...

It's perhaps too difficult at present time but a thread was initiated on reddit on this subject with perhaps good ideas to grab as starting point:

https://www.reddit.com/r/emacs/comments/57nps0/orgmode_need_a_realtime_document_preview/

At this time emacs-application-framework was not born, so the world was not the same :)
Anyway many many thanks for this awesome project !

Regards,

What is fitz?

I'm missing this dependency, but looking it up on PyPI gives seemingly unrelated results. What packaged do I need to install for this?

As an aside, it would've been great if your setup.py was an actual setup script. At least mention your dependencies there...

BTW. I also had to

pacman -S python-pyqtwebengine qutebrowser

to get some of the missing stuff.

cannot eval eaf.el on mac os

when run eval-buffer on eaf.el got error :

Debugger entered--Lisp error: (dbus-error "No connection to bus" :session)
  signal(dbus-error ("No connection to bus" :session))
  dbus-register-signal(:session "com.lazycat.eaf" "/com/lazycat/eaf" "com.lazycat.eaf" "focus_emacs_buffer" eaf-focus-buffer)
  eval-buffer()  ; Reading at buffer position 10546
  funcall-interactively(eval-buffer)
  call-interactively(eval-buffer nil nil)
  command-execute(eval-buffer)

thing-at-point-short-url-regexp

eaf-open 输入不带 https:// 的网址时,得到错误:

and: Symbol’s value as variable is void: thing-at-point-short-url-regexp

eaf-open 输入带 https:// 的网址时, 得到错误:

EAF: /www.baidu.com is not exists.

*eaf* buffer 中均没有内容。

按照 #30 的方法重装 pyqt5 也没有效果,但我是一直可以打开 pdf。

我感觉是依赖问题,因为在我的家里和公司的两台电脑上都复现了,打开video是提示别的。。。

两台电脑上都是装的 ArchLinux 虚拟机,没有装桌面环境,只装了自己需要的一些软件,不知道还缺少什么依赖。。。

D-Bus error: No connection to bus, :session

Hi,
I installed the pytho librearies and included eaf in my init.el.
But when I start emacs I get this error:

Debugger entered--Lisp error: (dbus-error "No connection to bus" :session)
signal(dbus-error ("No connection to bus" :session))
byte-code("\306\307�"\204�\310 @ A"\210\202+\n\203�\311\312�"\210\313\314\315�#�\316�\f
��\317�&�\210\306\207" [rule err dbus-debug bus dbus-service-dbus dbus-path-dbus string-match "eavesdrop" signal message "Removing eavesdrop from rule %s" replace-regexp-in-string ",eavesdrop='true'" "" dbus-call-method "AddMatch" dbus-interface-dbus] 7)
dbus-register-signal(:session "com.lazycat.eaf" "/com/lazycat/eaf" "com.lazycat.eaf" "message_to_emacs" message)
eval-buffer(#<buffer load-377932> nil "/home/srubio/.emacs.d/elpa/eaf/eaf.el" nil t) ; Reading at buffer position 14243
load-with-code-conversion("/home/srubio/.emacs.d/elpa/eaf/eaf.el" "/home/srubio/.emacs.d/elpa/eaf/eaf.el" nil t)
require(eaf)
eval-buffer(#<buffer load> nil "/home/srubio/.emacs.d/init.el" nil t) ; Reading at buffer position 62
load-with-code-conversion("/home/srubio/.emacs.d/init.el" "/home/srubio/.emacs.d/init.el" t t)
load("/home/srubio/.emacs.d/init" t t)
#[0 "�\205\262 \306=\203�\307�\310Q\202; \311=\204�\307�\312Q\202;\313\307\314\315#\203*\316\202;\313\307\314\317#\203:\320\nB�\321\202;\316\322�\323�\322\211#\210�\322=\203a\324\325\326\307�\327Q!"\323�\322\211#\210�\322=\203��\210�\203\243\330�!\331\232\203\243\332�!\211\333P\334�!\203}\211\202\210\334�!\203\207�\202\210\314\262��\203\241\335��\"\203\237\336\337��#\210\340\341!\210��\266�\f?\205\260\314�\323\342\322\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
command-line()
normal-top-level()

versions of QT & PyQt5

    from app.browser.buffer import BrowserBuffer
<module>
    from PyQt5.QtWebKitWidgets import QWebView, QWebPage
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'

Hi,
QtWebKit got deprecated upstream in Qt 5.5 and removed in 5.6.
You may want to switch to PyQt5.QtWebEngineWidgets

Full-blown vs keyboard oriented browser/nav

Hi, thank you for bringing eaf.

Regarding browser navigation (and perhaps other plugins), are you planning a GUI approach as well
(URI / reload / navigation buttons);

or whether a strictly keyboard approach (vimium..)

perhaps both ..?

Not working with HiDPI

I am using emacs 26.2 on i3 on Arch Linux. On one machine with normal display (1366x768 on a 14 inch screen), eaf works. However, on the other machine with HiDPI (2560x1440 on a 14 inch screen), eaf is kind of cropped, as shown in the following picture.
1
To make things worse, the display from eaf totally covers the components from emacs, i.e. scroll bar, modeline, minibuffer, etc. It also blocks all inputs to emacs. I tried wrapping

app = QApplication(sys.argv)

with

        os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
        app = QApplication(sys.argv)
        app.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)

as suggested by pyat5 and 4k screen, but it didn't work.

I managed to make it work with the following quick hack since I have a scale of 2. Ideally, this number should come from some variable or environmental variable. This can be tricky though: this might involve scaling both from the python side and the emacs side. Since currently PDF is showing a little bit of blur, I guess the proper way of handling would be emacs pass the exact available width/height, while PyQt handles the HiDPI case.

modified   eaf.el
@@ -221,6 +221,8 @@ We need calcuate render allocation to make sure no black border around render co
          (width (frame-pixel-width))
          ;; Render height should minus mode-line height, minibuffer height, header height.
          (height (- (frame-pixel-height) (window-mode-line-height) (window-pixel-height (minibuffer-window)) window-header-height)))
+    (setq width (/ width 2)
+          height (/ height 2))
     (mapcar (lambda (x) (format "%s" x)) (list width height))))
 
 (defun eaf-get-window-allocation (&optional window)
@@ -230,6 +232,10 @@ We need calcuate render allocation to make sure no black border around render co
          (w (- (nth 2 window-edges) x))
          (h (- (nth 3 window-edges) y))
          )
+    (setq x (/ x 2)
+          y (/ y 2)
+          w (/ w 2)
+          h (/ h 2))
     (list x y w h)))
 
 (defun eaf-generate-id ()

One minor thing that I need to mention is that when an eaf buffer is focused, it does not seem to pass emacs commands to emacs. Since it also happens to my other machine, I guess I should report a separate bug for this?

*eaf* aborted: core dumped

I’ve installed all the relevant libraries (I’ve tried this both by installing them through pip3 and through the Ubuntu package manager), cloned the repository, added it to my load-path, and evaluated (require 'eaf). I tried loading a page with eaf-open-url (http://sega.com/ to be precise) and it loaded… but before I could click anything or scroll very far, I would get an error, “*eaf* aborted: core dumped”, which would leave me with a blank buffer. (I think the first time I tried this I got the “*eaf* exited abnormally with code 1” error, so this might be related to #32, I’m not sure. But, I tried several more times, and then I always got the “core dumped” error.)

I tried this all again using emacs -Q, and again it loaded the page, but instead of crashing, it… froze my entire system. When I finally got to a terminal (Ctrl+Alt+F1, but it took a while), I ran top and saw that the python3.6 process was using 99% to 100% of my CPU cycles. This is a neat concept for a package, I hope I can get it working 😓

ImportError: No module named app.browser.buffer

Traceback (most recent call last):
File "/home/magic/.emacs.d/elpa-alone/emacs-application-framework/core/eaf.py", line 35, in
from app.browser.buffer import BrowserBuffer
ImportError: No module named app.browser.buffer

用eaf-open打开没反应,但是其他的正常

eaf
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
EAF process start.
error: cannot find startxref
warning: trying to repair broken xref
warning: repairing PDF document
warning: object missing 'endobj' token
error: non-page object in page tree

Messages
EAF process starting...
Opening /home/emacser/Downloads/linxhuibian.pdf with eaf.pdfviewer

Is this a replacement for Xwidgets?

According to the Emacs wiki, Emacs can use Gtk widgets. Is this project related to the Xwidgets feature?

I don't see you mention this in the document, and I'm curious how this works.

*eaf* exited abnormally with code 1

在 ArchLinux 上装的 Emacs-26.1, X11转发到 win10, 软件为 Mobaxterm

eaf-open 打开pdf或者图片时都出现这个错误,打开其他格式估计也一样。

*eaf* 中的内容:

Traceback (most recent call last):
  File "/home/lyf/.emacs.d/emacs-application-framework/eaf.py", line 25, in <module>
    from app.browser.buffer import AppBuffer as NeverUsed # noqa
  File "/home/lyf/.emacs.d/emacs-application-framework/app/browser/buffer.py", line 24, in <module>
    from core.browser_buffer import BrowserBuffer
  File "/home/lyf/.emacs.d/emacs-application-framework/core/browser_buffer.py", line 22, in <module>
    from core.browser import BrowserView, webview_scroll
  File "/home/lyf/.emacs.d/emacs-application-framework/core/browser.py", line 25, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage, QWebEngineContextMenuData
ImportError: libsmime3.so: cannot open shared object file: No such file or directory

并且不知道被哪个包影响了,eaf-open 时补全提示始终带有本机路径,无法正常输入网址,推测可能是ivy.

Always load path no matter what I type in

Environment

archlinux 福 ~/.emacs.d/elisp 
6620 ◯ : emacs --version                                                                                                                    
GNU Emacs 26.1
Linux archlinux 4.14.21-1-MANJARO #1 SMP PREEMPT Fri Feb 23 00:01:40 UTC 2018 x86_64 GNU/Linux

install

sudo pacman -S python-xlib python-pyqt5 python-pymediainfo has no problem.

archlinux 福 ~/.emacs.d/elisp 
6625 ◯ : sudo pip install PyMuPDF                                                                                                         ⏎ 

Requirement already satisfied: PyMuPDF in /usr/lib/python3.6/site-packages (1.13.11)
picard 2.0.0.dev7 requires PyQt5, which is not 

M-x eaf-open

When I type www.baidu.com in minbuffer, like the gif below:

peek 2018-07-04 11-52

First, it will load my current directory in minbuffer automatically, then I remove the path and input www.baidu.com. But it is still regarded as path, not url.

Quit
Kill f5635b35-90df-ba0c-5634-405c82c57974
Path /run/media/czxyl/0C3203E00C3203E0/book/book/www.baidu.com not exists.
Mark set

BTW, image view and videw player work fine, while demo(eaf-demo) and camera(eaf-camera) also fail because the are regrded as path:
Path /run/media/czxyl/0C3203E00C3203E0/book/book/eaf-demo not exists.

Mediaplayer - no service found

I can get the browser, image and pdf viewers to work fine but I have problems playing videos. I see the following message in the *eaf* buffer:

defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

Am I missing a dependency?

M-x eaf-open

  • 4.16.16-300.fc28.x86_64
  • GNU Emacs 26.1
  • Package python3-xlib-0.20-4.fc28.noarch is already installed
  • Package python3-qt5-5.10-3.fc28.x86_64 is already installed
EAF process starting...
*eaf* exited abnormally with code 2

Typo in README.md

sudo pip3 instlal PyMuPDF grip qrcode

should be

sudo pip3 install PyMuPDF grip qrcode

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.