akermu / emacs-libvterm

Emacs libvterm integration
GNU General Public License v3.0
1.67k stars 134 forks source link

Can't insert + or * (plus or asterisk) characters #381

Closed dangirsh closed 3 years ago

dangirsh commented 3 years ago

Thanks for this package! vterm in Emacs is now my primary terminal.

I find that I can't insert the + or * key anymore. Not sure what changed, or how recently. Pasting in these characters works, and characters ^=&!@#$~{(<>)]}%/\';|:". and backtick all work fine.

Any tips for debugging this greatly appreciated!

System info:

``` emacs version 28.0.50 features XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER LCMS2 build Aug 05, 2020 buildopts (--with-modules) windowsys x daemonp nil doom version 2.0.9 build grafted, HEAD -> develop, origin/develop, origin/HEAD 00a8f75 2020-08-05 03:32:21 -0400 dir ~/.doom.d/ system type gnu/linux config x86_64-pc-linux-gnu shell /bin/bash uname Linux 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 path (~/.cargo/bin /bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games /snap/bin /usr/local/go/bin ~/emacs-src-new/lib-src/) config envfile envvar-file elc-files 0 modules (:personal neurosys :completion (company +childframe) (ivy +prescient +childframe) :ui deft doom hl-todo modeline nav-flash zen :editor lispy multiple-cursors word-wrap :emacs dired electric vc :term vterm :checkers syntax :tools direnv (eval +overlay) docker lookup (magit +forge) pass pdf :lang common-lisp data emacs-lisp javascript (haskell +dante) (latex +latexmk +cdlatex) markdown nix (org +journal +hugo +jupyter) rust sh :app calendar :config literate (default +bindings +smartparens)) packages ((ace-window) (aggressive-indent) (company-org-roam :recipe (:host github :repo jethrokuan/company-org-roam)) (company-posframe) (deadgrep) (dired-narrow) (dmenu) (google-this) (helpful) (jest) (key-chord) (org-cliplink) (org-download) (org-drill) (org-noter) (org-recoll :recipe (:host github :repo alraban/org-recoll)) (org-ref) (org-roam :recipe (:host github :repo jethrokuan/org-roam)) (org-roam-bibtex) (org-roam-server) (phi-search) (ob-rust) (real-auto-save) (smartscan) (toc-org) (undo-tree) (wrap-region) (julia-mode :pin 1c122f1dff) (julia-snail) (julia-repl :recipe (:host github :repo tpapp/julia-repl :branch tp/terminal-backends))) unpin (n/a) elpa (n/a) ```
Sbozzolo commented 3 years ago

What is the output of C-h +? Can you reproduce with emacs -Q?

dangirsh commented 3 years ago

C-h + is undefined.

Assuming you meant C-h k +, that's (vterm--self-insert), which other characters are also bound to, including *.

The problem reproduces exactly with emacs -Q

Specifically, in a fresh emacs -Q, I ran:

(add-to-list 'load-path "/home/dan/.emacs.d/.local/straight/repos/emacs-libvterm")
(require 'vterm)

It then asked me to recompile the module, which I did.

The ran (require 'vterm) again, which opened a terminal window. Neither the + or * keys would insert characters.

Sbozzolo commented 3 years ago

Thanks, I meant C-h k +. I am surprised that the problem occurs with emacs -Q. Could it be that your system is capturing + and * for some reason? The other possible explanation is that emacs28 is the problem. I can offer this as a temporary workaround

(defun vetrm-send-plus ()
    (interactive)
    (vterm-send-string "+"))

Then you bind this to +. Similarly with *.

I will try emacs 28 to see if there's anything wrong with it.

dangirsh commented 3 years ago

Thanks!

Your fix works for me.

My system is XMonad running on Xubuntu 20.04 (though the same problem occured on 18.04). No desktop environment is running.

I'm pretty sure I would have noticed this problem sooner if XMonad was the culprit, so my guess is it's a new Emacs issue.

On Mon, Aug 10, 2020 at 9:23 AM Gabriele Bozzola notifications@github.com wrote:

Thanks, I meant C-h k +. I am surprised that the problem occurs with emacs -Q. Could it be that your system is capturing + and * for some reason? The other possible explanation is that emacs28 is the problem. I can offer this as a temporary workaround

(defun vetrm-send-plus () (interactive) (vterm-send-string "+"))

Then you bind this to +. Similarly with *.

I will try emacs 28 to see if there's anything wrong with it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akermu/emacs-libvterm/issues/381#issuecomment-671454316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI6TEMKZD6KIUCECH6MINDSAANJJANCNFSM4PZMGRSA .

Sbozzolo commented 3 years ago

I updated to Emacs 28 and I found that + and * work (on my machine), so it's likely not a general problem with Emacs 28.

jixiuf commented 3 years ago

does 1dd2e5eb5edb6decd7c2400f1143de6aa65a0550 fix your problem

437

dangirsh commented 3 years ago

@jixiuf Yes, that was the issue.

I had accidentally bound the numeric plus to my keyboard instead of the normal plus. Hadn't realized there were two plusses!