From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincenzo Pupillo Newsgroups: gmane.emacs.bugs Subject: bug#55163: 29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode Date: Sat, 30 Apr 2022 14:32:17 +0200 Message-ID: <3233184.5fSG56mABF@zarathustrawsp500> References: <87sfpxxyvb.fsf@3-191.divsi.unimi.it> <4464915.LvFx2qVVIh@zarathustrawsp500> <83ee1e95jo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, eggert@cs.ucla.edu, 55163@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 30 14:34:07 2022 Return-path: Envelope-to: geb-bug-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 1nkmIZ-0005tc-TC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Apr 2022 14:34:07 +0200 Original-Received: from localhost ([::1]:43598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkmIY-0000Wh-ER for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Apr 2022 08:34:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkmHl-0000Tv-9p for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2022 08:33:19 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkmHW-0005NY-9A for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2022 08:33:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nkmHW-00023u-6Z for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2022 08:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincenzo Pupillo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Apr 2022 12:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55163 X-GNU-PR-Package: emacs Original-Received: via spool by 55163-submit@debbugs.gnu.org id=B55163.16513219477395 (code B ref 55163); Sat, 30 Apr 2022 12:33:02 +0000 Original-Received: (at 55163) by debbugs.gnu.org; 30 Apr 2022 12:32:27 +0000 Original-Received: from localhost ([127.0.0.1]:56077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkmGw-0001un-RW for submit@debbugs.gnu.org; Sat, 30 Apr 2022 08:32:27 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:39914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkmGv-0001qH-Eg for 55163@debbugs.gnu.org; Sat, 30 Apr 2022 08:32:26 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id d5so13963761wrb.6 for <55163@debbugs.gnu.org>; Sat, 30 Apr 2022 05:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7AhNPs2mGQaoxbkyMAH2EeIQIE6FLJwJwRkyW9Ljrcg=; b=OlPC8nvlUL1LayJ9yhvtFL5J9/+8oTnx3uOq47cCqV/Z0mGSkw6FGM1HqHPDLA//Ms a4lxX/iy1eqedQlWJF8TR8pvfMVMSD1JI0tWcDsV47yceI+lH5waASiJPvEcmUWx/E45 8EEhflUenWfd+qaWQ1bTbjPu2HEEqR4Bs7VMwecWOCOCAj7RaQyylevGUGeUIQ9rhunn nN2ZXUUX4WEmOooO6GYNr+tCblsuN0OUWptos92ZX5UmvkN8Mr6dZRrH99Nql1h5fgh6 9MiXEdsy0rYEb98FG3j5P0LYicwyZbmt1yIwaKQgajdhjA9W+wmZcbTRZqfvE57sFJvt RouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7AhNPs2mGQaoxbkyMAH2EeIQIE6FLJwJwRkyW9Ljrcg=; b=3pzjfJpbcOwYz/iZn89SuGkWkg57CdwefrcpLPQHNR3AOL70HRYfHwoS0tXSBWe1no mvSQSGfOXWw5ljZd+U0PAy/I85KPIOfNrc2K4siuR3a8mGMt4Mc0IrN40Wvc48uGPElM y0KZzzyY2gffLi5uHkPjYWiAGlqZViUykmT+TM49IsHgu79ko5kwDbNvpXbYHp1V3LPK Hu1ipP6zvPfNc+sOvANifL+k2W9bx7FjdED+pGHS3qyV7aoyKZgiMRpx6PqEPPIinGNJ rgc3oEFsTq6Rt9yc5sf+m1uiWtK+MzGiWrgGtcjTz9SX4sbuNt3M+s8DU4R8E2FDkpqx BFdg== X-Gm-Message-State: AOAM53336z8qXXe3bb1v0LQIbdG0on0VD8BVB4Y08NI/CNtLQud3/h5w kFjgOc8kBfkYmDIWgjuKEtc= X-Google-Smtp-Source: ABdhPJyRXhblfxKZZzMwo1E1jb7IocdZJ/LyW5foE6eLyy1+VfE1z4HiF9dPd0ptYUnSW8fOnwajGQ== X-Received: by 2002:a5d:4148:0:b0:20a:d2de:d960 with SMTP id c8-20020a5d4148000000b0020ad2ded960mr2920501wrq.61.1651321939407; Sat, 30 Apr 2022 05:32:19 -0700 (PDT) Original-Received: from zarathustrawsp500.localnet (93-43-201-114.ip93.fastwebnet.it. [93.43.201.114]) by smtp.gmail.com with ESMTPSA id r3-20020a7bc083000000b003942a244f32sm1692096wmh.11.2022.04.30.05.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 05:32:18 -0700 (PDT) In-Reply-To: <83ee1e95jo.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:231025 Archived-At: In data sabato 30 aprile 2022 13:25:31 CEST, Eli Zaretskii ha scritto: > > From: Vincenzo Pupillo > > Cc: larsi@gnus.org, 55163@debbugs.gnu.org, monnier@iro.umontreal.ca > > Date: Sat, 30 Apr 2022 13:21:04 +0200 > > > > In data sabato 30 aprile 2022 07:40:32 CEST, Eli Zaretskii ha scritto: > > > As I already said up-thread: let's not introduce APIs for which we > > > don't have clear and frequently-needed use cases in Emacs. Emacs is > > > not a general-purpose programming platform, it's mainly a platform for > > > writing text-processing applications. > > > > Many packages on melpa/elpa have a custom log function. I'm not familiar > > with the Emacs API, is there a standard way to log events? > > I think a simple log function would be useful for many packages. > > Do you mean logging to the system log? > > If not, then generating a log doesn't require any new primitives, I > think, you could just use write-region or something? > > Or am I misunderstanding the feature you have in mind? I mean something that can generate a properly formatted log message, in a "standard" way (with log levels, ERROR, WARNING, INFO etc, if possible), for both use cases if possible. Something like log4j, but not as monstrous as log4j. Just three examples of different way to generate logging message: 1. jsonrpc has a function, jsonrpc--log-event, that generates a message (msg (format "[%s]%s%s %s:\n%s" type (if id (format " (id:%s)" id) "") (if error " ERROR" "") (current-time-string) (pp-to-string message)))) 2. treemacs (see treemacs-logging.el: one function and six macro) 3. the package log4e (on melpa) The message format of these three packets is different. Something more "standardized" may be useful, I think.