From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: write-region bug ? Date: Sat, 04 Jan 2020 23:54:56 -0500 Message-ID: References: <87k169okfu.fsf@igel.home> <83zhf5ixe1.fsf@gnu.org> <83woa7ezzb.fsf@gnu.org> <83r20efua9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="150005"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: jean.christophe.helary@traduction-libre.org, schwab@linux-m68k.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 05 05:55:13 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1inxwX-000cvG-3b for ged-emacs-devel@m.gmane.org; Sun, 05 Jan 2020 05:55:13 +0100 Original-Received: from localhost ([::1]:39164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inxwV-0007Ic-Na for ged-emacs-devel@m.gmane.org; Sat, 04 Jan 2020 23:55:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42174) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inxwO-0007IJ-AR for emacs-devel@gnu.org; Sat, 04 Jan 2020 23:55:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inxwN-0007TW-7t for emacs-devel@gnu.org; Sat, 04 Jan 2020 23:55:04 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45548) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1inxwK-0007C7-Ae; Sat, 04 Jan 2020 23:55:00 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A3AA41007B5; Sat, 4 Jan 2020 23:54:59 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 26B3E10040C; Sat, 4 Jan 2020 23:54:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1578200098; bh=7ONoXRGyNxMME9xuwysEOVeN3vZcw9xCvbW1NqwX++Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cCWM69C6U/ENYC9ns72upQicpJKJF76dLMTiDFG64V2ioEiuQe5wE8VgtCamK7l4B Aio6elDR4gMRG0NpVHPIOG+Thvs5nqDCNuidqgrGWEsm28226Yw89mrp+rxIrsJUd3 sAVrJtDYXxpbbMU2a7mHJig3BYiFb2UYLgRGaYZmUgc6spoF/2+rGSJHs3q70cpvZF dIjy7OOa54GAMzcO7S6QsVYDeqsBzMfIg/wSVaXATFw9bSC71sSkV9qEfaLp59dhZg 1THezl/Zv4Ti8m4WWZqPFQT9CyiHytPtXV3EJU6B9OjYclX5e8md7HMcLCeL5a7P+/ 25ZpExFiwWTeg== Original-Received: from alfajor (65-110-220-116.cpe.pppoe.ca [65.110.220.116]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D7326120F9A; Sat, 4 Jan 2020 23:54:57 -0500 (EST) In-Reply-To: <83r20efua9.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Jan 2020 05:37:18 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:243962 Archived-At: >> >> OTOH, the VISIT argument can't make sense when the text comes from >> >> a string rather than from a buffer. >> > Why does it not make sense? FILENAME is still provided. >> VISIT basically tells that the buffer should be considered as >> visiting FILENAME. Here, we have VISIT and FILENAME but we don't have >> the buffer (except that by accident). > > I don't think it's up to us to second-guess the caller, whether this > is an accident or not. I can envision legitimate use cases where this > can be useful. I can entertain the idea that some package out there somehow calls write-region with a non-nil `visit` and a string as `start`, but I'm hard pressed to imagine a case where this is useful. What kind of scenario do you have in mind? Stefan