all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* about remember.el
@ 2007-10-31 21:15 Dan Nicolaescu
  2007-10-31 22:09 ` Leo
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Dan Nicolaescu @ 2007-10-31 21:15 UTC (permalink / raw)
  To: emacs-devel



remember.el is a nice and useful package, but does it need so many
autoloaded functions?

remember-destroy surely does not need to be autoloaded.

Is remember-region really necessary? 
Wouldn't it be better if `remeber' would just do what `remeber-region'
does if the region is active? Many commands have been changed lately
to do something different when the region is active, this looks like a
good application of the same principle.

`remember-buffer' also seems that is not needed, 
C-x h M-x remeber-region RET
should do the same thing. 

remember-mode-map could be defined and initialized in one step. 

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

* Re: about remember.el
  2007-10-31 21:15 about remember.el Dan Nicolaescu
@ 2007-10-31 22:09 ` Leo
  2007-11-01  4:47 ` Michael Olson
  2007-11-01 20:25 ` Bastien
  2 siblings, 0 replies; 12+ messages in thread
From: Leo @ 2007-10-31 22:09 UTC (permalink / raw)
  To: emacs-devel

On 2007-10-31 21:15 +0000, Dan Nicolaescu wrote:
> remember.el is a nice and useful package, but does it need so many
> autoloaded functions?
>
> remember-destroy surely does not need to be autoloaded.
>
> Is remember-region really necessary? 
> Wouldn't it be better if `remeber' would just do what `remeber-region'
> does if the region is active? Many commands have been changed lately
> to do something different when the region is active, this looks like a
> good application of the same principle.

Agreed.

>
> `remember-buffer' also seems that is not needed,
> C-x h M-x remeber-region RET
> should do the same thing. 
>
> remember-mode-map could be defined and initialized in one step. 

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

       Use the most powerful email client -- http://gnus.org/

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

* Re: about remember.el
  2007-10-31 21:15 about remember.el Dan Nicolaescu
  2007-10-31 22:09 ` Leo
@ 2007-11-01  4:47 ` Michael Olson
  2007-11-01 20:25 ` Bastien
  2 siblings, 0 replies; 12+ messages in thread
From: Michael Olson @ 2007-11-01  4:47 UTC (permalink / raw)
  To: emacs-devel


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

Dan Nicolaescu <dann@ics.uci.edu> writes:

> remember-destroy surely does not need to be autoloaded.

Fixed, along with a few other unneeded autoloads.

> Is remember-region really necessary?
> Wouldn't it be better if `remeber' would just do what `remeber-region'
> does if the region is active? Many commands have been changed lately
> to do something different when the region is active, this looks like a
> good application of the same principle.
>
> `remember-buffer' also seems that is not needed,
> C-x h M-x remeber-region RET
> should do the same thing.

No, remember-buffer does have a useful purpose.  It is called by C-c C-c
in the *Remember* buffer when you want to "finalize" the note that
you've just made.  I've renamed it to `remember-finalize' to make that
distinction clearer.

remember-region is also necessary.  It is called by remember-finalize to
do the actual saving.  If point and mark are set, it will only save the
region between the point and mark; in contrast, remember-finalize will
force the entire buffer to be saved regardless of point and mark.  I'm
not entirely convinced that the point and mark stuff is useful behavior,
but perhaps some other mode depends on that.

> remember-mode-map could be defined and initialized in one step.

Fixed.

-- 
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
            Sysadmin -- Hobbies: Lisp, GP2X, 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] 12+ messages in thread

* Re: about remember.el
  2007-10-31 21:15 about remember.el Dan Nicolaescu
  2007-10-31 22:09 ` Leo
  2007-11-01  4:47 ` Michael Olson
@ 2007-11-01 20:25 ` Bastien
  2007-11-01 23:12   ` Leo
  2007-11-02 10:58   ` Michael Olson
  2 siblings, 2 replies; 12+ messages in thread
From: Bastien @ 2007-11-01 20:25 UTC (permalink / raw)
  To: emacs-devel; +Cc: Leo, Carsten Dominik

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

Dan Nicolaescu <dann@ics.uci.edu> writes:

> `remember-buffer' also seems that is not needed, 
> C-x h M-x remeber-region RET
> should do the same thing. 

So remember.el is now in Emacs CVS.  Great!

The function `remember-buffer' has been renamed to `remember-finalize'.
We need to update org.el accordingly.  This patch against org.el in CVS
does the job:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el.patch --]
[-- Type: text/x-diff, Size: 1445 bytes --]

diff -u /home/guerry/install/cvs/emacs/lisp/textmodes/org.el /home/guerry/elisp/testing/emacs/org.el
--- /home/guerry/install/cvs/emacs/lisp/textmodes/org.el	2007-10-26 11:33:11.000000000 +0100
+++ /home/guerry/elisp/testing/emacs/org.el	2007-11-01 20:15:55.000000000 +0000
@@ -12815,7 +12815,7 @@
 		 (replace-match x t t))))
 	;; Turn on org-mode in the remember buffer, set local variables
 	(org-mode)
-	(org-set-local 'org-finish-function 'remember-buffer)
+	(org-set-local 'org-finish-function 'remember-finalize)
 	(if (and file (string-match "\\S-" file) (not (file-directory-p file)))
 	    (org-set-local 'org-default-notes-file file))
 	(if (and headline (stringp headline) (string-match "\\S-" headline))
@@ -12859,7 +12859,7 @@
 	    (replace-match "")
 	  (and (re-search-forward "^[^#\n]" nil t) (backward-char 1))))
     (org-mode)
-    (org-set-local 'org-finish-function 'remember-buffer)))
+    (org-set-local 'org-finish-function 'remember-finalize)))
 
 ;;;###autoload
 (defun org-remember (&optional org-force-remember-template-char)
@@ -12867,7 +12867,7 @@
 If there is an active region, make sure remember uses it as initial content
 of the remember buffer."
   (interactive)
-  (if (eq org-finish-function 'remember-buffer)
+  (if (eq org-finish-function 'remember-finalize)
       (progn
 	(when (< (length org-remember-templates) 2)
 	  (error "No other template available"))

Diff finished.  Thu Nov  1 20:16:01 2007

[-- Attachment #3: Type: text/plain, Size: 182 bytes --]


BTW, it is surely better not to autoload this function, but we also need
to check the documentation and usual configuration of remember's friends
like Org and Planner.

-- 
Bastien

[-- Attachment #4: 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] 12+ messages in thread

* Re: about remember.el
  2007-11-01 20:25 ` Bastien
@ 2007-11-01 23:12   ` Leo
  2007-11-02 10:58   ` Michael Olson
  1 sibling, 0 replies; 12+ messages in thread
From: Leo @ 2007-11-01 23:12 UTC (permalink / raw)
  To: emacs-devel

On 2007-11-01 20:25 +0000, Bastien wrote:
>> `remember-buffer' also seems that is not needed, 
>> C-x h M-x remeber-region RET
>> should do the same thing. 
>
> So remember.el is now in Emacs CVS.  Great!
>
> The function `remember-buffer' has been renamed to `remember-finalize'.
> We need to update org.el accordingly.  This patch against org.el in CVS
> does the job:

Many thanks for fixing the bug.

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

       Use the most powerful email client -- http://gnus.org/

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

* Re: about remember.el
  2007-11-01 20:25 ` Bastien
  2007-11-01 23:12   ` Leo
@ 2007-11-02 10:58   ` Michael Olson
  2007-11-02 14:34     ` Bastien
  2007-11-02 21:32     ` Stefan Monnier
  1 sibling, 2 replies; 12+ messages in thread
From: Michael Olson @ 2007-11-02 10:58 UTC (permalink / raw)
  To: emacs-devel


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

Bastien <bzg@altern.org> writes:

> Dan Nicolaescu <dann@ics.uci.edu> writes:
>
>> `remember-buffer' also seems that is not needed, 
>> C-x h M-x remeber-region RET
>> should do the same thing. 
>
> So remember.el is now in Emacs CVS.  Great!
>
> The function `remember-buffer' has been renamed to
> `remember-finalize'.  We need to update org.el accordingly.  This
> patch against org.el in CVS does the job:

I've also added (yesterday) a defalias to remember.el that takes care of
this.

-- 
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
            Sysadmin -- Hobbies: Lisp, GP2X, 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] 12+ messages in thread

* Re: about remember.el
  2007-11-02 14:34     ` Bastien
@ 2007-11-02 14:16       ` Michael Olson
  2007-11-03 22:01         ` Carsten Dominik
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Olson @ 2007-11-02 14:16 UTC (permalink / raw)
  To: Bastien; +Cc: Carsten Dominik, Leo, emacs-devel


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

Bastien <bzg@altern.org> writes:

> Maybe we can get rid of this alias when both org.el in Emacs CVS and
> Carsten's latest Org distribution use `remember-finalize' instead of
> `remember-buffer'?
>
> I cannot think of someone using remember.el from Emacs CVS and using
> another Org version than one of the two mentionned above.

I suppose I could get rid of the alias once org.el gets updated.

-- 
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
            Sysadmin -- Hobbies: Lisp, GP2X, 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] 12+ messages in thread

* Re: about remember.el
  2007-11-02 10:58   ` Michael Olson
@ 2007-11-02 14:34     ` Bastien
  2007-11-02 14:16       ` Michael Olson
  2007-11-02 21:32     ` Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Bastien @ 2007-11-02 14:34 UTC (permalink / raw)
  To: emacs-devel; +Cc: Michael Olson, Leo, Carsten Dominik

Michael Olson <mwolson@gnu.org> writes:

>> The function `remember-buffer' has been renamed to
>> `remember-finalize'.  We need to update org.el accordingly.  This
>> patch against org.el in CVS does the job:
>
> I've also added (yesterday) a defalias to remember.el that takes care
> of this.

Thanks for this.

Maybe we can get rid of this alias when both org.el in Emacs CVS and
Carsten's latest Org distribution use `remember-finalize' instead of
`remember-buffer'?

I cannot think of someone using remember.el from Emacs CVS and using
another Org version than one of the two mentionned above.

-- 
Bastien

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

* Re: about remember.el
  2007-11-02 10:58   ` Michael Olson
  2007-11-02 14:34     ` Bastien
@ 2007-11-02 21:32     ` Stefan Monnier
  2007-11-03 20:47       ` Michael Olson
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2007-11-02 21:32 UTC (permalink / raw)
  To: Michael Olson; +Cc: emacs-devel

> I've also added (yesterday) a defalias to remember.el that takes care of
> this.

Please add those as define-obsolete-function-alias rather than defalias.


        Stefan

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

* Re: about remember.el
  2007-11-02 21:32     ` Stefan Monnier
@ 2007-11-03 20:47       ` Michael Olson
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Olson @ 2007-11-03 20:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel


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

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I've also added (yesterday) a defalias to remember.el that takes care
>> of this.
>
> Please add those as define-obsolete-function-alias rather than
> defalias.

Fixed, thanks.

-- 
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
            Sysadmin -- Hobbies: Lisp, GP2X, 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] 12+ messages in thread

* Re: about remember.el
  2007-11-02 14:16       ` Michael Olson
@ 2007-11-03 22:01         ` Carsten Dominik
  2007-11-03 22:52           ` Michael Olson
  0 siblings, 1 reply; 12+ messages in thread
From: Carsten Dominik @ 2007-11-03 22:01 UTC (permalink / raw)
  To: Michael Olson; +Cc: Bastien, Leo, emacs-devel

Hi Michael,

thanks for putting in the alias.  I will fix org-mode,l but I suggest  
to keep the alias for a while.
Does not hurt, shows that the new name is preferred, but keeps old  
customers happy.

- Carsten

On  2Nov2007, at 3:16 PM, Michael Olson wrote:

> Bastien <bzg@altern.org> writes:
>
>> Maybe we can get rid of this alias when both org.el in Emacs CVS and
>> Carsten's latest Org distribution use `remember-finalize' instead of
>> `remember-buffer'?
>>
>> I cannot think of someone using remember.el from Emacs CVS and using
>> another Org version than one of the two mentionned above.
>
> I suppose I could get rid of the alias once org.el gets updated.
>
> -- 
>        Michael Olson -- FSF Associate Member #652     |
>  http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
>             Sysadmin -- Hobbies: Lisp, GP2X, HCoop    | |_] | \| |_|
> Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |

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

* Re: about remember.el
  2007-11-03 22:01         ` Carsten Dominik
@ 2007-11-03 22:52           ` Michael Olson
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Olson @ 2007-11-03 22:52 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Bastien, Leo, emacs-devel


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

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi Michael,
>
> thanks for putting in the alias.  I will fix org-mode,l but I suggest
> to keep the alias for a while.
> Does not hurt, shows that the new name is preferred, but keeps old
> customers happy.

Agreed; it's not going to hurt to keep it in, at least until perhaps
Emacs 24.

-- 
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
            Sysadmin -- Hobbies: Lisp, GP2X, 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] 12+ messages in thread

end of thread, other threads:[~2007-11-03 22:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 21:15 about remember.el Dan Nicolaescu
2007-10-31 22:09 ` Leo
2007-11-01  4:47 ` Michael Olson
2007-11-01 20:25 ` Bastien
2007-11-01 23:12   ` Leo
2007-11-02 10:58   ` Michael Olson
2007-11-02 14:34     ` Bastien
2007-11-02 14:16       ` Michael Olson
2007-11-03 22:01         ` Carsten Dominik
2007-11-03 22:52           ` Michael Olson
2007-11-02 21:32     ` Stefan Monnier
2007-11-03 20:47       ` Michael Olson

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.