oh-my-fish / plugin-emacs Goto Github PK
View Code? Open in Web Editor NEWWrapper for daemon functionality of Emacs.
License: MIT License
Wrapper for daemon functionality of Emacs.
License: MIT License
Ideally funced should do something like this:
function fed
funced -e "emacsclient -a ''" $argv
end
But instead this is what funced looks like:
$ funced fed
Editor exited but the function was not modified
which is not desireable. This seems to be because it is called with --no-wait
, which is not how funced
is designed.
Try this:
function fedupwithbug
funced -e "emacsclient -a '' --no-wait" $argv
end
fedupwithbug fedupwithbug
The file __launch_emacs.fish
assumes that (x-display-list)
will return nil
when all the frames are closed.
This doesn't always happen on my system, where it will stay as '(":1")' even when I have no frames open. This results in e
silently doing nothing and returning to the command line.
A workaround is to call ec
.
Reproduction steps:
(setf (symbol-function 'x-display-list) (lambda (&rest ignore) '(":1")))
/usr/bin/emacs
.e ~
and it will not open a new frame.Running emacs --version
starts a new emacs (done in __major_version
in init.fish
). Probably should not do this.
This function should call emacsclient instead.
On Linux I get an empty commit message in any terminal because Emacs is called with the --no-wait
option.
A function for git commits with waiting would be nice e.g.:
function gmacs
__launch_emacs $argv --create-frame
end
I have multiple versions of Emacs installed -- but I am not sure that is the problem. When I cd
into either /usr/bin
or /usr/local/bin
, I get the following error:
Invalid argument: '' 14:20:23
~/.config/fish/functions/./emacs.fish (line 30):
if test "$__emacs_version" -gt 23
^
in function 'init' with arguments '/home/pymander/.local/share/omf/pkg/emacs'
called during startup
in event handler: handler for generic event “init_emacs”
called during startup
Invalid argument: ''
~/.config/fish/functions/./emacs.fish (line 30):
if test "$__emacs_version" -gt 23
^
in function 'init' with arguments '/home/pymander/.local/share/omf/pkg/emacs'
called during startup
in event handler: handler for generic event “init_emacs”
called during startup
Hello, I've just upgraded Fish to 2.7.1 (from 2.6 I think) and now I have the following error message every time I open a new term (or when I omf reload
):
omf reload
test returned eval errors:
invalid integer ''
If I remove the emacs
plugin then the error disappears. Debug mode gives me:
<5> fish: intern /Users/nico/.local/share/omf/pkg/emacs/init.fish
<3> fish: path_get_path( 'sed' )
<4> fish: Exec job 'echo $full_version | sed "s/\..*//"' with id 10
<4> fish: Created pipe using fds 7 and 8
<2> fish: Fork #16, pid 12628: internal builtin for 'echo'
<5> fish: universal log sync
<5> fish: universal log sync elided based on fast stat()
<5> fish: universal log no modifications
<2> fish: Fork #17, pid 12629: spawn external command '/usr/bin/sed' from '/Users/nico/.local/share/omf/pkg/emacs/init.fish'
<3> fish: Job is constructed
<4> fish: Continue job 10, gid 12612 (echo $full_version | sed "s/\..*//"), UNCOMPLETED, NON-INTERACTIVE
<3> fish: select_try on 5
<3> fish: proc::read_try('echo $full_version | sed "s/\..*//"')
<3> fish: select_try on 5
<3> fish: proc::read_try('echo $full_version | sed "s/\..*//"')
<4> fish: io_buffer_t::read: blocking read on fd 5
<4> fish: Exec job 'set -l major_version (echo $full_version | sed "s/\..*//")' with id 11
<3> fish: Skipping fork: no output for internal builtin 'set'
<3> fish: Set status of set -l major_version (echo $full_version | sed "s/\..*//") to 0 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 11, gid -2 (set -l major_version (echo $full_version | sed "s/\..*//")), COMPLETED, NON-INTERACTIVE
<3> fish: proc::read_try('set -l major_version (echo $full_version | sed "s/\..*//")')
<4> fish: Exec job 'echo $major_version' with id 10
<3> fish: Skipping fork: buffered output for internal builtin 'echo'
<3> fish: Set status of echo $major_version to 0 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 10, gid -2 (echo $major_version), COMPLETED, NON-INTERACTIVE
<3> fish: proc::read_try('echo $major_version')
<3> fish: Job is constructed
<4> fish: Continue job 6, gid -2 (__major_version $__emacs), COMPLETED, NON-INTERACTIVE
<3> fish: proc::read_try('__major_version $__emacs')
<4> fish: io_buffer_t::read: blocking read on fd 3
<4> fish: Exec job 'set __emacs_version (__major_version $__emacs)' with id 9
<5> fish: universal log sync
<5> fish: universal log sync elided based on fast stat()
<5> fish: universal log no modifications
<3> fish: Skipping fork: no output for internal builtin 'set'
<3> fish: Set status of set __emacs_version (__major_version $__emacs) to 0 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 9, gid -2 (set __emacs_version (__major_version $__emacs)), COMPLETED, NON-INTERACTIVE
<5> fish: intern /Users/nico/.local/share/omf/pkg/emacs/init.fish
<4> fish: Exec job 'test "$__emacs_version" -gt 23' with id 6
<3> fish: Skipping fork: ordinary output for internal builtin 'test'
test returned eval errors:
invalid integer ''
<3> fish: Set status of test "$__emacs_version" -gt 23 to 1 using short circuit
I do think that some internals of Fish have changes and that integer comparison done in this plugin to check Emacs version breaks plugin init.
Hope you can fix it. Feel free to ask me if I can be of any help.
The current regex
grep -o "[0-9]\+.[0-9]\+.[0-9]\+"
would fail on version like: GNU Emacs 26.1
. A small tweak to
grep -oE "[0-9]+\.[0-9]+(\.[0-9]+)?"
could make it work.
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.