zachcurry / emacs-anywhere

Configurable automation + hooks called with application information
MIT License
1.08k stars 49 forks source link

WIP Improved Install and Linux support #34

Closed zachcurry closed 6 years ago

zachcurry commented 6 years ago

Please test this branch by installing as follows:

curl -fsSL https://raw.github.com/zachcurry/emacs-anywhere/release_1.1/install | bash

What's new

The install implementation has been modified to more closely resemble that of cknadler/vim-anywhere. This fixed the issue where the scripts fail when run from outside the root of the repo.

The install script also checks for dependencies now, which I hope will give some users instant feedback as opposed to having to open an issue here and wait for an answer.

Also this branch should fix most of the "Not working in my Linux" issues.

Soon I'll add the Emacs command to abort Emacs Anywhere mid-session.

I will be force pushing squashed commits to this branch until I'm finished, so stay tuned!

Let's try to get as many people testing and sanity checking this code as possible!

DavidLarsson commented 6 years ago

This still doesn't work for me on Linux. I think a better way to solve the problems for Issue 18 is PR#23 by @psibi. This branch still uses the idea that Ctrl-V is a universal way to paste, but even when I use an application that has Ctrl-V as its paste binding I don't get the buffer contents, but instead whatever was on the clipboard before. I agree with @psibi that clipboards in Linux are somewhat tricky and not as idiomatic as using files.

zachcurry commented 6 years ago

@DavidLarsson Do you have xclip installed? If so, can you verify that it is capable of putting content in your clipboard? If so, can you verify that Emacs is integrated with the system clipboard.

Bypassing the clipboard could be a configuration option in the future, but it will need to be implemented for both osx and linux, otherwise it's not getting merged. Also, I worry that having xdotool attempt to type arbitrary text of arbitrary length could be it's own source of problems, especially if it needs to add a delay to work with large pieces of text. Any PR that introduces an element of time/timing will not be merged.

psibi commented 6 years ago

@zachcurry Going via clipboard path is messy in Linux so I'm not supportive of this PR.

zachcurry commented 6 years ago

@psibi Thanks for your feedback! I'm open to adding an option to bypass the clipboard but, I'm not going to remove clipboards from the repository! Clipboards are a part of this repository. Period.

psibi commented 6 years ago

@zachcurry If you can give some emacs option to configure it from init.el file, that would solve the issue.

zachcurry commented 6 years ago

@psibi I was thinking of adding a bash config file to the repo instead. That way we don't require the user to edit their init.el. The environment variables are accessible in Emacs.

zachcurry commented 6 years ago

This didn't work because of a simple typo 😆 Not the most productive code review i've participated in...