You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a question than a bug report but perhaps it is buggy on osx.
In emacs-everywhere-insert-selection the behavior of gui-get-selection is a bit odd. If the app isn't emacs where emacs-everywhere was invoked, then there is no text inserted. However, if emacs has selected text, then sometimes that text is inserted into the frame's buffer.
Is the intended behavior to insert the selected text from the app where emacs-everywhere was invoked? If so, I believe the portable way to do that is to use apple script (as you do in other parts).
As a proof of concept I made this work with this code:
(defunemacs-everywhere-insert-selection ()
"Insert the last text selection into the buffer."
(call-process"osascript"nilnilnil"-e""tell application \"System Events\" to keystroke \"c\" using command down")
(sit-for0.01) ; prevents weird multi-second pause, lets clipboard info propagate
(yank)
(when (and (eq major-mode 'org-mode)
(emacs-everywhere-markdown-p))
(shell-command-on-region (point-min) (point-max)
"pandoc -f markdown-auto_identifiers -t org"nilt)
(deactivate-mark) (goto-char (point-max))))
It's basically the same but is hardcoded for darwin. I can make a PR if that's the intended behavior / acceptable solution (but obviously changed to only use osascript for darwin).
The text was updated successfully, but these errors were encountered:
New emacs-everywhere user here. I want to follow up on this closed issue because I'm still having the original documented behavior - sometimes Emacs includes its clipboard text, other times it gets the selected text.
When I changed this line to have 0.1 second delay:
(sleep-for 0.1)
it works every time. Apparently I need just a little more time to propogate the clipboard - I bet emacs-everywhere loads too fast (it's pretty instantaneous. I love it!).
Is this something I should keep patching in my own custom version or would it be beneficial to share as a PR?
This is more of a question than a bug report but perhaps it is buggy on osx.
In
emacs-everywhere-insert-selection
the behavior ofgui-get-selection
is a bit odd. If the app isn't emacs whereemacs-everywhere
was invoked, then there is no text inserted. However, if emacs has selected text, then sometimes that text is inserted into the frame's buffer.Is the intended behavior to insert the selected text from the app where
emacs-everywhere
was invoked? If so, I believe the portable way to do that is to use apple script (as you do in other parts).As a proof of concept I made this work with this code:
It's basically the same but is hardcoded for darwin. I can make a PR if that's the intended behavior / acceptable solution (but obviously changed to only use osascript for darwin).
The text was updated successfully, but these errors were encountered: