all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: weird bogosity relating to "copyright-update"
Date: Mon, 07 Feb 2011 10:57:39 -0500	[thread overview]
Message-ID: <jwvk4hbhmfo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8739o0w5g0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 07 Feb 2011 01:37:51 -0800")

>> So... what change tickled this problem, and what's the right way to fix
>> it...?  It doesn't seem a bad thing that Gnus is doing that let-binding
>> (you probably _don't_ want your mail FCCs to get copyright-updated), but
>> it's clearly bad that the let-binding is screwing things up...
> Yes, that seems like the wrong way to do this.  If nnfolder wants to
> let-bind `copyright-updated', it also has to require copyright.

Indeed.

> But I think it would make more sense for nnfolder to bind
> `write-file-hooks' to nil, wouldn't it?

Actually, the recommended hook to use for copyright-update nowadays is
not write-file-hooks (which has been marked obsolete since Emacs-22.1)
but before-save-hook.
So it should maybe bind write-file-functions, write-contents-functions,
and before-save-hook, or and maybe after-save-hook as well.

Or maybe a better way would be to use write-region rather than save-buffer.


        Stefan



      parent reply	other threads:[~2011-02-07 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07  7:07 weird bogosity relating to "copyright-update" Miles Bader
2011-02-07  9:37 ` Lars Ingebrigtsen
2011-02-07 10:44   ` Miles Bader
2011-02-07 15:57   ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk4hbhmfo.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.