From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Unibyte characters, strings, and buffers Date: Sat, 29 Mar 2014 14:15:57 +0100 Message-ID: <87fvm1p2lu.fsf@fencepost.gnu.org> References: <831txozsqa.fsf@gnu.org> <83ppl7y30l.fsf@gnu.org> <87r45nouvx.fsf@uwakimon.sk.tsukuba.ac.jp> <8361myyac6.fsf@gnu.org> <87a9capqfr.fsf@uwakimon.sk.tsukuba.ac.jp> <83eh1mfd09.fsf@gnu.org> <87ob0pnyt6.fsf@uwakimon.sk.tsukuba.ac.jp> <87y4ztp9p8.fsf@fencepost.gnu.org> <83mwg9dzzv.fsf@gnu.org> <87txahp7hu.fsf@fencepost.gnu.org> <83eh1lduuq.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396099760 19706 80.91.229.3 (29 Mar 2014 13:29:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2014 13:29:20 +0000 (UTC) Cc: stephen@xemacs.org, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 29 14:29:13 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WTtJw-0006CK-E8 for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2014 14:29:12 +0100 Original-Received: from localhost ([::1]:39288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTt7M-0001Vc-Uk for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2014 09:16:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTt7I-0001Ua-Op for emacs-devel@gnu.org; Sat, 29 Mar 2014 09:16:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTt7H-0002c7-EC for emacs-devel@gnu.org; Sat, 29 Mar 2014 09:16:08 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTt7H-0002c3-Am for emacs-devel@gnu.org; Sat, 29 Mar 2014 09:16:07 -0400 Original-Received: from localhost ([127.0.0.1]:33471 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTt7G-0001WL-5o; Sat, 29 Mar 2014 09:16:06 -0400 Original-Received: by lola (Postfix, from userid 1000) id A3C1CE09F9; Sat, 29 Mar 2014 14:15:57 +0100 (CET) In-Reply-To: <83eh1lduuq.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Mar 2014 15:58:53 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171142 Archived-At: Eli Zaretskii writes: >> From: David Kastrup >> Cc: stephen@xemacs.org, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org >> Date: Sat, 29 Mar 2014 12:30:21 +0100 >> >> Eli Zaretskii writes: >> >> >> From: David Kastrup >> > >> >> 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 predictable? 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