all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* remember-region should be autoloaded
@ 2007-12-19 10:40 Ryan Yeske
  2007-12-19 11:15 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 7+ messages in thread
From: Ryan Yeske @ 2007-12-19 10:40 UTC (permalink / raw)
  To: emacs-devel


I usually use M-x remember-region to record notes from text in my emacs
buffers.


2007-12-19  Ryan Yeske  <rcyeske@gmail.com>

	* 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.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: remember-region should be autoloaded
  2007-12-19 10:40 remember-region should be autoloaded Ryan Yeske
@ 2007-12-19 11:15 ` Lennart Borgman (gmail)
  2007-12-19 12:47   ` Leo
  2007-12-23 17:51   ` Juri Linkov
  0 siblings, 2 replies; 7+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-19 11:15 UTC (permalink / raw)
  To: Sacha Chua; +Cc: Ryan Yeske, emacs-devel

Ryan Yeske wrote:
> I usually use M-x remember-region to record notes from text in my emacs
> buffers.
> 
> 
> 2007-12-19  Ryan Yeske  <rcyeske@gmail.com>
> 
> 	* 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)))))

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: remember-region should be autoloaded
  2007-12-19 11:15 ` Lennart Borgman (gmail)
@ 2007-12-19 12:47   ` Leo
  2008-01-08  1:34     ` Michael Olson
  2007-12-23 17:51   ` Juri Linkov
  1 sibling, 1 reply; 7+ messages in thread
From: Leo @ 2007-12-19 12:47 UTC (permalink / raw)
  To: emacs-devel

On 2007-12-19 11:15 +0000, Lennart Borgman (gmail) wrote:
> 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:

This feature has been demanded for more than a year and there is even a
patch on its mailing list.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

          Use the best OS -- http://www.fedoraproject.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: remember-region should be autoloaded
  2007-12-19 11:15 ` Lennart Borgman (gmail)
  2007-12-19 12:47   ` Leo
@ 2007-12-23 17:51   ` Juri Linkov
  2007-12-23 18:04     ` Lennart Borgman (gmail)
  2007-12-24 13:31     ` Richard Stallman
  1 sibling, 2 replies; 7+ messages in thread
From: Juri Linkov @ 2007-12-23 17:51 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Sacha Chua, Ryan Yeske, emacs-devel

> 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)))))

This is nice, but what was the conclusion about adding a special function
to check the active region with just one function call?

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: remember-region should be autoloaded
  2007-12-23 17:51   ` Juri Linkov
@ 2007-12-23 18:04     ` Lennart Borgman (gmail)
  2007-12-24 13:31     ` Richard Stallman
  1 sibling, 0 replies; 7+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-23 18:04 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Sacha Chua, Ryan Yeske, emacs-devel

Juri Linkov wrote:
>> 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)))))
> 
> This is nice, but what was the conclusion about adding a special function
> to check the active region with just one function call?

I do not remember the name of that function.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: remember-region should be autoloaded
  2007-12-23 17:51   ` Juri Linkov
  2007-12-23 18:04     ` Lennart Borgman (gmail)
@ 2007-12-24 13:31     ` Richard Stallman
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2007-12-24 13:31 UTC (permalink / raw)
  To: Juri Linkov; +Cc: rcyeske, sacha, lennart.borgman, emacs-devel

    This is nice, but what was the conclusion about adding a special function
    to check the active region with just one function call?

I wrote that a few weeks ago but had not installed it.
I installed it just now.  It is called `region-active-p'
and it is in simple.el.

It would be good to change the commands that now check for an active region
to use `region-active-p'.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: remember-region should be autoloaded
  2007-12-19 12:47   ` Leo
@ 2008-01-08  1:34     ` Michael Olson
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Olson @ 2008-01-08  1:34 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 740 bytes --]

Leo <sdl.web@gmail.com> writes:

> On 2007-12-19 11:15 +0000, Lennart Borgman (gmail) wrote:
>> 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:
>
> This feature has been demanded for more than a year and there is even
> a patch on its mailing list.

I've now made the changes suggested in Lennart's email message.

-- 
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
          Programmer -- Hobbies: Lisp, HCoop          | |_] | \| |_|
Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-08  1:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-19 10:40 remember-region should be autoloaded Ryan Yeske
2007-12-19 11:15 ` Lennart Borgman (gmail)
2007-12-19 12:47   ` Leo
2008-01-08  1:34     ` Michael Olson
2007-12-23 17:51   ` Juri Linkov
2007-12-23 18:04     ` Lennart Borgman (gmail)
2007-12-24 13:31     ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.