From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#21492: 25.0.50: Make untabify work nicely with write-file-functions Date: Wed, 16 Sep 2015 22:54:56 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c1dfc057c69f051fe88a71 X-Trace: ger.gmane.org 1442458597 3183 80.91.229.3 (17 Sep 2015 02:56:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Sep 2015 02:56:37 +0000 (UTC) Cc: warren ferguson , 21492-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 17 04:56:27 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ZcPN1-0002Ol-Aa for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Sep 2015 04:56:23 +0200 Original-Received: from localhost ([::1]:55420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcPN0-0001M0-A1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Sep 2015 22:56:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcPMn-0001Ia-7V for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2015 22:56:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcPMg-0008SP-7P for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2015 22:56:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcPMg-0008SK-1s for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2015 22:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZcPMf-0005ML-Ow for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2015 22:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2015 02:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21492 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21492-done@debbugs.gnu.org id=D21492.144245850220511 (code D ref 21492); Thu, 17 Sep 2015 02:56:01 +0000 Original-Received: (at 21492-done) by debbugs.gnu.org; 17 Sep 2015 02:55:02 +0000 Original-Received: from localhost ([127.0.0.1]:35473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZcPLh-0005Kc-6l for submit@debbugs.gnu.org; Wed, 16 Sep 2015 22:55:01 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:32998) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZcPLe-0005KT-Hb for 21492-done@debbugs.gnu.org; Wed, 16 Sep 2015 22:54:59 -0400 Original-Received: by obbbh8 with SMTP id bh8so3833357obb.0 for <21492-done@debbugs.gnu.org>; Wed, 16 Sep 2015 19:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nSg6o/ewDXQxMbZmaduUcsWy/E8hK8PhmOdWOTWVnEw=; b=wcUEPdAfHvba9mUgpJkdx9uzEkct1PKt/BmlvXUGxUiE3jWVMqRaP0VvoqdnLkxEN9 vnEN5tN7hr0tduH91ylkWIbgzee1mxaxnZ280fTGUA2/OT8qbQR1BMf2DRpb6EwJlAaB pgFJR+j24MGOLdR3ikZ10r0W9N4UHb40hHw5WAJOoW4F6KhJMUTf7zH4jygJF+XH6rb+ SqO+Um2uQL0C1H6rf5oWl6/gcGYjhW1558+e0smJ8iciMxc2mHsVWc8QJVx/U+xlUAYD UjrEK1DajP2q6tb+oGEbi6C/UfpggbssbHanTrD3SUV5F0s5OQv1FchIaxLvsa6o7Bzd l/KA== X-Received: by 10.182.240.135 with SMTP id wa7mr27404232obc.63.1442458497432; Wed, 16 Sep 2015 19:54:57 -0700 (PDT) Original-Received: by 10.202.172.205 with HTTP; Wed, 16 Sep 2015 19:54:56 -0700 (PDT) Original-Received: by 10.202.172.205 with HTTP; Wed, 16 Sep 2015 19:54:56 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106669 Archived-At: --001a11c1dfc057c69f051fe88a71 Content-Type: text/plain; charset=UTF-8 Thanks. Yes, I had then ended up replacing all my write-file-functions add-hooks with before-save-hook: https://github.com/kaushalmodi/.emacs.d/commit/d89d6333f0978d7fda4af412ecaa5089812b7e26 -- Kaushal Modi On Sep 16, 2015 9:54 PM, "Stefan Monnier" wrote: > > I also have now started using before-save-hook instead of > > write-file-functions where I don't care about the return values of the > > functions added to the hook. > > BTW, the use of before-save-hook is not just so you don't have to care > about the return value. It's also because some functions on > write-file-functions may not be run at all (if some earlier function > returns non-nil because it took care of performing the write). > > So even adding a "nil" at the of your function doesn't make it right to > add it to write-file-functions. > > > Stefan > --001a11c1dfc057c69f051fe88a71 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Thanks.

Yes, I had then ended up replacing all my write-file-functio= ns add-hooks with before-save-hook: https://github= .com/kaushalmodi/.emacs.d/commit/d89d6333f0978d7fda4af412ecaa5089812b7e26

--
Kaushal Modi

On Sep 16, 2015 9:54 PM, "Stefan Monnier&qu= ot; <monnier@iro.umontreal.c= a> wrote:
>= ; I also have now started using before-save-hook instead of
> write-file-functions where I don't care about the return values of= the
> functions added to the hook.

BTW, the use of before-save-hook is not just so you don't have to care<= br> about the return value.=C2=A0 It's also because some functions on
write-file-functions may not be run at all (if some earlier function
returns non-nil because it took care of performing the write).

So even adding a "nil" at the of your function doesn't make i= t right to
add it to write-file-functions.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan
--001a11c1dfc057c69f051fe88a71--