From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#33007: 27.0.50; Proposal for function to edit and return string Date: Wed, 27 Apr 2022 19:44:54 +0300 Organization: LINKOV.NET Message-ID: <86wnfascft.fsf@mail.linkov.net> References: <86pnwh4je8.fsf@protected.rcdrun.com> <83bm81xl84.fsf@gnu.org> <20181011063321.GD27672@protected.rcdrun.com> <87lg74zk2k.fsf@web.de> <87v8uybp1c.fsf@gnus.org> <871qxlj293.fsf@web.de> <875ymx7ga6.fsf@gnus.org> <86pml5gp6m.fsf@mail.linkov.net> <87a6c8jhjb.fsf@gnus.org> <86czh3vp4g.fsf@mail.linkov.net> <87sfpyd8wu.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31245"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Michael Heerdegen , Jean Louis , 33007@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 27 19:02:48 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 1njl3w-0007zl-6Q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Apr 2022 19:02:48 +0200 Original-Received: from localhost ([::1]:36508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njl3v-0002fy-7s for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Apr 2022 13:02:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njkzR-0004eM-46 for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2022 12:58:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njkzQ-0005Df-QB for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2022 12:58:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1njkzQ-0003vB-Pg for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2022 12:58:08 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2022 16:58:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33007 X-GNU-PR-Package: emacs Original-Received: via spool by 33007-submit@debbugs.gnu.org id=B33007.165107868214945 (code B ref 33007); Wed, 27 Apr 2022 16:58:08 +0000 Original-Received: (at 33007) by debbugs.gnu.org; 27 Apr 2022 16:58:02 +0000 Original-Received: from localhost ([127.0.0.1]:44161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njkzK-0003sy-5F for submit@debbugs.gnu.org; Wed, 27 Apr 2022 12:58:02 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njkzG-0003sY-6k for 33007@debbugs.gnu.org; Wed, 27 Apr 2022 12:57:58 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 227BB6000A; Wed, 27 Apr 2022 16:57:49 +0000 (UTC) In-Reply-To: <87sfpyd8wu.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 27 Apr 2022 14:10:09 +0200") 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:230800 Archived-At: > pop-to-buffer-same-window does allow customization via > display-buffer-alist, but -below-selected would be a better default. This is what could be used: (pop-to-buffer (generate-new-buffer "*edit string*") '(display-buffer-below-selected (window-min-height . 10) (window-height . fit-window-to-buffer))) but currently its window-min-height has no effect. Maybe because of a bug? The docstring of display-buffer-below-selected: If ALIST contains a `window-min-height' entry, this function ensures that the window used is or can become at least as high as specified by that entry's value. Note that such an entry alone will not resize the window per se. In order to do that, ALIST must also contain a `window-height' entry with the same value. But still the window height is less than 10 lines. BTW, maybe read-string-from-buffer should have ###autoload cookie? Also any chance to make it argument-wise compatible with read-string? Currently: (read-string PROMPT &optional INITIAL-INPUT (read-string-from-buffer STRING &optional HELP-TEXT HELP-TEXT could be renamed to PROMPT, and STRING really is INITIAL-INPUT.