GNU bug report logs - #48348
27.2; buffer-stale-function is being reset by make-indirect-buffer

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Al Haji-Ali <abdo.haji.ali@HIDDEN>; dated Tue, 11 May 2021 12:54:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 May 2021 12:53:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 08:53:27 2021
Received: from localhost ([127.0.0.1]:35301 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgRt4-0001Ki-Ph
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 08:53:27 -0400
Received: from lists.gnu.org ([209.51.188.17]:43726)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdo.haji.ali@HIDDEN>) id 1lgRt3-0001Kb-Ok
 for submit <at> debbugs.gnu.org; Tue, 11 May 2021 08:53:22 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49144)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1lgRt2-0000DC-Oc
 for bug-gnu-emacs@HIDDEN; Tue, 11 May 2021 08:53:21 -0400
Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:55949)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1lgRsz-000402-B8
 for bug-gnu-emacs@HIDDEN; Tue, 11 May 2021 08:53:20 -0400
Received: by mail-wm1-x32e.google.com with SMTP id i128so11041871wma.5
 for <bug-gnu-emacs@HIDDEN>; Tue, 11 May 2021 05:53:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=user-agent:from:to:subject:date:message-id:mime-version;
 bh=E7dL7G4IemUxglbSpTCWGn31s+CgZ1uquRPMyA+tlJc=;
 b=dwzpI+B7jhKFRHW4OJ7ywcgx+TF70ABJomrHa6WQ8eauLPBG/0zCec0utNwMkDqrTI
 luA/YsjzlZfaDiQt0G0YjWcUmzsAb6YTG7XN3XOoI01pegESl/a2qV65ocGw+sPGHlLi
 5nGdsr/08NqmyfKKLbpDn382zF2vzJaGxvKodYPKlaxGWKIdxtWR5xMHy6B/HxwK840z
 1PJtLTHYLlaENaySFXONUnEPLkcNNLoMAHWIOpN2rZOomGlJwKOL3PsqQ5PPL43XCJAQ
 qjNf1d3xwOT2+JxGKm5xm10/j2Xpgy/N4C+biE6J0orJ5lt5gHxVhnMWX2CSzQptSsid
 uH6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:user-agent:from:to:subject:date:message-id
 :mime-version;
 bh=E7dL7G4IemUxglbSpTCWGn31s+CgZ1uquRPMyA+tlJc=;
 b=JcxJjTDxxQBW9X/YK/xr4SUUjSGKpiBB3zNs0wS19XkxqYvDsyl8rEawsIgzDLUvCB
 yRafBXjEPHPrMVNMnq/JcWMkXNEGC2veHddmsMJQJEDrtuqHd1moQZIUX0b22Lg71ygj
 gmFCl15aM1L5rGbE/wb53U2OcB8v6pbFJ52bCvjg/AfbToacrNcJDN4uN36ps4bvtD2y
 kAm0DDnHR6BUIJbWL7bkpKk1fXzlsCw932KWWh2tOFfykcKnlQgp8EQH0ZXOvougIQXL
 ePiwyxHHz3JyDet8Z7uxPFFl47dF5PXJcmlcp3aUJsEujIY3pH94J+2jC2hLlqseCjya
 a50g==
X-Gm-Message-State: AOAM5336WF0et5yFtu9PN+FACVWsXKEgRvP47bWMwkEFZGKbZCMnhVrk
 tmrFljs+llFGQs2kQ0s/Z95AwbRhdCY=
X-Google-Smtp-Source: ABdhPJxSAR290ICZy9OnMQCKdreFm0p9r12GWKS25wkqEq3GyZhLRxmSe+Y5fMnIPl+aebndVdayUg==
X-Received: by 2002:a05:600c:230f:: with SMTP id
 15mr31006419wmo.19.1620737594142; 
 Tue, 11 May 2021 05:53:14 -0700 (PDT)
Received: from thinkpad.gmail.com
 (cpc152997-sgyl45-2-0-cust468.18-2.cable.virginm.net. [82.32.155.213])
 by smtp.gmail.com with ESMTPSA id n6sm28004594wro.23.2021.05.11.05.53.13
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 11 May 2021 05:53:13 -0700 (PDT)
User-agent: mu4e 1.5.13; emacs 27.2
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.2; buffer-stale-function is being reset by make-indirect-buffer
Date: Tue, 11 May 2021 13:43:36 +0100
Message-ID: <87lf8la19q.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::32e;
 envelope-from=abdo.haji.ali@HIDDEN; helo=mail-wm1-x32e.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


Hello,

I am setting `buffer-stale-function` to prevent some buffers from being reverted when `global-auto-revert-mode` is enabled (I am not aware of a different way than setting `buffer-stale-function` to achieve this). This works well, but I noticed that `make-indirect-buffer` (which for example org-capture uses) seems to reset `buffer-stale-function` to nil (in buffer.c:906).

Is this intended? I find it strange since `buffer-stale-function` is not buffer-local.
Also the fact that it is reset to `nil` instead of the default `buffer-stale--default-function` is doubly strange.


Al

--


In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
 of 2021-04-06 built on thinkpad
Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.04.2 LTS

Configured using:
 'configure --prefix=/home/abdo/.local/ --with-json --with-modules
 --with-harfbuzz --with-compress-install --with-threads
 --with-included-regex --with-zlib --with-sound=alsa --without-gconf
 --with-mailutils --with-xft --with-xml2 --with-cairo --with-gconf
 --with-xwidgets --without-toolkit-scroll-bars 'CFLAGS=-O3 -mtune=native
 -march=native -fomit-frame-pointer
 -I/usr/lib/gcc/x86_64-linux-gnu/9/include/
 -L/usr/lib/gcc/x86_64-linux-gnu/9''

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GCONF GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT
LIBOTF ZLIB GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

________________________________
Heriot-Watt University was founded in 1821 and is a registered Scottish charity (SC000278).




Acknowledgement sent to Al Haji-Ali <abdo.haji.ali@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48348; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 11 May 2021 13:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.