Giter Site home page Giter Site logo

hyunggyujang / migemo-hangul.el Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 17 KB

It resolves macOS's hangul encoding discrepancy of NFD from more conventional NFC. That is, known as 한글 파일명 자소 분리 problem.

License: GNU General Public License v3.0

Emacs Lisp 100.00%
emacs migemo hangul macos

migemo-hangul.el's Introduction

Migemo hangul extension

What is migemo?

Please visit https://github.com/emacs-jp/migemo for this.

Why hangul extension?

There has been some problem around macOS with hangul, and Emacs couldn’t escape from this: https://www.reddit.com/r/emacs/comments/fvsijm/question_about_korean_font_display_issue/ There are many solution out there, including above link, however those have some limitation.

  • Even if you solved font rendering issue, you can’t still search through hangul file name using `find-file` in Emacs. Since Emacs by default use NFC characters as does Linux, there’s conflicts between NFC – what queried – and NFD – the actual target.
  • Fortunately, you can solve this problem by normalizing encoding system as suggested from here (in Korean). But this method also isn’t perfect. In a nutshell, what it does is normalize contents with NFC from NFD before read, and when it comes to save, reverts the process: from NFC to NFD then store the data to the disk.

    The use case I felt annoying by sticking with it is Org roam uses NFD system for file name, and for database, so from the Org roam perspective, it sees NFC file name and stores that link and links that link to another file. However, the real file name under the hood saved in NFD encoding; thus backlinks get broken, which the most prominent feature of roam.

    The thing is there might be some other package relying on NFD not NFC, and the difference between read encoding system and saved encoding system will definitely cause some problems near future, which is hard to debug anyway.

So, I’ve gone with amending the search function in Emacs. What I’ve implemented is actually doesn’t require migemo for it to function, but as I also speak Japanese and sometimes I have to write that in Emacs for academic purpose, I chose to extend migemo library.

I might consider detach my library from migemo, so it can be used as a standalone.

migemo-hangul.el's People

Contributors

hyunggyujang avatar

Watchers

 avatar  avatar  avatar

Forkers

junghan0611

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.