From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Unibyte characters, strings, and buffers Date: Sat, 29 Mar 2014 15:58:53 +0300 Message-ID: <83eh1lduuq.fsf@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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1396099761 19710 80.91.229.3 (29 Mar 2014 13:29:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2014 13:29:21 +0000 (UTC) Cc: stephen@xemacs.org, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: David Kastrup 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 1WTtJx-0006CK-Nw for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2014 14:29:13 +0100 Original-Received: from localhost ([::1]:39096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTsqq-0002UF-MC for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2014 08:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTsqj-0002U7-3y for emacs-devel@gnu.org; Sat, 29 Mar 2014 08:59:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTsqe-0005UO-Bi for emacs-devel@gnu.org; Sat, 29 Mar 2014 08:59:01 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:46204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTsqY-0005Td-QI; Sat, 29 Mar 2014 08:58:51 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N3700I007GZSI00@mtaout28.012.net.il>; Sat, 29 Mar 2014 15:58:31 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N3700AVM81IX990@mtaout28.012.net.il>; Sat, 29 Mar 2014 15:58:31 +0300 (IDT) In-reply-to: <87txahp7hu.fsf@fencepost.gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 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:171143 Archived-At: > 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. > > 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.