[Top][All Lists]

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

bug#20385: [PROPOSED PATCH] Support quoting 'like this' in doc strings

From: Drew Adams
Subject: bug#20385: [PROPOSED PATCH] Support quoting 'like this' in doc strings
Date: Wed, 22 Apr 2015 07:52:56 -0700 (PDT)

> > I will add that one increasingly important use of `...' is that
> > doc gets copied and pasted to other, non-Emacs environments.
> >
> > You might think that `...' is "ugly" (and that is the ONLY
> > reason that's been given so far for changing it), but it has
> > the distinct advantage that it is a unique way of quoting
> > that separates itself from both strings ("...") and ordinary
> > text quoting (curly quotes, double and single).
> >
> > If you post doc pieces into a context such as Stack Exchange,
> > for example, you need only change the ' in `...' to `, to
> > have that new context also, like Emacs, treat the quoted
> > sexp specially - not a ordinary quoted text.  That is, SE
> > uses `...` instead of `...', but it does the same thing
> > Emacs does, to make the result stand out as code and not as
> > just any old quoted text.
> >
> > If you change `...' to ordinary curly quoting, you lose
> > distinguishing what it quotes as code.
> >
> > Just one more consideration, another reason why the proposed
> > change is a bad idea, IMHO.
> I agree with you.
> Maybe a compromise could be to add as an alternative syntax `...`
> (just like SE or Markdown)? It would then fix the unbalanced quotes issue.

1. `...` is not as simple to parse (e.g. using regexps) for Emacs
   highlighting etc.

2. But I also realize that I might not have been as clear in that post
as I should have been.  It's not only about the (increasing) need
to be able to copy doc and paste it to other, non-Emacs environments.

The more important point is that Emacs uses `...' as a different
kind of quoting from ordinary text quoting.  It is Emacs's way of
quoting code that is inline (i.e., within ordinary text).

In other doc systems one might use wrap such inline code with, say,
and XML element: <CodeInLine>(forward-char 3)</CodeInLine>.  For
technical doc related to programming, there is typically *some* way
to set off inline code bits, to indicate that they are code, whether
they are keywords or pieces of programs.  Emacs's way has been `...'.

And IMHO, it is a very good way.  Very simple, and amenable to very
simple regexp identification and thus highlighting & retrieval.

If Emacs at some point decides to switch to another code-quoting
mechanism, that's one thing.  But what it definitely should NOT do,
IMO, is to lose code quoting - lose talking about code from a meta
level, and just quote code bits normally, so they become confused
with ordinary text quoting.

That was really the point I was trying to make in my last point.
`...' is for code.  Changing that to '...' loses the ability to
distinguish code from anything else being quoted normally.

reply via email to

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