From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Chong Yidong" Newsgroups: gmane.emacs.devel Subject: filesets-add-buffer Date: Fri, 1 Apr 2005 09:47:46 -0500 (EST) Message-ID: <4581.220.255.169.33.1112366866.squirrel@220.255.169.33> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1112366945 16093 80.91.229.2 (1 Apr 2005 14:49:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Apr 2005 14:49:05 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 01 16:49:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DHNQo-0007Xl-4X for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2005 16:47:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DHNhi-0006lv-S4 for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2005 10:04:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DHNh1-0006Wz-Ni for emacs-devel@gnu.org; Fri, 01 Apr 2005 10:04:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DHNgu-0006UL-ST for emacs-devel@gnu.org; Fri, 01 Apr 2005 10:04:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DHNgu-0006Tx-Q5 for emacs-devel@gnu.org; Fri, 01 Apr 2005 10:04:08 -0500 Original-Received: from [64.21.80.18] (helo=shark.dnsvelocity.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DHNRB-0005DZ-PG for emacs-devel@gnu.org; Fri, 01 Apr 2005 09:47:53 -0500 Original-Received: from stupidch by shark.dnsvelocity.com with local (Exim 4.44) id 1DHNR4-0000KE-5Q for emacs-devel@gnu.org; Fri, 01 Apr 2005 09:47:46 -0500 Original-Received: from 220.255.169.33 ([220.255.169.33]) (SquirrelMail authenticated user cyd@stupidchicken.com); by www.stupidchicken.com with HTTP; Fri, 1 Apr 2005 09:47:46 -0500 (EST) Original-To: emacs-devel@gnu.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - shark.dnsvelocity.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [32675 33085] / [47 12] X-AntiAbuse: Sender Address Domain - stupidchicken.com X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/3rdparty/squirrelmail/src/compose.php X-Source-Dir: :/base/3rdparty/squirrelmail/src X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:35478 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35478 Currently, the command filesets-add-buffer forces the user to supply the name of an existing fileset. With this patch, if the user supplies a new name, a new fileset is created. I think it is good to do this, because currently there isn't any quick and easy method to create filesets -- you have to do M-x filesets-edit and wade through the very confusing and difficult-to-use Customize buffer for filesets-data. *** emacs/lisp/filesets.el~ Fri Apr 1 21:55:54 2005 --- emacs/lisp/filesets.el Fri Apr 1 22:42:36 2005 *************** *** 1787,1794 **** (name (or name (completing-read (format "Add '%s' to fileset: " buffer) ! filesets-data nil t))) ! (entry (assoc name filesets-data))) (if entry (let* ((files (filesets-entry-get-files entry)) (this (buffer-file-name buffer)) --- 1787,1803 ---- (name (or name (completing-read (format "Add '%s' to fileset: " buffer) ! filesets-data nil))) ! (entry (or (assoc name filesets-data) ! (when (y-or-n-p ! (format "Fileset %s does not exist. Create it?" ! name)) ! (progn ! (add-to-list 'filesets-data (list name '(:files))) ! (message ! "Fileset %s created. Call `M-x filesets-save-config' to save." ! name) ! (car filesets-data)))))) (if entry (let* ((files (filesets-entry-get-files entry)) (this (buffer-file-name buffer))