From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.bugs Subject: bug#6525: documentation of macro `with-silent-modifications' 1 Date: Tue, 6 Jul 2010 17:29:08 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1278453625 1518 80.91.229.12 (6 Jul 2010 22:00:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Jul 2010 22:00:25 +0000 (UTC) Cc: 6525@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 07 00:00:23 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OWGBi-0003Z9-UB for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Jul 2010 00:00:23 +0200 Original-Received: from localhost ([127.0.0.1]:40438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWGBi-0004CB-Ff for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Jul 2010 18:00:22 -0400 Original-Received: from [140.186.70.92] (port=51012 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWGBF-0003ve-J6 for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2010 17:59:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWGBE-00040p-4g for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2010 17:59:53 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41272) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWGBE-00040i-2s for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2010 17:59:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OWFiN-0006Ix-DF; Tue, 06 Jul 2010 17:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: MON KEY Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Jul 2010 21:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6525-submit@debbugs.gnu.org id=B6525.127845175524197 (code B ref 6525); Tue, 06 Jul 2010 21:30:03 +0000 Original-Received: (at 6525) by debbugs.gnu.org; 6 Jul 2010 21:29:15 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWFhb-0006IE-0t for submit@debbugs.gnu.org; Tue, 06 Jul 2010 17:29:15 -0400 Original-Received: from mail-gw0-f44.google.com ([74.125.83.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWFhZ-0006I9-9Q for 6525@debbugs.gnu.org; Tue, 06 Jul 2010 17:29:14 -0400 Original-Received: by gwb10 with SMTP id 10so3342927gwb.3 for <6525@debbugs.gnu.org>; Tue, 06 Jul 2010 14:29:09 -0700 (PDT) Original-Received: by 10.90.91.17 with SMTP id o17mr1119840agb.72.1278451748937; Tue, 06 Jul 2010 14:29:08 -0700 (PDT) Original-Received: by 10.151.46.4 with HTTP; Tue, 6 Jul 2010 14:29:08 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: 5q4DUWN_KM8LCVj6aE7OiuKPFns X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 06 Jul 2010 17:30:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38274 Archived-At: On Sun, Jul 4, 2010 at 1:21 PM, Stefan Monnier wrote: >> I absolutely can not understand what is meant by the docstring. > > Here's an another try: > > Run BODY normally, but don't count its buffer modifications as being > buffer modifications. > This affects things like buffer-modified-p, checking whether the file > is locked by someone else, running buffer modification hooks, ... > How about this: Evaluate BODY with any changes which would otherwise set the buffer as modified discarded such that buffer changes within BODY: - will not satisfy the `buffer-modified-p' predicate; - will not clobber the `buffer-undo-list'; - will not cause a mode-line update as per `set-buffer-modified-p'; - will not trigger running of modification-hooks which respond to buffer changes including `before-change-functions' and `after-change-functions'; - will not force redisplay around modifications of buffer text having text-property and overlay hooks; - will not trigger buffer related file-locking and unlocking. >> What behaviour would you expect them to complain about if they can not >> deduce from the docstring what it is they should expect this macro to >> do? > > No idea. They'd make up their own idea of what the macro does, then > find it doesn't perform as they expect it, and they complain. That will > either let us fix the macro to better reflect their understanding, or > improve the docstring to avoid the confusion. > My old man calls me last night w/ a problem: "How do I get my back arrow back. Firefox lost it." He made his own mind up what the problem was... but Firefox wasn't broken it just didn't perform as expcected when he toggled the GUI navigation checkbox of his nav bar. I can't imagine it being a very good idea to expect uniformed users to inform you as to how to tweak a macro they neither understand (or otherwise endow with exceptionally magical powers) any more than I can imagine letting me father direct the Mozilla project according to his design spec :) :SEE (URL `http://www.joelonsoftware.com/articles/fog0000000356.html') > > The conceptual notion of the guy who decides to use this macro. > In a sense, the use of the macro is a way for the programmer to tell > Emacs what is "a real modification" (it does it by telling: anything > that happens within BODY is not "a real modification"). > That explanation made perfect sense for me. Thank you. > > Stefan > -- /s_P\