summaryrefslogblamecommitdiffstats
path: root/2020/info/34.md
blob: 0b4b1b84c0c9d209ecc5062c7f67ee3f8754b73a (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                  





                                                                      































































































                                                                                                                                                                                                                                                                                                                                                                                                       
# Extend Emacs to Modern GUI Applications with EAF
Matthew Zeng

Emacs Application Framework (EAF) is a customizable and extensible GUI
application framework that extends Emacs graphical capabilities using
PyQt5.  This talk will cover the architecture design of the EAF
project, and demonstrate some of its most useful applications: modern
browser, PDF viewer, video player, etc.

<!-- from the pad --->

-   Actual start and end time (EST): Start 2020-11-29T16:05; Stop 2020-11-29T16:28


# Questions


## Q9: Do you think that this tecnology could to be on core of Emacs any time? or fork of Emacs?


### Not yet and I don't know if it ever will, since EAF uses many other dependencies that one needs to install themselves (see README); and I don't think all of them is GPL (though using open source licenses)


## Q8: I use pdf-tools currently for my pdfs inside Emacs, would you consider this a better alternative to that and if so why? Although I am definitely trying it because the browser looks incredible, possibly the best implementation of an Emacs browser I have seen, I would love to hear your opinion on the pdfs compared to something like pdf-tools.


### PDF-tools is great, it would be an awesome option if you can't run EAF on your machine. However EAF PDF Viewer is just **a lot faster and smoother** as it uses PyMuPDF as its backend.

-   Oh, thats great actually, I have noticed it being a little choppy at times, I am excited to try EAF in general because it looks awesome and if its faster than pdf-tools I will probably also switch to it for my pdfs. Thanks a lot for the talk, one of my favourites in this EmacsConf, it gave me a lot of great tools to try inside Emacs!!

-   Thank you!!!


### Also because pdf-tools is much older than EAF, it had more attention and more people working on it, so there are definitely more features than the current EAF


## Q7: Can you use the PDF viewer as a viewer for LaTeX files, with reverse search support with e.g. AucTeX?


### You could do that with some simple elisp functions, and EAF PDF Viewer now updates itself automatically whenever there is a change to the file


### Reverse search is currently not available, we need more people to help us work on it! :-)


## Q6: What javascript engine is the web browser in EAF using? Also, what web browser engine is it using?


### QtWebEngine,. (from the Qt Wiki: )

-   Qt WebEngine uses code from the Chromium project. However, it is not containing all of Chrome/Chromium;

-   Auxiliary services that talk to Google platforms are stripped out (nice)

-   The codebase is modularized to allow use of system libraries like OpenSSL

-   Binary files are stripped out


## Q5: Does the web rendering happen in a subprocess, or can loading a big page cause emacs to lag?


### Not at all! And that's one of the biggest advantage of the EAF project, it utilizes all the powerful Python features, like multithreading.


## Q4: Do you have control over the javascript that  runs on these pages? Also is there a blocklist feature? (True ad blocking might be impossible, I understand)


### As my talk just (or will be shortly) mentioned, you can disable javascript altogether. So far there isn't a blocklist implemented, but I don't see a reason not to be able to implement this feature in the near future. EAF itself uses Javascript (free code) to implement some browser features (like the Vimium binding), so turning off Javascript will make the feature stop working as well.


## Q3: (Feel free to ignore this one if it is off-topic) How big is free software movement in China? Is there any organisation like FSF there?


### Very recent years there are A LOT of open source movement in China, however not free software strictly speaking;


### There are a lot of open source clubs in the chinese unversities now that people actually starting to get interested about open source in general, that's a huge improvement than decades ago i'd say. There are still many places to improve.


### Although not Free Software Foundation, literally this year the first ever open source foundation is established in China, called OpenAtom Foundation: <https://www.openatom.org/#/> (in chinese)


## Q2: Is there anyway to implement EAF without the reparenting behavior from X11?


### That's one of the challenges right now to get EAF working on other platforms. We're always looking for people to help out.

-   Are there any ideas on this at all? I can try to help out but don't know what's even been tried (and perhaps has already been ruled out)

    -   So EAF is currently using \`QWindow::setParent \`, not Xreparent, so it in theory should be able to support at least Windows (iirc it provided API for setParent function to interact with)
    
    -   However QWindow::setParent doesn't work on native wayland, you can get more context in here: <https://github.com/manateelazycat/emacs-application-framework/issues/449>


## Q1: Have you experimented with using Hy (aka Hylang, a Lisp that compiles to/runs in Python) for EAF, to avoid having to write "real Python"?


### Not yet! Will have a look into it later :-)


# Notes

-   <https://github.com/manateelazycat/emacs-application-framework>