From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: zslevin@gmail.com Newsgroups: gmane.emacs.devel Subject: Extra arg in interactive? Date: Fri, 6 Jul 2007 17:45:17 +0800 Message-ID: <200707061745.18056.zslevin@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1183715130 25521 80.91.229.12 (6 Jul 2007 09:45:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2007 09:45:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 06 11:45:28 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6kNT-0001SP-Kb for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2007 11:45:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6kNT-00022z-2p for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2007 05:45:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6kMZ-0001no-PY for emacs-devel@gnu.org; Fri, 06 Jul 2007 05:44:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6kMX-0001n4-Ja for emacs-devel@gnu.org; Fri, 06 Jul 2007 05:44:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6kMX-0001mw-BR for emacs-devel@gnu.org; Fri, 06 Jul 2007 05:44:29 -0400 Original-Received: from nz-out-0506.google.com ([64.233.162.239]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I6kMW-0003LP-Sp for emacs-devel@gnu.org; Fri, 06 Jul 2007 05:44:28 -0400 Original-Received: by nz-out-0506.google.com with SMTP id f1so131846nzc for ; Fri, 06 Jul 2007 02:44:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=EbtzIKh5IMGvl24skKUmeLArZaCO05aZvVccSr/qBP7CPqSE3KtjIg4YgdKpqO4dQMIyQHeiZd2fnLV0xt5LKg6HNtxKF24r9BsKMv2o6fPXDv9pqwf5Z2Rqmv02bmM/+0pgkDPG7V7Jmzwj5n7Jwlv+QD8mBQYpITVyd8Jc74M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=qShskGlbX2+QP/6B1WB8UdLSvb6tve1XRMtq08T5dqmBKai+gSMwSnJe9rwkx+onEwQxtuntMg7zBdPV/KYQgbPhzLg2zh/hSrTx12nr/uMZXZa03KBqgtMZ8cG5NTtQufJcZM8OCRNbw+NJQLbDol0tw8/PZ4d8ZCwHk23GsSE= Original-Received: by 10.141.20.7 with SMTP id x7mr136755rvi.1183715067574; Fri, 06 Jul 2007 02:44:27 -0700 (PDT) Original-Received: from levcom ( [61.234.125.31]) by mx.google.com with ESMTP id f34sm1478408rvb.2007.07.06.02.44.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Jul 2007 02:44:27 -0700 (PDT) User-Agent: KMail/1.9.7 Content-Disposition: inline X-detected-kernel: Linux 2.6 (newer, 2) 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:74384 Archived-At: I find it handy in string input to use the region string if it is active, or read from user if it is not. So I usually have: (interactive "Mphrase: \n") replaced with: (interactive (list (or (and mark-active transient-mark-mode (buffer-substring-no-properties (region-beginning) (region-end))) (read-string "phrase: ")))) If an extra arg in interactive does this as well, that saves lots of work. Thank you -Levin