From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mariano Montone Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: progress-bar Date: Tue, 29 Oct 2024 12:48:59 -0300 Message-ID: <4911bee4-0464-4118-aed5-aaebeea9fb7b@gmail.com> References: <87h68v3q9k.fsf@posteo.net> <2930e7fd-a44a-4ab8-b2c8-809757a6af3a@gmail.com> <87cyjj3paj.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------2UbXYnwzGofUTNC3twUhmgL7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40192"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 29 16:50:00 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 1t5oTo-000AMY-4L for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Oct 2024 16:50:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5oSy-0005lT-HB; Tue, 29 Oct 2024 11:49:08 -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 1t5oSw-0005kx-EB for emacs-devel@gnu.org; Tue, 29 Oct 2024 11:49:06 -0400 Original-Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5oSu-0003vl-Oy for emacs-devel@gnu.org; Tue, 29 Oct 2024 11:49:06 -0400 Original-Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-71e74f35acaso460841b3a.2 for ; Tue, 29 Oct 2024 08:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730216942; x=1730821742; darn=gnu.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=r3xhrxACe5zZPKyUkXlr2aVJhvEvooHhn/7PRuW0Nq4=; b=fMJeZD8ei+T3AIhadeSv3Kk8JEl/Xn859dtH5UuxOdDQMKxFdEfuU/NyUZWstJK6pj fQKfp7XU5vBn8j87UZPpIUcYIPBn5ySN8t2IDDxvfYzGq1q5US5wXBBo73PgyMFBALQu xqtZa10w5of1Qib9nblbFpXElB0Modk8tjeGJgfuT5tGmCnNbHZqnzSLPJSDaTZSMk0Y vMcqq5eC9aeefbQh/0/xnue21Ww1KZ7LLMRRVHICczo5lfqAE1ctbNGzUU4sbbECWZtY b4xHhN4TC4egeZhcL0u85XN/Z9CGS4Xrg77LbsSwkDW3SGDICMS3ORK1gCBk2X8Bl/jO fuVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730216942; x=1730821742; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=r3xhrxACe5zZPKyUkXlr2aVJhvEvooHhn/7PRuW0Nq4=; b=wxyLMN6Gfe83qT45wPfO4PvOgkIUSM65jbLC1Lju3xpsCeVKZUSHi4vPKyGQEg6zg/ /QRBJqOilhn78cLFSVnwRNkRXq6VadkIFP4a/jO0LkJgV3HsSDJE1Y4zFQLnx2j5vKrh l53zQD1YMZXhq6Q6VEr+ocCHV3ytmpWG5o5qrcahU9lL7w3XQpUC//Vga7dvovzOUjJM 2mhXtZgVaT4iTfg1YdNlk+7GLZMIYT1YNpo75bg3aVKazzUbd/J4LPupPHpk/OTqY1s3 q2nAK3d8bb4ySu2qijacZu6wXwYvs2MqVywGil1hbg6vliaMWwofzS+RUgpkB95C652X nKbQ== X-Gm-Message-State: AOJu0YyCLdGCJ6sTT9f+brJLo6SjoMKMFhyEpcklSTLrSX5zSzB0j9Si gD62EelxHwHLAZLoR5iKpCoNq9ztl8KFnAg4F9whdNmw2DvGKj1p X-Google-Smtp-Source: AGHT+IFiz7oiAfkCqChvP0BzYjA1xKf1OVGe/XyCK2AFrZ4/EQSupC6BrMh3ncddBhLbnJYr8+E8NA== X-Received: by 2002:a05:6a00:1ace:b0:71e:4842:55fe with SMTP id d2e1a72fcca58-720630065d6mr7658252b3a.4.1730216942013; Tue, 29 Oct 2024 08:49:02 -0700 (PDT) Original-Received: from [192.168.0.15] ([190.19.45.46]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057a433dcsm7655213b3a.217.2024.10.29.08.49.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Oct 2024 08:49:01 -0700 (PDT) Content-Language: en-US In-Reply-To: <87cyjj3paj.fsf@posteo.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=marianomontone@gmail.com; helo=mail-pf1-x42c.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, HTML_MESSAGE=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:324921 Archived-At: This is a multi-part message in MIME format. --------------2UbXYnwzGofUTNC3twUhmgL7 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit El 29/10/24 a las 12:24, Philip Kaludercic escribió: > Mariano Montone writes: > >> El 29/10/24 a las 12:03, Philip Kaludercic escribió: >>> My main question, which I realised too late when reading the code, is if >>> you could rework this to integrate into existing instances of >>> `make-progress-reporter', just replacing the UI. It seems like it would >>> be more effective and consistent, and avoid hard dependencies of >>> programs that want to use `dotimes-with-progress-bar' (or as I renamed >>> it `progress-bar-dotimes' to avoid namespace clashes), when >>> `dotimes-with-progress-reporter' already exists and is being used. >> Oh. Thanks for the patch! I'll look at it. > Just keep in mind that it is not a patch, it is just a convenient way to > suggest changes and add comments. Yes. >> The integration part is in progress-bar-integrations.el. How does it >> looks to you? > Oh, I missed that. My main issue is that this mixes both the > `progress-reporter-do-update' integration with other advice on functions > like `package-upgrade-all'. I think having a global minor mode would be > the right approach, instead of advising on the top-level. > > Generally it would be neat if we could find a solution that would avoid > the need for advice, but I don't see a clean way to do that right now. > Would you be interested in preparing a patch for subr.el that would make > progress-reporters more flexible? Yes, but I would need more precise explanations from you on your idea of how to do it.         Mariano --------------2UbXYnwzGofUTNC3twUhmgL7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


El 29/10/24 a las 12:24, Philip Kaludercic escribió:
Mariano Montone <marianomontone@gmail.com> writes:

El 29/10/24 a las 12:03, Philip Kaludercic escribió:
My main question, which I realised too late when reading the code, is if
you could rework this to integrate into existing instances of
`make-progress-reporter', just replacing the UI.  It seems like it would
be more effective and consistent, and avoid hard dependencies of
programs that want to use `dotimes-with-progress-bar' (or as I renamed
it `progress-bar-dotimes' to avoid namespace clashes), when
`dotimes-with-progress-reporter' already exists and is being used.
Oh. Thanks for the patch! I'll look at it.
Just keep in mind that it is not a patch, it is just a convenient way to
suggest changes and add comments.
Yes.
The integration part is in progress-bar-integrations.el. How does it
looks to you?
Oh, I missed that.  My main issue is that this mixes both the
`progress-reporter-do-update' integration with other advice on functions
like `package-upgrade-all'.  I think having a global minor mode would be
the right approach, instead of advising on the top-level.

Generally it would be neat if we could find a solution that would avoid
the need for advice, but I don't see a clean way to do that right now.
Would you be interested in preparing a patch for subr.el that would make
progress-reporters more flexible?

Yes, but I would need more precise explanations from you on your idea of how to do it.

        Mariano

--------------2UbXYnwzGofUTNC3twUhmgL7--