From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.devel Subject: Re: Inhibit "Wrote foo" from write-region Date: Wed, 22 Jan 2014 13:37:24 +0100 Message-ID: References: <87k3dte17j.fsf@fleche.redhat.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390400241 22331 80.91.229.3 (22 Jan 2014 14:17:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Jan 2014 14:17:21 +0000 (UTC) Cc: Emacs-Devel devel To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 22 15:17:27 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 1W5ycQ-000390-M0 for ged-emacs-devel@m.gmane.org; Wed, 22 Jan 2014 15:17:26 +0100 Original-Received: from localhost ([::1]:35294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5ycQ-0006vp-8D for ged-emacs-devel@m.gmane.org; Wed, 22 Jan 2014 09:17:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5ycM-0006vX-Ge for emacs-devel@gnu.org; Wed, 22 Jan 2014 09:17:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5ycK-0003xT-M2 for emacs-devel@gnu.org; Wed, 22 Jan 2014 09:17:22 -0500 Original-Received: from mail-yh0-x22e.google.com ([2607:f8b0:4002:c01::22e]:39493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5ycK-0003xN-H4 for emacs-devel@gnu.org; Wed, 22 Jan 2014 09:17:20 -0500 Original-Received: by mail-yh0-f46.google.com with SMTP id l109so137097yhq.33 for ; Wed, 22 Jan 2014 06:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-type; bh=q07DJWFhVfPIl/5izORreGhDF+0QHCppAj6GuTGPOfw=; b=G1QbGff1NUKh6hybzRWYRwa4ckMEEKGmIk5qN/tolDAme8C6CR1mokgbDZKayyYlc1 95jaspr2OQMc3H+ieCVXx3FMINu1D0w+wSpLjAsyFJxq5FZZxnn2Rl0Px5D3+eGgfwRJ 0lv6JE2/fA1IOTlig8B4KE1BvqpDUM41/V2zALz7f5ojjvmgJq0bbKVAtUH5Y4rJgY0Y 4cAd4uCdRvlQdzI6muaBLXWmCMrETQu+DbCAprXoVIeC8eInBorrQ/Q3J071xPfLd7Gp WnoXEfSFpdL190Yi7Y6I+T7vUdVd0TDDlGDdEK2qS5EPpAv9uDQ4E6chT0kEvQfui1zl dqZw== X-Received: by 10.236.30.2 with SMTP id j2mr1160451yha.73.1390394247527; Wed, 22 Jan 2014 04:37:27 -0800 (PST) Original-Received: from lunaryorn-air.fritz.box ([2001:a60:115e:f601:fc40:c71:cbf6:5f11]) by mx.google.com with ESMTPSA id a67sm23586152yhj.10.2014.01.22.04.37.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jan 2014 04:37:26 -0800 (PST) User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.1 In-reply-to: <87k3dte17j.fsf@fleche.redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::22e 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:168888 Archived-At: tromey@redhat.com writes: >>>>>> "Sebastian" == Sebastian Wiesner writes: > > Sebastian> For individual calls to write-region, this behaviour can be > Sebastian> inhibited by passing a symbol as VISIT argument, > Sebastian> e.g. (write-region "Hello world" nil "foo" 'no-message), > Sebastian> however package.el, url.el and other involved packages do not > Sebastian> make general use of this. For instance, > Sebastian> "package--write-file-no-coding" is defined as follows: > > Sebastian> (defun package--write-file-no-coding (file-name) > Sebastian> (let ((buffer-file-coding-system 'no-conversion)) > Sebastian> (write-region (point-min) (point-max) file-name))) > > I agree it would be nice to fix this. > > Meanwhile as a workaround I think your program could advise write-region > to add the needed argument. I do that now, but this does obviously not catch messages, which specify a string for VISIT. In this case, "write-region" still produces these messages. Also, overriding a core function like write-region just to silence some messages feels a little brittle. Thank you for your advice, though