a13 / reverse-im.el

116 stars 4 forks source link

Doesn't work at all #30

Open kyryloz opened 2 years ago

kyryloz commented 2 years ago

Hi. I remember trying this package couple of years ago and it worked well (but probably it was Doom Emacs). But currently, for vanilla Emacs, it doesn't work at all for me.

I'm using the latest macOS, emacs-plus (GNU Emacs 28.1), and my init.el is:

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(package-initialize)

;; bootstrap use-package
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(require 'use-package)

(require 'use-package-ensure)
(setq use-package-always-ensure t)

(use-package reverse-im
  :ensure t ; install `reverse-im' using package.el
  :demand t ; always load it
  :after char-fold ; but only after `char-fold' is loaded
  :custom
  (reverse-im-char-fold t) ; use lax matching
  (reverse-im-read-char-advice-function #'reverse-im-read-char-include)
  (reverse-im-input-methods '("ukrainian-computer")) ; translate these methods
  :config
  (reverse-im-mode t)) ; turn the mode on

But when I'm switching to the UA keyboard it doesn't work:

M-ч is undefined C-с is undefined

kyryloz commented 2 years ago

I don't know how, but suddenly it started working. Not everything, like "CMD+S" doesn't save the buffer (it's the default for emacs-plus), but C-c, C-x works! I've probably just rebooted the MacBook or something.

UPD: just after I wrote this it stopped working again.

a13 commented 2 years ago

sorry for delay, but looks like you didn't load char-fold library, because of that Reverse-im waits for it to load :config part. So either you have to remove char-fold related settings or add it to config, like

(use-package char-fold
  :custom
  (char-fold-symmetric t)
  (search-default-mode #'char-fold-to-regexp))