From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 c54bda15e35: Reset abbrevs-changed after saving abbrevs (bug#62208) Date: Sat, 18 Mar 2023 12:36:00 +0200 Message-ID: <83sfe2bb3j.fsf@gnu.org> References: <167906231726.19136.16436390026673507290@vcs2.savannah.gnu.org> <20230317141157.939DBC13919@vcs2.savannah.gnu.org> <875yays7lt.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19641"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, fgunbin@fastmail.fm To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 18 11:36:43 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pdTvW-0004x1-CA for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Mar 2023 11:36:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdTux-0006xR-Rq; Sat, 18 Mar 2023 06:36:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdTuo-0006vg-VH for emacs-devel@gnu.org; Sat, 18 Mar 2023 06:35:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdTuo-0002jw-CS; Sat, 18 Mar 2023 06:35:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fHwea5pVAbyAvfNtDwPm987BbiF/QQYbXcJ1FoWKr5A=; b=OkpfrQ+2STVM lqjgkoFpJXDmrAutF7ypX89HR6+neOKuugJqLV0gQu+YNhdvM9D7gYxx5mG+6M/5zFmRO0qzltib4 f+IqaAHPG/jnMhpU71j004uTZGfxlzTm6GjQKExYA6m7xEwtSZZeRGKHK4YjJ+UO6Lf+R/dTAWoJk q9mDviIETWxw6RHQXhJgrBwERMkz6BpcEtpMP+J0auuAjlYpaQGXjPQ94v0o6lrP6sBeZrdnKIvcJ qq7mNGKhdGX+ULtt04DLAjrsgCv4yoDUG1JnBvvdY79Yuku88ZSVopK805EnvuwqJO53zdKeGs2bt SrQc56U3TasfVzshlHQ/9g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdTun-0004Wc-Ko; Sat, 18 Mar 2023 06:35:58 -0400 In-Reply-To: <875yays7lt.fsf@gmail.com> (message from Robert Pluim on Sat, 18 Mar 2023 10:59:26 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304568 Archived-At: > From: Robert Pluim > Cc: Filipp Gunbin > Date: Sat, 18 Mar 2023 10:59:26 +0100 > > >>>>> On Fri, 17 Mar 2023 10:11:57 -0400 (EDT), Filipp Gunbin said: > > Filipp> +(ert-deftest abbrev--possibly-save-test () > Filipp> + "Test that `abbrev--possibly-save' properly resets > Filipp> +`abbrevs-changed'." > Filipp> + (ert-with-temp-file temp-test-file > Filipp> + (let ((abbrev-file-name temp-test-file) > Filipp> + (save-abbrevs t)) > Filipp> + ;; Save > Filipp> + (let ((abbrevs-changed t)) > Filipp> + (should-not (abbrev--possibly-save nil t)) > Filipp> + (should-not abbrevs-changed)) > Filipp> + ;; Don't save > Filipp> + (let ((abbrevs-changed t)) > Filipp> + (ert-simulate-keys '(?n) > Filipp> + (should (abbrev--possibly-save nil))) > Filipp> + (should-not abbrevs-changed))))) > Filipp> + > Filipp> (provide 'abbrev-tests) > > This test works when run interactively in Emacs, but fails when run > from 'make': > > Test abbrev--possibly-save-test backtrace: > signal(minibuffer-quit nil) > #f(compiled-function () #)() > read-string(#("Save abbrevs in /tmp/emacs-test-7WxM64-abbrev? (y ... > y-or-n-p("Save abbrevs in /tmp/emacs-test-7WxM64-abbrev? ") > abbrev--possibly-save(nil) > apply(abbrev--possibly-save nil) > (setq value-324 (apply fn-322 args-323)) > (unwind-protect (setq value-324 (apply fn-322 args-323)) (setq form- > (if (unwind-protect (setq value-324 (apply fn-322 args-323)) (setq f > (let (form-description-326) (if (unwind-protect (setq value-324 (app > (let ((value-324 'ert-form-evaluation-aborted-325)) (let (form-descr > (let* ((fn-322 #'abbrev--possibly-save) (args-323 (condition-case er > (let ((unread-command-events (append '(110) '(7 7 7))) (executing-kb > (let ((abbrevs-changed t)) (let ((unread-command-events (append '(11 > (let ((abbrev-file-name temp-test-file) (save-abbrevs t)) (let ((abb > (progn (let ((abbrev-file-name temp-test-file) (save-abbrevs t)) (le > (unwind-protect (progn (let ((abbrev-file-name temp-test-file) (save > (let* ((coding-system-for-write nil) (temp-file (identity (make-temp > (closure (t) nil (let* ((coding-system-for-write nil) (temp-file (id > ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test > ert-run-test(#s(ert-test :name abbrev--possibly-save-test :documenta > ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m > ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil > ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp)))) > ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco > eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n > command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/abbrev-tests.el" "-- > command-line() > normal-top-level() > Test abbrev--possibly-save-test condition: > (minibuffer-quit) Thanks, should be fixed now.