From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Lisp Api and backward compatibility Date: Fri, 12 Apr 2019 14:13:04 -0700 (PDT) Message-ID: <35f09611-dd35-48a2-942b-a5955671037e@default> References: <83ef67kmb0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="192121"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Sameer Rahmani , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 12 23:13:28 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hF3UG-000nqk-4r for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2019 23:13:28 +0200 Original-Received: from localhost ([127.0.0.1]:42756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hF3UF-0006Ls-30 for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2019 17:13:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hF3U4-0006KC-4B for emacs-devel@gnu.org; Fri, 12 Apr 2019 17:13:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hF3U3-0000Il-15 for emacs-devel@gnu.org; Fri, 12 Apr 2019 17:13:16 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:59890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hF3Ty-0000F3-UU; Fri, 12 Apr 2019 17:13:11 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3CL53TI153983; Fri, 12 Apr 2019 21:13:07 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=zaZHtNJYb/VnUGJjz4xJJ4ws7PxMuA+BdFWU03xMqBQ=; b=uoTv6aXWumGMXRzvQoCjJqNlYwNHrnDaNs8RTTvkx4tP+x+JbdWI6Zpw1jVo+Mj7bqyo AFLsFuJMEmD7nNTdOAUKjSz/7DxuvODR/BJqUlR+w90cFQ7iklWTXp6HBSwylv22YZPN i0SULS3HV1cfAVpsswnyRvK3kVHSZk2U3pdmBEDmTblevo+rruIQYqro3xud9vCzukH/ HRE5ZBygP2fWmPtwKtehVhFtTtupDAmUZcNTSumz4Jph4ANm51j59QZxlSe5iCwrUWhc PfoQ19FI8m+TyqcONkqTHHT4DlVbXyUuH49O03V8tCHN7F+2boOPeChhHdlyMT+YFAbQ /A== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2rpmrqrj54-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Apr 2019 21:13:06 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3CLBlm9183243; Fri, 12 Apr 2019 21:13:05 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2rpytdgvj2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Apr 2019 21:13:05 +0000 Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x3CLD5Ok017315; Fri, 12 Apr 2019 21:13:05 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4834.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9225 signatures=668685 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-1810050000 definitions=main-1904120139 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9225 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904120139 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.85 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235382 Archived-At: > I picked up a task to change `desktop.el` to be able to save/read > desktops with a name (basically writes the desktop in to a file under a > given name and later read from it). As you already know the > `desktop-save` fn for example gets directory name as the first argument > following by several optional args. So I was thinking to either: >=20 > 1) Add a new optional arg called filename and ask the desktop name from > user in interactive. >=20 > 2) don't add anything to the function signature and `read-string` it in > the function body. >=20 > what do you think ? Thanks for working on this. Sorely needed, IMO. I think you should add a separate function (a command in fact), which accepts the name of a desktop file as argument. I think you should not modify `desktop-read' to make it try to do what you want here. In Bookmark+ I've already written function (command)=20 `bmkp-desktop-read`, which does what you want. You can just use it (renaming it `desktop-read-file' or whatever). Or you can look to it for inspiration. Or not. The code is derived pretty straightforwardly from `desktop-read'. It makes use of option `bmkp-desktop-default-directory', the default directory used when reading the desktop file name. You can rename that option. It uses `bmkp--pop-to-buffer-same-window' which is just an alias for `pop-to-buffer-same-window'. No other changes should be needed if you want to use `bmkp-desktop-read'. Desktop function (command) `bmkp-desktop-change-dir' is also defined in the same file. It could perhaps be useful for `desktop.el' too. Here is the doc string: Change to desktop saved in DESKTOP-FILE. Kill the desktop as specified by variables =E2=80=98desktop-save-mode=E2=80=99 and =E2=80=98desktop-save=E2=80=99. Clear the desktop and load DESKTOP-FILE. The file is here: https://www.emacswiki.org/emacs/download/bookmark%2b-1.el