[Top][All Lists]

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

Re: Unibyte characters, strings, and buffers

From: David Kastrup
Subject: Re: Unibyte characters, strings, and buffers
Date: Sat, 29 Mar 2014 14:15:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: David Kastrup <address@hidden>
>> Cc: address@hidden,  address@hidden,  address@hidden
>> Date: Sat, 29 Mar 2014 12:30:21 +0100
>> Eli Zaretskii <address@hidden> writes:
>> >> From: David Kastrup <address@hidden>
>> >
>> >> If we want different semantics for case-fold-search in binary buffers,
>> >> then the solution is setting a buffer-local setting of case-fold-search
>> >> when opening a buffer intended to be manipulated in a binary way.
>> >> 
>> >> But the unibyte setting of the buffer should not affect normal character
>> >> and string operation semantics.  It is a buffer implementation detail
>> >> that should not really have a visible effect apart from making some
>> >> buffer operations impossible.
>> >
>> > But if case-fold-search is set to nil in unibyte buffers, and (as we
>> > know) buffer-local value of case-fold-search does affects functions
>> > that compare text, either because they consult case-fold-search
>> > directly or because the consult buffer-local case-table, then the
>> > unibyte setting does affect the semantics, albeit indirectly.
>> No, it doesn't.  Correlation is not causation.
> But in this case, it is: they both stem from the same cause.

That's just word games, and pretty bad ones at that.  Not interested.

>> > Not that I disagree with you, but why does it matter whether some
>> > code makes a buffer unibyte or sets its case-fold-search, to
>> > achieve that goal?  In both cases, that something tells Emacs to
>> > ignore case conversion, it just uses 2 different ways of saying
>> > that.  If we are not going to abolish unibyte buffers, how is the
>> > difference important?
>> Because it makes things predictable.  I can take a look at the
>> setting of case-fold-search in order to figure out what will happen
>> regarding the case folding of searches.  If I want them to occur, I
>> can set the variable, and if I don't want them to occur, I can clear
>> that variable.
> The same is true about the unibyte flag.

So then we have two competing settings.  How does that make things

I think that there is nothing missing for reasonable people to come to a
decision by now, so there is nothing to be gained from me participating
further in this absurd spectacle.

David Kastrup

reply via email to

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