[Top][All Lists]

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

Quoting yank/diff prefixes (was: [Emacs-diffs] master 9ffb6ce 5/5: Quoti

From: David Kastrup
Subject: Quoting yank/diff prefixes (was: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim)
Date: Wed, 02 Sep 2015 13:52:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Dmitry Gutov <address@hidden> writes:

> On 09/02/2015 05:34 AM, Stefan Monnier wrote:
>> W.r.t ambiguity, the main problem I see is that we currently can never
>> be sure that when we see a ` followed by a ' the two actually form a pair.
>> A human usually can tell, but a program can't get it right 100% of the time.
> Okay. But then, there's no problem in using the same quoting for key
> sequences, aside from the quote-matching algorithm.

Moving passages into some sort of string container or else needing some
sort of specific quotation style in order to preserve literal content
seems like a frequent problem.

How about defining some prefix to be used right before C-w or C-y and
related commands that will then strip/interpret the respective suspected
quote sequences going into the kill buffer, and add them when going out?

It would likely need some well-defined mode-specific hooks providing the
string-packing and unpacking, defaulting to something working reasonably
sanely with the union of C and Elisp strings but hopefully taken up by
most mode providers eventually.

Having a standardized mode-specific view into stringizing and
unstringifying passages (prefix arg for specifying the particular quote
style defaulting to " (2) in most modes?  Something like an input method
selector for that?) might be useful for other generic functionality and
keybindings.  But at the very least a standard for "-quoted strings
seems like a good idea.

David Kastrup

reply via email to

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