From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Daiki Ueno" Newsgroups: gmane.emacs.devel Subject: Fwd: Moving files from lisp/gnus/ to lisp/net/? Date: Fri, 9 Nov 2007 22:40:56 +0900 Message-ID: <54a15d860711090540md0e44c7heb89e238beea31ce@mail.gmail.com> References: <87y7dd2e0f.fsf@mocca.josefsson.org> <54a15d860711060601s2d85f32o5942939270a7e59e@mail.gmail.com> <54a15d860711071646u2c200961y69e7d684c7418a7a@mail.gmail.com> <54a15d860711081633k364caf30r3b75464be8a060fa@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194615748 21217 80.91.229.12 (9 Nov 2007 13:42:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Nov 2007 13:42:28 +0000 (UTC) To: simon@josefsson.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 09 14:42:22 2007 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 1IqU7c-0007GY-37 for ged-emacs-devel@m.gmane.org; Fri, 09 Nov 2007 14:42:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqU7Q-0007zL-6a for ged-emacs-devel@m.gmane.org; Fri, 09 Nov 2007 08:41:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IqU6c-0006wb-DD for emacs-devel@gnu.org; Fri, 09 Nov 2007 08:41:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IqU6a-0006t2-FU for emacs-devel@gnu.org; Fri, 09 Nov 2007 08:41:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqU6a-0006sk-BL for emacs-devel@gnu.org; Fri, 09 Nov 2007 08:41:04 -0500 Original-Received: from nz-out-0506.google.com ([64.233.162.236]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IqU6Z-0004eJ-TG for emacs-devel@gnu.org; Fri, 09 Nov 2007 08:41:04 -0500 Original-Received: by nz-out-0506.google.com with SMTP id f1so455810nzc for ; Fri, 09 Nov 2007 05:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=YM4mQDOL+d2G9K2rz7XyLNKznIpYE46mvOxg3y5ApAA=; b=EdLxkVu+jhASEob6YvEP4hkjBbUkkA4IjK+Pxg+ishXD+CYgu0NcWX2RPN7DQzmKq4vrtLm3DIfYG4d72u9P/1hljKzbvLrai4Kd/HMt7oeXobkH3l3XsIvsYR2eHlEwmeEZ5aRrYMYGyTvuPBB1AMBd4Y/EppUIGKAfo9oQGtM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=iTTNa5wVfXiZFMBvW0F5aGvoZytiBZ+Hkkov1a7yZWJsyESwK4z9Y1BaTsDq3U8SoDD6ULsGCLkP2WWwBoRBk4/8XhFNVUXSM4HwlPMhnBXYIT4CB0tirr8hvI4XRM3k/iN+Wa1l3FXVc4LmlIYn7k/uBiAXluCcVYmXVRtql1E= Original-Received: by 10.142.214.5 with SMTP id m5mr435815wfg.1194615656350; Fri, 09 Nov 2007 05:40:56 -0800 (PST) Original-Received: by 10.142.241.4 with HTTP; Fri, 9 Nov 2007 05:40:56 -0800 (PST) In-Reply-To: <54a15d860711081633k364caf30r3b75464be8a060fa@mail.gmail.com> Content-Disposition: inline X-Google-Sender-Auth: 086788065b34ae14 X-detected-kernel: by monty-python.gnu.org: 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:82868 Archived-At: I'm sorry for that I sent this message only to Richard, by mistake. ---------- Forwarded message ---------- From: Daiki Ueno Date: 2007/11/09 9:33 Subject: Re: Moving files from lisp/gnus/ to lisp/net/? To: rms@gnu.org 2007/11/9, Richard Stallman : > (3) if read-passwd caches passphrases when the optional argument is > given, some people will misuse that new feature (perhaps by cut&paste > existing code) > even though the docstring of read-passwd explicitly states that behavior. > > I don't follow. What is the scenario you are worried about? > What code are they copying and pasting? And why is misuse > more likely if the new feature is an optional argument > than if it is a separate function? > Ok, here is my scenario: (1) There is a package "foo" which consists of several files. (2) "foo" manages passwords used within the package with the same key associated in the cache. For example both foo-imap.el and foo-smtp.el in "foo" use read-passwd with the optional argument like this: (read-passwd "Password: " "foo") (3) The author of another package "bar" wants to read password which is not necessarily cached. He searches for appropriate code in several elisp packages including "foo", and finds several uses of read-passwd: foo/foo-imap.el: (read-passwd "Password: " "foo") foo/foo-smtp.el: (read-passwd "Password: " "foo") baz.el: (read-passwd "Password: ") The first two lines and the last one looks similar and the author of "bar" might use the former with a change of the package name "foo" -> "bar". On the other hand, if there is a separate function named password-read-and-cache and "foo" uses this function, the author of "bar" will find: foo/foo-imap.el: (password-read-and-cache "Password: " "foo") foo/foo-smtp.el: (password-read-and-cache "Password: " "foo") baz.el: (read-passwd "Password: ") The first two lines and the last one looks different and it is quite obvious for the author of "bar" that the first two do password caching and the last one doesn't. BTW, though it might not match elisp, there is an argument of function naming in other languages. http://www.zenspider.com/dl/rubyconf2005/open-uri.pdf That says "give shorter names to frequently used functions, longer names to rarely used functions". My suggestion is based on the fact that I hope that password caching in elisp will not be used frequently ;-) Regards, -- Daiki Ueno -- Daiki Ueno