From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#33007: 27.0.50; Proposal for function to edit and return string Date: Tue, 16 Oct 2018 16:05:22 -0700 (PDT) Message-ID: References: <86pnwh4je8.fsf@protected.rcdrun.com>> <83bm81xl84.fsf@gnu.org> <20181011063321.GD27672@protected.rcdrun.com>> <87lg74zk2k.fsf@web.de>> <834ldsy31m.fsf@gnu.org>> <87efcrazrs.fsf@mail.linkov.net> <6a27b968-1307-44f2-b335-cde4ef51159b@default> <87pnw992hn.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1539731048 27695 195.159.176.226 (16 Oct 2018 23:04:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 Oct 2018 23:04:08 +0000 (UTC) Cc: Michael Heerdegen , bugs@gnu.support, 33007@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 17 01:04:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCYNf-00074r-P8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Oct 2018 01:04:03 +0200 Original-Received: from localhost ([::1]:60535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCYPl-0006z3-Ty for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Oct 2018 19:06:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCYPf-0006yw-1V for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 19:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCYPa-0006Mj-0Q for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 19:06:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49845) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCYPZ-0006Md-Rr for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 19:06:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCYPZ-0007Da-MK for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 19:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Oct 2018 23:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33007-submit@debbugs.gnu.org id=B33007.153973113627691 (code B ref 33007); Tue, 16 Oct 2018 23:06:01 +0000 Original-Received: (at 33007) by debbugs.gnu.org; 16 Oct 2018 23:05:36 +0000 Original-Received: from localhost ([127.0.0.1]:54103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCYP8-0007CW-OM for submit@debbugs.gnu.org; Tue, 16 Oct 2018 19:05:34 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:43782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCYP7-0007CG-08 for 33007@debbugs.gnu.org; Tue, 16 Oct 2018 19:05:33 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9GN48gA029797; Tue, 16 Oct 2018 23:05:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=FkWCqSTb20ErxEVLzJ2DdiQya0ObJfp53lrFCUYFxMA=; b=H6J8YX5RVZh2rDhTnlfF/tMK+8ir/u4gqfksMGV5DLQVajFu0ULPTG8KzWAa+wPjVJuj xGAAPQen0RD+kyQ8OGGEilyG3DDTJcBuHJWASYUQW8rUQG6o1fDB1kEjCeBDObkXIXyv PWnBjix7ad6KtxtjAkiTWLgBduthQRLlMG2JpzxsYnpI6Q1pFDDLvQEl0QGYdQE6vBtP rUdCWyeOMmsjNFCCd+OqjtecLiRpfZvuQQNPaFe/3qzaFlkdNrrMo6gLe67lgX6xvnJ3 bkN2m0JVJlK63KFOAp7wUkCqvTLcvzGIkQR4ieUaRmCDECetHUSdbEjWLuPnb4xp8QV2 6w== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2n39brbkjp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Oct 2018 23:05:27 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9GN5P85014358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Oct 2018 23:05:25 GMT Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9GN5OsT002454; Tue, 16 Oct 2018 23:05:24 GMT In-Reply-To: <87pnw992hn.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4735.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9048 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810160192 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151330 Archived-At: > > * what kind of popping up of the editing buffer > > * what to name the editing buffer > > * what kind of operation to process the edited text - > > a function (e.g. `read' in the case of editing a bookmark > > record, `read-string' in some other contexts, etc.). > > Maybe `read-string' by default? >=20 > read-from-minibuffer has the following arguments. Let's see which ones > should remain for the new function with a name like read-from-buffer > that will read from the editing buffer: >=20 > PROMPT - probably necessary to insert some explanatory text, such as > for example the text inserted at the top of the *Completions* buffer: > "Click on a completion to select it. > In this buffer, type RET to select the completion near point. > Possible completions are:" >=20 > INITIAL-CONTENTS - an obsolete alternative to DEFAULT-VALUE; > KEYMAP - useful to provide a special keymap in the editing buffer; > READ - interpret the result as a Lisp object and return that object; > HIST - not sure, what functionality should be associated with the histo= ry > in the editing buffer; > DEFAULT-VALUE - necessary to specify the value to return after typing > `C-c C-c' in the empty buffer; > INHERIT-INPUT-METHOD - necessary as well >=20 > The new arguments should be the same as currently for the function > display-buffer: >=20 > BUFFER-OR-NAME - the name of the editing buffer; > ACTION - display action like display-buffer-below-selected or > display-buffer-at-bottom. I don't see it like that. I don't see it like `read-from-minibuffer'. I don= 't see it as modal, requiring you to edit and return without doing other things in between. To me, this is not about creating something similar to a minibuffer interaction. I instead see it like what `M-x report-emacs-bug' does, followed by `C-c C-= c': 1. One operation to open a window with a buffer for editing something, possibly putting some text there, some of which could be ignored when the read or other action occurs (from `C-c C-c`).=20 That buffer would, yes, have a mode (which already also means a keymap, and possibly a read syntax (e.g. `emacs-lisp-mode' has Lisp `read' syntax). 2. Another operation, bound to `C-c C-c' in that editing buffer, which would do something to the edited text. Typically read it. Ignoring some text perhaps (e.g. instructions shown there to begin with). Think `report-emacs-bug' as the model, IMO. Or for a Lisp buffer, see, e.g.= , `bmkp-edit-bookmark-record' and `bmkp-edit-bookmark-record-send', in file `bookmark+-1.el', here: https://www.emacswiki.org/emacs/download/bookmark%2b-1.el I mention that only because I have it ready-to-hand. But this is Jean-Louis= 's bug. Maybe he has a different idea in mind. For me, what's needed is two operations - nothing modal: make available a buffer for editing something, and give you a way to send that something to some function that uses it. I'm also guessing that this is what Michael had in mind when he said that Emacs has invented this here and there, and he has too. Those existing here-and-there's are the place to start. I offered one, abov= e. I expect there are many others that folks have come up with. Looking at what they have in common should give us an idea of a minimum set and possible optional behaviors etc.