all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Juanma Barranquero <lekktu@gmail.com>,
	merrick@luois.me, 59506-done@debbugs.gnu.org
Subject: bug#59506: 29.0.50; (time-since nil) return format change
Date: Thu, 24 Nov 2022 13:03:07 -0800	[thread overview]
Message-ID: <9b0d8682-47af-8512-9725-5a2561752294@cs.ucla.edu> (raw)
In-Reply-To: <83fse9zuk5.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

On 2022-11-23 05:09, Eli Zaretskii wrote:
> Paul, any comments?

lsp-mode was buggy even with traditional Emacs timestamps like (0 0 0 0) 
because it mishandled millisecond counts. With new Emacs timestamps like 
(0 . 1000000000) lsp-mode signaled an error, exposing the bug. The 
problem has been fixed in bleeding-edge lsp-mode here:

https://github.com/emacs-lsp/lsp-mode/commit/e5a6274fac076f0d74a6ca892467be66a90a9649

and to forestall similar problems elsewhere I installed the attached 
patch into GNU Emacs master on Savannah.

[-- Attachment #2: 0001-Work-around-lsp-mode-compatibility-bug.patch --]
[-- Type: text/x-patch, Size: 903 bytes --]

From 55f6f1c82a35f0589d3dbdd1f32fae7ea9a758d8 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 24 Nov 2022 12:56:22 -0800
Subject: [PATCH] Work around lsp-mode compatibility bug

* src/timefns.c (Ftime_subtract): Respect current-time-list when
args are eq (Bug#59506).
---
 src/timefns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/timefns.c b/src/timefns.c
index eed2edf1cc..9beec1ce38 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -1194,7 +1194,7 @@ DEFUN ("time-subtract", Ftime_subtract, Stime_subtract, 2, 2, 0,
      quicker while we're at it.  This means (time-subtract X X) does
      not signal an error if X is not a valid time value, but that's OK.  */
   if (BASE_EQ (a, b))
-    return timespec_to_lisp ((struct timespec) {0});
+    return make_lisp_time ((struct timespec) {0});
 
   return time_arith (a, b, true);
 }
-- 
2.37.2


  reply	other threads:[~2022-11-24 21:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23  8:24 bug#59506: 29.0.50; (time-since nil) return format change Merrick Luo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-23  9:13 ` Juanma Barranquero
2022-11-23 13:09   ` Eli Zaretskii
2022-11-24 21:03     ` Paul Eggert [this message]
2022-11-25  6:50       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9b0d8682-47af-8512-9725-5a2561752294@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=59506-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=merrick@luois.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.