From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59559: 28.1; `minibuffer-with-setup-hook' with :append Date: Sat, 21 Jan 2023 21:29:19 +0200 Message-ID: <837cxflm9c.fsf@gnu.org> References: <87pmbmnvdd.fsf@web.de> <87358iuqsj.fsf@web.de> <87edro6jl7.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24985"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael_heerdegen@web.de, 59559@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 21 20:36:13 2023 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 1pJJet-0006Be-Cz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Jan 2023 20:36:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJJYy-0006U0-P7; Sat, 21 Jan 2023 14:30:04 -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 1pJJYx-0006Ti-J2 for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2023 14:30:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJJYx-0007Ec-4X for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2023 14:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJJYw-0004Wg-T7 for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2023 14:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jan 2023 19:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59559 X-GNU-PR-Package: emacs Original-Received: via spool by 59559-submit@debbugs.gnu.org id=B59559.167432936317300 (code B ref 59559); Sat, 21 Jan 2023 19:30:02 +0000 Original-Received: (at 59559) by debbugs.gnu.org; 21 Jan 2023 19:29:23 +0000 Original-Received: from localhost ([127.0.0.1]:49816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJJYI-0004Ux-Np for submit@debbugs.gnu.org; Sat, 21 Jan 2023 14:29:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJJYH-0004Ug-NO for 59559@debbugs.gnu.org; Sat, 21 Jan 2023 14:29:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJJYB-00079r-WC; Sat, 21 Jan 2023 14:29:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RRMywXKeEgJSCmHzG4i1TdjPfOY2DzCqIPSoPsAAss0=; b=NTNH8cJLEPMy qVlIeV+uct7BQ8/0i4VRqw+8ZygJ5E7TpQUTy9Tp2tYHpAwgjpKHRlo1IrVsHp7iLhQVxSM6FdKQ8 MIi/RhCU5JnVKIUICi6uArtNzeoykFB/9RUqiWdBTD+2VU19pFigFeYCrkvntEsNdjlFLu3bCyZKV Ws6frkkSlFlmF0rInereYxUak8c5OtZVkGzujDp4HIT15xxo1gCGrOFQLAmN7gvAiwBtC+7KOa/in VLagCWrcRJTqKuU2HRhAQSsge3qoACY2k/W49tdLmr6G2lfobUQ+Vta+wJlqNOSGeuiEBrk1vyQif CgEMeAvpSIH6/z4czn2VvQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJJYB-000188-A4; Sat, 21 Jan 2023 14:29:15 -0500 In-Reply-To: (message from Drew Adams on Sat, 21 Jan 2023 18:41:15 +0000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253881 Archived-At: > Cc: "59559@debbugs.gnu.org" <59559@debbugs.gnu.org> > From: Drew Adams > Date: Sat, 21 Jan 2023 18:41:15 +0000 > > I suggest something like this - somehow get across > the fact that FUN _might_ be simply evaluated, and > the result prepended, or it might be a sexp that's > _not_ evaluated, but _part_ of it is, and in that > case the result of that evaluation is appended. > > E.g.: > > Argument FUN is a sexp; it is not simply evaluated. > Two cases: > * If FUN has form (:append FUNCTION), evaluate > FUNCTION and append the result to the hook. > * Otherwise, evaluate FUN and prepend the result > to the hook. > > Another possibility: > > If FUN is (without evaluating) a sexp (:append FUNCTION) > then FUNCTION is evaluated and appended to the hook. > Otherwise, FUN is evaluated and prepended to the hook. > > (Could say "list" instead of "sexp", but the latter > stresses the connotation that it's not evaluated.) > > We might also change the name FUN. Maybe use FUN-SPEC > or something - something that doesn't suggest that it > _is_ a function but that it specifies a function that > gets added to the hook. All of your suggestions just muddy the water, making a clear doc string confusing and risking the user's interpreting that like some kind of black magic is going on here. The current doc string is clear and easy to understand and use.