Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ivy and Umlaute/Acents #1899

Closed
phikal opened this issue Jan 20, 2019 · 6 comments
Closed

Ivy and Umlaute/Acents #1899

phikal opened this issue Jan 20, 2019 · 6 comments

Comments

@phikal
Copy link
Contributor

@phikal phikal commented Jan 20, 2019

I've just discovered counsel-org-goto-all today, and it's exactly what I've been looking for, for quite a while. My only issue is that, since some of my org files are in German, despite me not having a QWERTZ keyboard, I have Umlaute in some of my headings, which I can't match.

The easy solution is for example to just skip them, so when wanting to match übung I'd type bung but that seems counter-intuitive. Could there be a system to overcome this issue, such as doing something with the current input-method, or other fixed transformations (an alist listing rules, like every u matches u and ue, or ue is converted to ü).

If there is such a mechanism already, I apologize upfront that I couldn't find it.

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jan 21, 2019

You can use toggle-input-method, I use it all the time everywhere in Emacs to toggle between English and Ukrainian.

Here's the customization I use:

(setq default-input-method "ukrainian-computer")

If you set it to "german", e.g. the key next to "p" becomes "ü". The default key binding is C-\, it's a toggle, so you switch back by pressing it again.

@phikal
Copy link
Contributor Author

@phikal phikal commented Jan 21, 2019

Yes, I use that from time to time (specifically with perman-postfix), what I was wondering about was if this could be activated automatically on a per-function basis (like ivy-re-builders-alist).

If not, or if this is not something there's interest in doing, just close this issue.

@abo-abo abo-abo closed this in 34a72e2 Jan 22, 2019
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jan 22, 2019

could be activated automatically on a per-function basis

Thanks, this is now possible via ivy-hooks-alist. Please test.

@basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Feb 12, 2019

If there is such a mechanism already, I apologize upfront that I couldn't find it.

Vanilla Emacs calls this mechanism "character folding", and it is documented under (emacs) Lax Search. It can be enabled either by default by setting search-default-mode to the function char-fold-to-regexp, or by interactively typing M-s' (isearch-toggle-char-fold) within an Isearch session.

Swiper does not currently have a command or key to toggle character folding like Isearch does, but Swiper does behave as expected when search-default-mode is set to char-fold-to-regexp.

@phikal
Copy link
Contributor Author

@phikal phikal commented Feb 12, 2019

Thanks for the note! I tried it out and it seems to work, at least with isearch and swiper, but sadly not with counsel-org-goto-all...

@basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Feb 12, 2019

Right. A feature request in its own right, perhaps.

astoff added a commit to astoff/swiper that referenced this issue Jan 1, 2021
Example:

    (setq ivy-hooks-alist
          '((counsel-rhythmbox . toggle-input-method)))

Should `ivy-initial-inputs-alist' become obsolete?

Fixes abo-abo#1899
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants