0

EDIT: My problem has been fixed or, more precisely, worked around, thanks to help in the comments below. Never figured out what exactly the issue was as it wasn't a problem with my Emacs configuration but with my Emacs installation (which I had originally done via Homebrew).

I am using Emacs 25.0.5 on OS X 10.10.5. For some reason, Emacs displays ‘ ’ and “ ” only as ' ' and " ", respectively. The behavior persists in typopunct-mode (from the Typopunct package), although things like en- and em-dashes display correctly as distinct Unicode characters. The behavior also persists if I use a variable width typeface I am certain has glyphs for curly quotes.

  • Here is a link to examples of changing the appearance of unicode symbols in an Emacs buffer with entries in the buffer-display-table: emacs.stackexchange.com/a/9627/2287 You'll need to check the character with something like C-u C-x = to see what it actually is before you make a decision about changing the visual appearance. Some libraries modify the buffer-display-table, so your testing should be done in a fundamental buffer with no major or minor-modes active -- e.g., start with Emacs -Q and set up the buffer-display-table to your liking. I set several as variables. – lawlist Jun 12 '16 at 18:19
  • For what it may be worth, I'm on OSX with a fairly recent version of the Emacs master branch and I pasted the text from the question above into a fundamental-mode buffer after having started with Emacs -Q and the question looks perfect in Emacs -- just like in the question above. So, try first with Emacs -Q and you may be pleasantly surprised about what you see. I just performed the same test with Emacs -Q on two versions of OSX -- i.e., El Capitan 10.11.5 and Snow Leopard 10.6.8 -- same results in both versions of OSX. I'm using the GUI Emacs, not the terminal. – lawlist Jun 12 '16 at 18:33
  • Thanks. Indeed, you're right, with Emacs -Q, the quotation marks appear as they should. I haven't been able to figure out what in my .emacs is causing the change, so I tried adapting your post at emacs.stackexchange.com/a/9627/2287 to my case. The snippet works with my substitutions if I eval it in a scratch buffer; " is now , but only for that scratch buffer. I don't actually know elisp. How would I go about setting such a glyph substitution globally in all buffers in my init file? – tirocinium Jun 12 '16 at 22:56
  • The buffer-display-table is designed to be buffer-local. The general approach is to narrow things down by identifying what modes are active in the buffer that is suffering from the undesired behavior. Typing M-x describe-mode will pop-up a buffer that shows the name of the major mode and all active minor modes. In general, disabling the minor modes (commenting stuff out) is the first step and then see if the problem disappears. If the problem doesn't disappear, then the issue may be with the major mode itself. You may need to restart Emacs several times as you disable things. – lawlist Jun 12 '16 at 23:14
  • 1
    Thank you! Now using Emacs-pretest-25.0.95-universal.dmg 25.0.95 2016-06-10 from emacsformacosx.com after simply dragging it to my Applications folder, and the problem has been fixed and everything seems to be working. I'll stick to these builds rather than installing via Homebrew in the future. Learned quite a bit from this. Thanks again for your help and patience! – tirocinium Jun 13 '16 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.