We’re rewarding the question askers & reputations are being recalculated! Read more.
4

As far as I understand, compose-region and the underlying composition text property can only result in displaying a single glyph (which may be built from several parts). When you pass multiple glyphs, they are assembled together in a single cell. The TAB character says to enlarge the cell so that the composite glyph fits entirely. It doesn't result in ...


4

Like glucas, I'm doubtful that prettify-symbols-mode is actually what you want to be using for your auto-translate library; however the question seems useful in general and I was curious about the character composition rules. I came up with the following: (defun my/add-visual-replacement (from to) "Make `prettify-symbols-mode' replace string FROM with ...


2

Better answer is in http://endlessparentheses.com/using-prettify-symbols-in-clojure-and-elisp-without-breaking-indentation.html One way to fix the width, is to join two spaces together, and then stick the inequality on top of them. (add-to-list 'endless/clojure-prettify-alist '(">=" . (?\s (Br . Bl) ?\s (Bc . Bc) ?≥))) (add-to-list '...


1

I'm not sure about the feasibility of this. First, I believe this requires a backwards font on the system. I'm no expert on how text is actually rendered but, speaking generally, text is rendered using a "base description", such as a vector mapping. This base information is contained in a font file, such as a .ttf. Without some mapping, Emacs doesn't ...


1

Assuming there are not TAB characters (which is usually true in Haskell files), then (- (point) (line-beginning-position)) should give you the "column" info you need (and (forward-char N) should advance by the right number of "columns").


1

I tried to do this myself and did not find a good solution. It seems like it CAN be done by manually composing the buffer's text based on the composition property and the composition function table. In the past I have solved this by running emacs in a terminal and and using my mouse to select and copy the text displayed. Clearly not a good solution, but it ...


Only top voted, non community-wiki answers of a minimum length are eligible