From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 4EjAAvVRRmQ2+gAASxT56A (envelope-from ) for ; Mon, 24 Apr 2023 11:55:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sFruAfVRRmTSHwEAG6o9tA (envelope-from ) for ; Mon, 24 Apr 2023 11:55:01 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 68C7612FF2 for ; Mon, 24 Apr 2023 11:55:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqstb-0001lc-7H; Mon, 24 Apr 2023 05:54:07 -0400 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 1pqstV-0001lR-CV for emacs-orgmode@gnu.org; Mon, 24 Apr 2023 05:54:01 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqstS-0003U8-Mc for emacs-orgmode@gnu.org; Mon, 24 Apr 2023 05:54:00 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E81842401CC for ; Mon, 24 Apr 2023 11:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682330035; bh=WLUjlwbcWm1JesP2IVaFeeMinTXVwIYY6vPwYD6MZzM=; h=From:To:Cc:Subject:Date:From; b=m/oPqk/gXIrirUzAYHIb/DaY1T+wry2HaiaYfvw8Lby6RiSJj4QHn1gEF6y/6l/M9 aDnNbpeeUUFFezTTfd4Q/XRVwrNMsz44Pc8zzduAt91bvmFpFvbYwB0DilQSknuuJE Db5CaAqePFj2e7nk+QTxpLaDqp45Pv3pDQAj4hv98mJ8MErsCYbXONIJY/DkykLRTd kMXFNSatLqI2TfST2MACDiYiVEQIUwpdj/c8OzY4JcJ2+wrLyCE2Tofv7qLNDpY6zT 3izhAqnDuTKUF/hwwjiIj29s3VyChKs9NVBXEwFwxPf1rNES4Lk0AR6x2hmXtZ0Pko 1wIi9LS7VQnNg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q4gSg3mRhz9rxW; Mon, 24 Apr 2023 11:53:55 +0200 (CEST) From: Ihor Radchenko To: Ruijie Yu Cc: Emacs orgmode Subject: Re: [BUG] LANG=fr_FR.UTF-8 org-clock "not at timestamp" In-Reply-To: References: Date: Mon, 24 Apr 2023 09:56:46 +0000 Message-ID: <87mt2xtxgh.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682330100; a=rsa-sha256; cv=none; b=JZByRWUNfduXasA0pbZ40EjUGjS955yEfKqD/XIsRAUDyjM3jY/f7hMhJSZBDeqHgQWMrs DOQkRWGLzEVnQeOgHrSlaGsateBO0dshSgO/iipHfKop1bMjArnWexRecAdJCqTZ/IRIrP NJUeKOpeRenF8MtNFAvWvEIvO8QuA3ViujZUShOe+dSJrC+ZCBhnkDSJjXgKOUqeTljd7i n3D9vRB7zEYWSHTTyxsEyMiu30CNRLY6TZ+CEq+tkTVQvq4/yuoVScukKIdmEmWiAikpqi cbRA9rupYeWK7Aaqw2GEGVkRkGVezf06rJgpvdzbUdNV6evhELWdLuAGoi2wpg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="m/oPqk/g"; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682330100; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aPlh8RxEKX4ob7pFn/P/6iA4r/eBiqEtVq+vLOrxfRA=; b=tiNW4RehSsceKBe32oYs4e6c3Hh3RWJUK6qhKB7CQxCxRdGfztusiJXH83xWRdjcB3GQVY g9D6r2pGZPqUivDyaAP6Yz/aX/l7nKQOEm0HTeXcwswZ//ng6UpoDFNWUGah+NOd5/alV3 jeEm1cC0ktOjPnQIk/5MGIedU50m4DXdZwAmW1Y+1v2iAFiY5S5JMB/OOEMpe8KKdm1a1T YyI29gUWewjsGOjqtMo0GPis0/7hwdNhZiXv5CFCPR0g+NZmQVEeH8FtL8ToDlZ0K1k0TK La5msn6rYGrpPnqTbJNN5zWYAkPYklSKgmr8+c2bxoFFD+IgOF2diitndm/SdA== X-Migadu-Spam-Score: -8.10 X-Spam-Score: -8.10 X-Migadu-Queue-Id: 68C7612FF2 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="m/oPqk/g"; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-TUID: +7pYBmOsAF4R Ruijie Yu via "General discussions about Org-mode." writes: > I am investigating test failures with LANG=fr_FR.UTF-8 amongst some > other locales. I noticed that the test > `test-org-clok/org-clock-timestamps-change' in > testing/lisp/test-org-clock.el around line 92 failed with "not at > timestamp", which I presume reveals a genuine bug. > > To simplify, here is a reproducer: > > --8<---------------cut here---------------start------------->8--- > (require 'org-clock) > (with-temp-buffer > (org-mode) > (insert "CLOCK: [2023-02-19 Sun 22:30]--[2023-02-20 Mon 00:35] => 2:05") > (goto-char 25) ; 2|2:30 > (org-clock-timestamps-change 'down 1)) > --8<---------------cut here---------------end--------------->8--- Confirmed. > The error appears: "Not at timestamp". I think it is due to the "." in > French day-of-week words, such as "dim.", "lun.", etc. Something must > not be expecting punctuations in that place. Nope. It is because the total length of the timestamp changes. `org-clock-timestamps-change' records buffer positions before changing the timestamps and when the timestamp changes in length, positions may no longer be accurate. In your reproducer, begts2 points one char before the actual timestamp upon modification and thus the logic fails. Note that we cannot use markers here because `org-timestamp-up'/down use `replace-match' that shuffles the markers around. (see FIXME in `org-timestamp-change'). -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at