From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: progress-bar Date: Sat, 2 Nov 2024 19:02:27 -0700 Message-ID: References: <87h68v3q9k.fsf@posteo.net> <2930e7fd-a44a-4ab8-b2c8-809757a6af3a@gmail.com> <87cyjj3paj.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36703"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Mariano Montone , Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 03 03:03:05 2024 Return-path: Envelope-to: ged-emacs-devel@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 1t7PxJ-0009TP-QD for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Nov 2024 03:03:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7Pwo-0005U3-7J; Sat, 02 Nov 2024 22:02:34 -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 1t7Pwm-0005Th-OX for emacs-devel@gnu.org; Sat, 02 Nov 2024 22:02:32 -0400 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7Pwl-0001Ud-5e for emacs-devel@gnu.org; Sat, 02 Nov 2024 22:02:32 -0400 Original-Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-37d50fad249so2198193f8f.1 for ; Sat, 02 Nov 2024 19:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730599349; x=1731204149; darn=gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=DIDU0Fxd99nq3V1tq5G4pxl3w4s8FDeIC+HrrvCnvP0=; b=I8YcAE3jNMUKXxCvxH0kusorNewlhR0eIC6TFc4vUaxbwJX2kIslsslW9+fyxCPypI Dl8pPXWrgQrrroCEyh0jKe17M4f5UY9b1wAHmpZ4Lt5PNXCJ8sDK2IbnNmNpPPsq34vk N/qCy6DXz5+uJvi1NccO/61XoVo28fasdqUQRlYHqLsKktSvt5z3M1I8cAlAanXgiqFT I4wPc/S/MKfObwnlBAFr7LnGLF9x6XtqPxr2YcEDobVgBxx/ed/A78C2kvPhQASrJHph aRwR8F622WvkyKdoXoYJha4sTRMuG/IvgwFjX5pNPTzpVyV5ERlpjogIXDVl+vhqZTwr BUqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730599349; x=1731204149; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DIDU0Fxd99nq3V1tq5G4pxl3w4s8FDeIC+HrrvCnvP0=; b=viRJtmweGKCklaDkUID9yuSTcYEXrEh3wTgU75KF9ZZDqFBI2S11DiG8qRh55esEfc pEglwENlJCuZm/UrWRgjrIZjqgro96N91hTuZ8dIizMyg0FUDp8uAJorCb1XSOsbENDx MLFYQ4lUlI67DuvAeX3lZ3g5NmICV2eC8kWHyuIRFPbpvvf6DmsiOxIMDfc+WR46gF+C Q+4vAkmPgo4b4aGbC4Arekxl8HoEQj0ZkwkY9hYliR2nixS2GZA8tkZjgO9PLJh8/JqS EVkESIS47/JnyQ4U9AYF5pA2/nsMfADkbSUBmdnVlRzntVlP6v4hYDoml30WYmhoCv50 X2VA== X-Gm-Message-State: AOJu0Ywdy6PiS11KteNJ0NIbYtAUxl03TmASUo8YUmQK3BLF7juUQRzl eOx5YTJFmwPt+Wddr/E2l3pdMZN1PvwF2dtVTOwwJSJTMYDuGS2ndmSFJ2JmxqGpVjjfPhafATr 9p3W5gid+GnTYe2vMigQFi8PrgPmQyQ== X-Google-Smtp-Source: AGHT+IHSe4zBp7BMYJUa4KCxLwI1Nbcc2eBXn/C+Dtv3QvI+2Kp2Y+UmhREoEMqYUJluYd8kbZbIEVRkMYGuDe4MsYU= X-Received: by 2002:a5d:614f:0:b0:37d:398f:44f9 with SMTP id ffacd0b85a97d-3806115ae92mr18855496f8f.32.1730599348773; Sat, 02 Nov 2024 19:02:28 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 2 Nov 2024 19:02:27 -0700 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=stefankangas@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325039 Archived-At: Mariano Montone writes: > I'd be glad if someone can have a look and give me an opinion, and if > there's potential to integrate to Emacs after I improve it, make it > solid, and provide a backwards compatible interface for current Emacs' > progress-report. I think that we would be interested in adding such functionality to Emacs, yes. What I would find useful is a new user option to choose between different styles of display for the built-in progress reporters. Some of them could take full advantage of the capabilities on graphical displays, for example (i.e. SVG or somesuch), and others would be more basic (i.e. what we have now, or some ASCII/Unicode art). Here's where I would start: make it possible to plug in various implementations, and then make `progress-reporter-do-update' choose between them. The way I imagine this is that you have several predefined "displayer" (or simply "display"?) functions that are all called in the same way. Then `progress-reporter-do-update' would simply make any necessary calculations, and then call a display function. To customize this, the user could set some new user option (i.e. a `defcustom') to a symbol like `default', `bar', `ignore', etc., and then that would make `progress-reporter-do-update' call the correct function. We could also allow setting the option to some function that has the same call signature as the predefined ones. The first displayer to implement, of course, is `default', which is just simply what we have now. Once you have that working, it should be easier to add more. And indeed, adding more is probably the best way to figure out what is a reasonable call signature that all displayer functions should have. If you are interested in working on this, I suggest that you write up a patch for emacs.git and send it to the bug-gnu-emacs list. Thanks!