[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Boxquote for code in UTF-8 export
From: |
Sebastien Vauban |
Subject: |
[O] Boxquote for code in UTF-8 export |
Date: |
Fri, 12 Sep 2014 17:09:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (windows-nt) |
Hello,
I'd advice to use UTF-8 characters more wildly available in the
different fonts for drawing the Boxquote around code, in function:
╭────
│ (defun org-ascii--box-string (s info)
│ "Return string S with a partial box to its left.
│ INFO is a plist used as a communication channel."
│ (let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
│ (format (if utf8p "╭────\n%s\n╰────" ",----\n%s\n`----")
│ (replace-regexp-in-string
│ "^" (if utf8p "│ " "| ")
│ ;; Remove last newline character.
│ (replace-regexp-in-string "\n[ \t]*\\'" "" s)))))
╰────
Even if it may always work in NT Emacs, thanks to font substitution, it
does not in Cygwin Emacs.
And, even with substitution, the effect may be not completely right, as
you can see on http://screencast.com/t/3P4oRqKd.
I've looked for corner characters in
- Consolas,
- Courier New,
- DejaVu Sans Mono,
- Lucida Console, and
- Lucida Sans Typewriter.
The results is that only \u250C and \u2514 are "universal" (except in
Lucida Sans Typewriter which implements almost nothing -- unlike DejaVu
Sans Mono which implements almost everything).
Best regards,
Seb
--
Sebastien Vauban
- [O] Boxquote for code in UTF-8 export,
Sebastien Vauban <=