From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: remember-region should be autoloaded Date: Wed, 19 Dec 2007 12:15:23 +0100 Message-ID: <4768FD4B.2060809@gmail.com> References: <87mys73r3l.fsf@tarn.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198062962 9891 80.91.229.12 (19 Dec 2007 11:16:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2007 11:16:02 +0000 (UTC) Cc: Ryan Yeske , emacs-devel@gnu.org To: Sacha Chua Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 19 12:16:14 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 1J4wuG-0002AZ-Ij for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2007 12:16:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4wtx-0007FC-3k for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2007 06:15:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4wts-0007Cm-NR for emacs-devel@gnu.org; Wed, 19 Dec 2007 06:15:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4wtq-00078O-Re for emacs-devel@gnu.org; Wed, 19 Dec 2007 06:15:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4wtq-000789-Ou for emacs-devel@gnu.org; Wed, 19 Dec 2007 06:15:42 -0500 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J4wtq-000249-7H for emacs-devel@gnu.org; Wed, 19 Dec 2007 06:15:42 -0500 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:65405 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1J4wto-0006jL-5n; Wed, 19 Dec 2007 12:15:41 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <87mys73r3l.fsf@tarn.lan> X-Antivirus: avast! (VPS 071218-0, 2007-12-18), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-Scan-Result: No virus found in message 1J4wto-0006jL-5n. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1J4wto-0006jL-5n f8e5e7a3efae0647fdd907623dd00a35 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:85281 Archived-At: Ryan Yeske wrote: > I usually use M-x remember-region to record notes from text in my emacs > buffers. > > > 2007-12-19 Ryan Yeske > > * textmodes/remember.el (remember-region): Add autoload cookie. > > > diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el > index 81be7ac..01d1954 100644 > --- a/lisp/textmodes/remember.el > +++ b/lisp/textmodes/remember.el > @@ -419,6 +419,7 @@ Subject: %s\n\n" > (when remember-save-after-remembering (save-buffer)))) > (append-to-file (point-min) (point-max) remember-data-file))))) > > +;;;###autoload > (defun remember-region (&optional beg end) > "Remember the data from BEG to END. > It is called from within the *Remember* buffer to save the text > > > Diffs between working revision and workfile end here. In my version of remember.el remember-region is already autoloaded, but it looks to me from the doc string like it should not be that since it is meant to be called from the *Remember* buffer. However there is a small bug in remember in the way it handles the region. Beside that it would be nice if it used the region when it is visible. Something like this in the beginning of remember: (defun remember (&optional initial) "Remember an arbitrary piece of data. With a prefix or a visible region, uses the region as INITIAL." (interactive (list (when (or current-prefix-arg (and mark-active transient-mark-mode)) (buffer-substring-noproperties (region-beginning) (region-end)))))