From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id Qp4pDcAHz2C1YgEAgWs5BA (envelope-from ) for ; Sun, 20 Jun 2021 11:17:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KM9aCMAHz2DlZwAA1q6Kng (envelope-from ) for ; Sun, 20 Jun 2021 09:17:52 +0000 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 5F5C69C9F for ; Sun, 20 Jun 2021 11:17:51 +0200 (CEST) Received: from localhost ([::1]:51726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lutaP-0004Nm-GN for larch@yhetil.org; Sun, 20 Jun 2021 05:17:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lutZx-0004NO-8o for emacs-orgmode@gnu.org; Sun, 20 Jun 2021 05:17:21 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:43922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lutZr-0002UR-4V for emacs-orgmode@gnu.org; Sun, 20 Jun 2021 05:17:20 -0400 Received: by mail-lj1-x233.google.com with SMTP id g13so10239251ljj.10 for ; Sun, 20 Jun 2021 02:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=oYxQFgGz/Y5cU85mKCtcwS8tgwsERGVt56pbiyq+ubI=; b=gLvzLOPj8Y1t+qSXnlOymOCcJuJqGrgGN6nCs6yQ8XaBfuGGSVlKlL2ZB2VCK8bM54 EjKTMqfGJG3IHcMN1AGTe8mnV2kpgjGYlDKjc5u1hkWTlzvbf3oDtIq9EORj4EF7VzEk g8EUiEE+KS/s19VdlYYXqqiKgVWnO+Lb5PwgKg9peJfMxC5RsQ2qyfJvCFpWlfCqNUda fBqZ4kyThf3hxTqr4ZlN3sM4RWbPUIvNZsvPEjpxMoQ/9URfctp36ozZ6ZE32/tGzFTm hET2665varRAKsPtisCK41GBSw7pUfrH8guy/4s8IIWvGVP1hTbO4cOdRNNIqNC+zsD3 vVWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=oYxQFgGz/Y5cU85mKCtcwS8tgwsERGVt56pbiyq+ubI=; b=sIUN5ys51ZuQFeUeS7FdCoYbuRClFxh/y5zEcL5Z1HQiOfOyGoD4a3xaf242RR5YU+ rbDoWI/fvGverGBdafFYyJpBiPhJswQEP1G+e4NUh3ldI4p2a8A+TU1XBZGZQretK1ln b/LZDl9WoPudcDV1PIFMCUm4oVcquTNBvpb2Nc5PtwBoMURiUrEzA97wshdzvmTVrawT fAn6PW+a8rTioyG3NoLeXvFNGkEaOSISA9pm9eAIfetL7RZCyd3gIrog8dvw8cFeBIHY xIQtK//D4fV0HI0HPVLEezsUIzMS4EoGPUeH9J423a/3E1sks/UwFXDKB9hvvEt1s/xv GQgQ== X-Gm-Message-State: AOAM5302oHSx035y5VSnabMuOoR6EoOZ9R1Yw0IeXn+5jYfa7XRSYC5R WMK3hNZ2XbVKAoOSm7E2caba4UQIwCo= X-Google-Smtp-Source: ABdhPJyUl0XHfnerafopBxRAnQNLXaKi3TfQdFbyEPvPkN2/wkW5bSo9DYc5CDHSKTM4QifyG/KSKw== X-Received: by 2002:a2e:9152:: with SMTP id q18mr16972867ljg.493.1624180632177; Sun, 20 Jun 2021 02:17:12 -0700 (PDT) Received: from localhost ([158.255.2.9]) by smtp.gmail.com with ESMTPSA id j24sm1718569ljg.46.2021.06.20.02.17.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jun 2021 02:17:11 -0700 (PDT) From: Ihor Radchenko To: Org-mode Subject: [PATCH] Fix regression in org-get-time-of-day introduced in aba1f2066 Date: Sun, 20 Jun 2021 17:17:11 +0800 Message-ID: <87fsxcj3oo.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=yantar92@gmail.com; helo=mail-lj1-x233.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624180671; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=oYxQFgGz/Y5cU85mKCtcwS8tgwsERGVt56pbiyq+ubI=; b=KI3iW8wIobkos+lPjQPciAxxJTESr4Yq3umSbxYT7Qz9ZqSZq7yj42dewDJad4UIN0Gc4c bAf2igJPxOOuIHNChppPJOxGMVLfGiAnQ8yBKV5NWMSCTyFwunShsJLjr9jGYGkxzh80hz s36SciHFW01HSlD09FIRO5ETVija08Iqz+CbOBbjGNr0y2ew3RE9phpYpbj4IdAi5ZTdY1 9UMovMftojI3jpnoIqookFy8aRBxK7LqwrCpFruWQSbPErUFk16T7kqzdPe7avrU1zHD9A j04WRfGsrZU1Aa5u1734YEPKKx656WrfXwif5U7ZynxuJoTbfP6Ys+vOneyZ3w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624180671; a=rsa-sha256; cv=none; b=fEQuyshX1ifzKyADKvzujpLuBDa891e2j0mzz2QL2H705PwiJRrvtfpHD0+j+1yHb4phFn Ud9ADYPZ5VWtgbuFCElS3KFTphWQtIVu7U1jus+6lTPAZNlSQAIYes6vD+uFn+p1UhDe6r m1ZCk0nicwT36i9v/zDpR+gEmWCy85C+cmKuzh7ZERhh6+AS25ICv0C/JmQfr32G9yWZMd s5MI/UKfTiZT44Sd7kWZBStKRVK2eYpucf2/4GIXg2HzPT6DOFDsJZL8ZLZp2uZcyWjLfs 2CceLxQfoZCUUJcviosihlMqUzb52A5K+HoJ+nPqQG6sYxrJo0vEz+mYs1k7rQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=gLvzLOPj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=gLvzLOPj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 5F5C69C9F X-Spam-Score: -2.63 X-Migadu-Scanner: scn1.migadu.com X-TUID: yqCFrD3VxdO9 --=-=-= Content-Type: text/plain The new version of org-get-time-of-day errors on empty string argument. The attached patch is fixing this. Best, Ihor --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-regression-in-org-get-time-of-day-introduced-in-.patch >From b615265881bdbb65f9a99d9f076424cb2233b250 Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Sun, 20 Jun 2021 17:15:34 +0800 Subject: [PATCH] Fix regression in org-get-time-of-day introduced in aba1f2066 * lisp/org-agenda.el (org-get-time-of-day): Do not check 'face property when S argument is an empty string. The old version of the code would throw error on (get-text-property 1 'face s). --- lisp/org-agenda.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index a6bc8bcf0..f9077f0c8 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6995,7 +6995,8 @@ (defun org-get-time-of-day (s &optional string) (group-n 3 (or "am" "pm"))) word-end))) (save-match-data - (when (and (not (eq 'org-link (get-text-property 1 'face s))) + (when (and (not (string-empty-p s)) + (not (eq 'org-link (get-text-property 1 'face s))) (string-match time-regexp s)) (let ((hours (let* ((ampm (and (match-end 3) (downcase (match-string 3 s)))) -- 2.31.1 --=-=-=--