kdmsnr Posted May 19, 2021 Share Posted May 19, 2021 (edited) Snippets Auto Expansion doesn't work on Emacs.app (macOS). Are there any workarounds? macOS Catalina 10.15.7 Emacs 27.2 Screenshot: https://gyazo.com/d0e02aa9ad31df2d95cb05d41b599978 Edited May 19, 2021 by kdmsnr Link to comment
deanishe Posted May 19, 2021 Share Posted May 19, 2021 (edited) Hi @kdmsnr, welcome to the forum. Have you tried adjusting Alfred’s Tweaking options? Try making the Restore After delay longer. It looks like the problem is when Alfred tries to paste the snippet. How well does pasting into Emacs.app with ⌘V work? Edited May 19, 2021 by deanishe Link to comment
kdmsnr Posted May 19, 2021 Author Share Posted May 19, 2021 (edited) Thank you for your reply. I've found the reason. It is because that Alfred doesn't care about the Emacs paste key is not ⌘V. Dash cares about that and I assumed Alfred also would do so, but it doesn't. 😢 Edited May 19, 2021 by kdmsnr Link to comment
deanishe Posted May 19, 2021 Share Posted May 19, 2021 18 minutes ago, kdmsnr said: Dash cares about that and I assumed Alfred also would do so, but it doesn't. 😢 Does Dash use the clipboard to insert snippets? Link to comment
kdmsnr Posted May 19, 2021 Author Share Posted May 19, 2021 Yes, same as Alfred. But it use "^-y" instead of "⌘V" on Emacs. Link to comment
Mr Pennyworth Posted May 19, 2021 Share Posted May 19, 2021 If like me, you don't care about what emacs does with ⌘-v by default, you can add the following to your ~/.emacs;; Make macOS paste work with ⌘-v (global-set-key (kbd "M-v") 'clipboard-yank) Link to comment
kdmsnr Posted May 19, 2021 Author Share Posted May 19, 2021 Thank you, but I use the key as "cua-scroll-down" as default. Link to comment
deanishe Posted May 19, 2021 Share Posted May 19, 2021 5 hours ago, kdmsnr said: Thank you, but I use the key as "cua-scroll-down" as default. Then I think you’re probably out of luck wrt Alfred snippets in Emacs.app. @Andrew might consider special-casing Emacs.app, but I’d say the fault for the issue lies squarely with Emacs for not respecting basic macOS platform standards. Link to comment
kdmsnr Posted May 19, 2021 Author Share Posted May 19, 2021 > I’d say the fault for the issue lies squarely with Emacs for not respecting basic macOS platform standards. Well, you probably don't know much about Emacs. It's definitely Alfred's fault. As I mentioned earlier, the Dash support nicely. Link to comment
deanishe Posted May 19, 2021 Share Posted May 19, 2021 (edited) 3 hours ago, kdmsnr said: Well, you probably don't know much about Emacs. Dude, it (or at least yours) doesn't support ⌘V on macOS. It's clearly Emacs that's not playing by the rules here… 3 hours ago, kdmsnr said: As I mentioned earlier, the Dash support nicely. Maybe Dash's developer is an Emacs user? Dunno. Point is, if an app doesn't support ⌘V for paste on macOS, I'd consider it a massive ask to expect any other apps' developers to work around that, and it would be going above and beyond if they did, imo. You're totally right that I don't know much at all about Emacs (neovim all the way, baby!), but I do know you could get Alfred's snippet expansion to work yourself with a couple of lines of lisp… Edited May 19, 2021 by deanishe tuti0203 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now