From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Andreas_R=C3=B6hler?= Newsgroups: gmane.emacs.help Subject: Re: Test succeeding only from edebug Date: Tue, 6 Aug 2024 09:16:25 +0200 Message-ID: References: <72b4a744-e622-4859-8ffa-7b0b59bc8a44@easy-emacs.de> <87le1bhtop.fsf@web.de> <35e7f181-19e4-407b-acf6-7014b6ce98af@easy-emacs.de> <87a5hqifoq.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15947"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 06 09:17:31 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1sbERm-0003zC-6f for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 06 Aug 2024 09:17:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbERF-0006o7-C1; Tue, 06 Aug 2024 03:16:57 -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 1sbEQv-0006mQ-0t for help-gnu-emacs@gnu.org; Tue, 06 Aug 2024 03:16:53 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbEQs-00029B-Cj for help-gnu-emacs@gnu.org; Tue, 06 Aug 2024 03:16:36 -0400 Original-Received: from [192.168.178.61] ([89.247.171.235]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MRTIx-1spCNl2bv3-00NUB1 for ; Tue, 06 Aug 2024 09:16:28 +0200 Content-Language: en-US In-Reply-To: <87a5hqifoq.fsf@web.de> X-Provags-ID: V03:K1:dwm62AZqePXEp4ox2bYSe8qtvYutW0gY9ifGl0CDcZvsLdHgVRS Q4qDsD8dIN7Rh9wxmsIHQfoP+lfnfxcdYOnsfr4ZecHHzC8TqgvdHx4alcyr5A7KSxqIJNU e+7Hy3wzSnVl9R8aQA4+MYoiqS6eHhe//i149IZMDSuienhb9wdu2ms+hi/OM4xCymZ3BVE Bk5begIEdFBo9xgcL661Q== UI-OutboundReport: notjunk:1;M01:P0:vkK6CL8nQ3g=;rl/fAnU4M86YagdyIz2nxOVd1Kr b5HyODELoEmXcsVYKD5DZ4ca+VmV+4fpYt9+HvqdgK4w/9BBJeWfOvJqCPzJcGSyY174qJynK 5k+IoFX6R9dQhMjLP5FkY/ySvf1nKw1fNN6ty3heKNvKic2mFO08s2k6X+hX9iXdqxbyDE5jQ Sgqke1A4wx5HQsbCMc8NBE8ofUfkSAl/Qtn8zLMM1sES0YSMwVDooauNv+UB1pmnY9B//ksz9 8snT8YhnVy9M0LUD5bZ+djWppGh9vxxn/x84ZITSYdp0otbGhr317+UrWXtjzIZkIWCNJ7W6W 8j2SyaTDgYJg09ONkMe0hNaNKtsaq90qL+e3hjlZWlELjiK8dDDUfKVxUtubd+XV+NB99Nzfz vzEsbGHjKNknV5VnRxm/WTaeQ1M6GMMF6xspv0nmFbGZPtfXo0WaC/a3Jv7VKSOEKGHeCMXBL cT2bN2oHvKIcLj6aSykdCG2epRwau25TO2EozH1hlrq0ID6LnVbB63UNQLMSfapLwXOgdlAUG +j3LRFjx/H7pKmyFD9H5/4AIHUnAKa+USvgDvkzzfKMltMyj70MnUm4SXqrsaA8JAYCOAEqJw DWvShF7VhSwcK0jPVoxvzExQ57Mtszx1ShLaiipS5yh0mY4yJJsYX34blS3QxissYspruxXZn YpdNHgUa3hFIq+TpbBv0qpIHhfzsizE7SalxtDs+vzLnlHQm+bHTcfGJFumCBfLagvmQYG+qt KraEZ0SfNnC8bFnxGkYjhLgTzhD7GY98A== Received-SPF: pass client-ip=212.227.17.13; envelope-from=andreas.roehler@easy-emacs.de; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147525 Archived-At: Am 06.08.24 um 03:49 schrieb Michael Heerdegen via Users list for the GNU Emacs text editor: > Andreas Röhler writes: > >> Here ist the test, which should remove all braces in buffer: >> >> (ert-deftest ar-trim-braced-in-region-test () >>   (ar-test-with-elisp-buffer-point-min >>       "{asdf} {asdf} {asdf}" >>       (goto-char (point-min)) >>       (set-mark (point)) >>     (end-of-line) >>     (ar-trim-braced-in-region-atpt) >>     (should (eq (char-before) ?f)))) >> >>> Or fails compiled and interpreted? >> Usually don't compile my stuff. > Ah ok...so there is no error, just the test fails. > > In my experience it is so that when something works correctly when > edebugged but not when run normally, very often the code assumes a state > that is only reached after a (or multiple) redisplay operations have > been performed. When edebugging Emacs gets idle in situations when it > is normally not (each time edebug stops). > > I'm not sure which part of your code could rely on such an assumption, > I'm too tired atm too study all details. Could be font-locking that has > not yet been performed - if your test makes use of font-lock features. > > If adding an explicit (redisplay) call at the end of the buffer setup > in the definition of `ar-test-with-elisp-buffer-point-min' or before the > `should' call helps then this would be it. In case of font-lock you > would then want to call (font-lock-ensure) to force font-locking > explicitly before Emacs gets idle. Yes, however, not at stake here. > Please tell me if that helps to make any progress - else I try to have > an even closer look tomorrow. > > > Grüße, > > Michael. > putting a (sit-for 0.5) into ar-thing-in-thing seems to solve it. Thanks again, Andreas