From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#16796: 24.3.50; global value of after-change-functions reset without error Date: Thu, 08 Sep 2016 17:47:50 -0600 Message-ID: <874m5q6jix.fsf@gmail.com> References: <87a9douxiv.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1473378500 25069 195.159.176.226 (8 Sep 2016 23:48:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Sep 2016 23:48:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 16796@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 09 01:48:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bi93H-0005zV-Cq for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 01:48:15 +0200 Original-Received: from localhost ([::1]:54711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi93F-0003OL-AC for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Sep 2016 19:48:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi938-0003OE-U6 for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2016 19:48:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bi934-0007je-PM for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2016 19:48:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi934-0007jA-Lc for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2016 19:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bi934-0002HI-BQ for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2016 19:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Sep 2016 23:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16796 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16796-submit@debbugs.gnu.org id=B16796.14733784808748 (code B ref 16796); Thu, 08 Sep 2016 23:48:02 +0000 Original-Received: (at 16796) by debbugs.gnu.org; 8 Sep 2016 23:48:00 +0000 Original-Received: from localhost ([127.0.0.1]:53961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bi932-0002H1-3a for submit@debbugs.gnu.org; Thu, 08 Sep 2016 19:48:00 -0400 Original-Received: from mail-oi0-f46.google.com ([209.85.218.46]:32933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bi92z-0002Gm-Vw for 16796@debbugs.gnu.org; Thu, 08 Sep 2016 19:47:58 -0400 Original-Received: by mail-oi0-f46.google.com with SMTP id y2so101797478oie.0 for <16796@debbugs.gnu.org>; Thu, 08 Sep 2016 16:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=E/7PYZmdssOAhPR6ByxwNX/07MBkAtWv2JO15slXUWc=; b=e7kWQPMI1+fadEIc6v+VRihip5gWl8AeZskbmbsMyyxdM3s8rc9Esuu10cH+esDs8K o/HIMCIvVmpeQaqgleT2ItRSdUqMBMJIyyj3TsXIicAAAv0pnEDjwpHSaUXwB/ZbO+AC neKNIqWEwuac19VPYR7Ktqgh75j0xutzcpuWMrnq12QZg0CX+KX9lvslxKECEB2CPh++ lEelAjsR4GniUVk23X+omR7CKL0m8/9X7NK0gKy6GplV7O0O9IK7iOQ6MHmF23RPCOwc P33GjpbNO5Eb7t0Tq8M4jVAK/o18uD3V0SiTI72Hj8TQUF+Rtp8t1VogHDr0TcyUhpSG pmXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=E/7PYZmdssOAhPR6ByxwNX/07MBkAtWv2JO15slXUWc=; b=Ju2XR1YzQ7JwhWc/n8K6bcff/EV8S5e6hYXreo4+qf3afP89ljHh7yRxJj46LkbHdi 6aQj3pOs7uyDHiCuvMGAtjZyi4qXPeoFperm/Zpp9iKFMH6CkpmpdhoAdP16NzfciJ9O 6deuLWWkGJ42xJX+zVqmW3Nwd2EmX7Lwu0VS5yzJdGJh910LQNT8NwaoukWYpRdQoIj+ N83u8ynfxMjSnsPYKC38I2zim4HSFvcVtGYehtZiW+pfj/uTv5cfghEVO49gNLy4hJzS 02/mKIn2ZPooqPHUusZpvW/SUnmNAT0OFbEI+AwSXZuqCF3C8coqJDLCXzc3X/OLwheY hAsw== X-Gm-Message-State: AE9vXwPOiAJkKAZ7wNaUaBfP9eaLph9D4BysUd71IwmxykG7XWbeZGHN5CvwLFK++H/hxw== X-Received: by 10.157.59.227 with SMTP id k90mr880325otc.44.1473378472385; Thu, 08 Sep 2016 16:47:52 -0700 (PDT) Original-Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id q1sm266981itb.2.2016.09.08.16.47.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Sep 2016 16:47:52 -0700 (PDT) In-Reply-To: <87a9douxiv.fsf@web.de> (Michael Heerdegen's message of "Tue, 18 Feb 2014 18:43:36 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:123094 Archived-At: Michael Heerdegen writes: > Hello, > > I'm working on a package that needs to install a function in (the global > binding of) `after-change-functions'. > > I experience that the global value of `after-change-functions' is > randomly reset to nil, without any error involved or any error message > being printed. I invested lots of time to preclude any error. > > I installed a timer that frequently checks whether > `after-change-functions' had been reset. A good situation to provoke > the reset was completing with helm and just typing in the minibuffer. > At random locations, the reset happened. Note that there is no error > involved, nor does helm touch `after-change-functions'. > > > Here is a different example that "works" from emacs -Q: > > (progn > > (defun foo (&rest _) ()) > > (add-hook 'after-change-functions 'foo) > > (defun complain () > (when (not (memq 'foo (default-value 'after-change-functions))) > (message "Why does this happen?") > (cancel-timer complain-timer))) > > (defvar complain-timer > (run-with-idle-timer .03 .03 #'complain)) > > (require 'cl-lib) > (global-set-key > [f9] > (lambda () (interactive) > (completing-read > "Hit tab and C-g: " > (cl-loop for i from 1 to 100000 > collect (format "%d" i)))))) > > Hit f9 and C-g one or two times. I get "Why does this happen?", but not > always. If I repeat the test several times, I'll always happen sooner > or later. I can reproduce this on 24.5 but not in 25.1. Can you reproduce this on 25.1 or up?