bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20385: [PATCH] Support curved quotes in doc strings


From: Paul Eggert
Subject: bug#20385: [PATCH] Support curved quotes in doc strings
Date: Fri, 15 May 2015 11:54:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 05/15/2015 10:24 AM, Dmitry Gutov wrote:
It still doesn't have the fancy quotes directly in the source code: they seem to be generated dynamically

Yes, GCC uses "%< %>" in format strings to represent curved quotes, and Coreutils has a function 'quote (X)' that returns X surrounded by curved quotes. However, these are both awkward compared to just using quotes. GCC and Coreutils use these awkward constructs because they can't assume decent support for Unicode. Emacs doesn't have this constraint, so it can do better.

On the other hand, you'll be able to dynamically determine which quotes to use, depending e.g. on the locale.

That's an independent issue: it can be done no matter what quoting regime the source code uses. But it's probably not worth doing separately. Once we're worried about different locales, we'll need to translate the strings to Russian (or whatever) and at that point we can translate the quotes to use «Russian style». (And yes, Emacs should do this, just as GCC and Coreutils do -- but one thing at a time.)

Neither of those should be particularly hard to implement.

I'm not that worried about the cost of implementation now. I'm worried about the long-term cost of having a quoting regime that requires documentation and explanation. It's simpler and easier to explain if the doc string looks the same in the UI as it does while you're editing it. For example, you can easily cut and paste from the UI into the doc string source when composing a new doc string, which is something that doesn't work well for either GCC or Coreutils.

- Using unicode for markup is a complication (e.g. with certain mail clients, but some other instances might come up).

It's a complication we already have, as we already use UTF-8 in a few doc strings. For example, the documentation for prettify-symbols-mode uses UTF-8 curved double-quotes. This usage will naturally grow in time. Yes, there will be some email glitches but they'll be easy to iron out as we gain experience.

- I don't like having two standards for quoting.

Nor do I. This is a transition process, with the long-term goal of quoting via quotes rather than via grave accent and apostrophe. It's not practical to do this transition all at once, hence the transition period. But in the long run there'll be just one standard way to quote (even if Emacs supports the obsolete way indefinitely).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]