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.

tirocinium
  • 781
  • 5
  • 8
  • Here is a link to examples of changing the appearance of unicode symbols in an Emacs buffer with entries in the `buffer-display-table`: http://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 http://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
  • Thanks again for your help. Since the behavior persists even with a clean initfile, I tried starting Emacs with Emacs --no-site-lisp. This fixes the problem, but I would still like to figure out what's going on so that I can run Emacs without any options. Any recommendations for the next step in troubleshooting? In `/usr/local/share/emacs/site-lisp` I have `bash-3.2$ ls autoconf-mode.el autotest-mode.el subdirs.el autoconf-mode.elc autotest-mode.elc` In `/usr/local/share/emacs/25.0.50/site-lisp` I have `bash-3.2$ ls subdirs.el` – tirocinium Jun 13 '16 at 16:19
  • When I build Emacs on OSX, I always make a self-contained `Emacs.app` and nothing ever gets installed into `/usr/local/share/emacs`. An easy way to test if your installation has a problem is to just download a new `Emacs.app` from https://emacsformacosx.com/ and select the *Other Versions* option and then choose from nightly builds, etc. if you really want Emacs 25 ... Or, just download the source and build your own. `./configure --with-ns` automatically puts the Emacs.app in the `nextstep` folder of the source when building, and all the lisp files get packaged inside Emacs.app. – lawlist Jun 13 '16 at 16:43
  • 1
    Thank you! Now using Emacs-pretest-25.0.95-universal.dmg 25.0.95 2016-06-10 from http://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

0 Answers0