Questions tagged [compose-region]

6 questions
9
votes
1 answer

How can I copy and paste characters displayed with compose-region?

I use several modes that display Unicode characters in my code without changing the underlying file. For example, in Haskell mode, the following code: foo :: forall a. Eq a => a -> a -> a gets displayed as foo ∷ ∀ a. Eq a ⇒ a → a → a This is…
Tikhon Jelvis
  • 6,152
  • 2
  • 27
  • 40
4
votes
1 answer

Using Prettify Symbols with strings instead of characters

I want to the prettify-symbols-mode functionality, but using strings instead of chars as visual replacements: ;; typical replacement for chars (push '("lambda" . ?λ) prettify-symbols-alist) (defun my/add-visual-replacement (whatwith) ;; answer to…
Felipe Lema
  • 737
  • 3
  • 11
3
votes
2 answers

compose-region and TABs

I'm trying to use compose-region with TABs but fail to see difference. I'd like to get 'sqrt' composed to '√' but taking as much space as original text and aligned to the right. I tried each of: (compose-region begin end "√") (compose-region begin…
Gracjan Polak
  • 1,082
  • 6
  • 21
2
votes
1 answer

How can I find the current line and column ignoring text composition?

I'm working on a utility that communicates with an external process using line and column positions in the current file. I have configured Haskell mode to use compose-region to display certain parts of the syntax in Unicode, which can replace…
Tikhon Jelvis
  • 6,152
  • 2
  • 27
  • 40
1
vote
1 answer

How to display a character reversed?

I know about compose-region and have used it for other purposes, but am trying to figure out how to display a character reversed. like transforming c to ↄ. Is this possible?
Prgrm.celeritas
  • 849
  • 6
  • 15
0
votes
0 answers

Is there a way to hide link prefixes in org-mode?

For some link types it would be nice to hide the link prefix automatically. This post does this with text properties, but I'd prefer if it was possible to do with something like prettify-symbols or compose region. The closest I got was... (defun…