From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: activities Date: Fri, 26 Jan 2024 09:25:23 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="740"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 26 09:26:38 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 1rTHXp-000AXg-TS for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Jan 2024 09:26:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTHWu-00006p-2O; Fri, 26 Jan 2024 03:25:40 -0500 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 1rTHWr-0008WL-RM for emacs-devel@gnu.org; Fri, 26 Jan 2024 03:25:38 -0500 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTHWp-0005Ol-GV for emacs-devel@gnu.org; Fri, 26 Jan 2024 03:25:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1706257533; bh=rTfp0Gu7opA/h8sg26n4Bayfcci3wlpPm0/wRu4iOdM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=immVfXT8Zz1oUPNuia7aQXSOVrAQb65TUf7p1a2JhPLAJ6Z/xK5hWkG+aa2qTWGO4 WN2t/MJ2VszP/KXisHEQzWNoe4UIPJInYAoMNmlM6IIbE8ZloTfMD1rmitVMxUZzPz rHlN6PBIWx4UkoHyGOjO9mjE9yBU1ep5jd6ypZVmw0QlcLGAQgo0/ZQnLbESMuHyEi aUPJjjQmihw2jOsE7um/NPcj+96b3f0pC9VUVlZUM7987D6YAzKPCVl+oliQzHriyA hTtNoMyLOptpgLuIWKPu9XngSCXrY45jSahr/1ricWMrSdosrB9ROgS8z5NrVl74aK 2D/2AaVCln8jQ== In-Reply-To: (Adam Porter's message of "Thu, 25 Jan 2024 18:59:42 -0600") X-Hashcash: 1:20:240126:adam@alphapapa.net::2oPKbOH58NHhveh6:x5c X-Hashcash: 1:20:240126:emacs-devel@gnu.org::3Zbk90XOsSvXxH3T:eg8 Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:315421 Archived-At: Hello, Adam Porter writes: > Hi, > > I'd like to add a new package to ELPA, activities.el. It's hosted at: > > https://github.com/alphapapa/activities.el Look interesting! FWIW, I think a spot a small mistake in `activities-completing-read`: passing the value of the history variable to `completing-read` instead of the variable name. Also, it seems like the commands that use this function expect an existing "activity", so would it make sense to accept only matching inputs? That is, making the following change: diff --git a/activities.el b/activities.el index 60bbcaf..8ea687b 100644 --- a/activities.el +++ b/activities.el @@ -638,7 +638,7 @@ (cl-defun activities-completing-read "Return an activity read with completion from ACTIVITIES. PROMPT is passed to `completing-read', which see." (let* ((names (activities-names activities)) - (name (completing-read prompt names nil nil nil activities-completing-read-history))) + (name (completing-read prompt names nil t nil 'activities-completing-read-history))) (or (map-elt activities-activities name) (make-activities-activity :name name))))