bongo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bongo-devel] Re: Marks


From: Daniel Jensen
Subject: [bongo-devel] Re: Marks
Date: Fri, 04 May 2007 13:36:07 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.99 (gnu/linux)

Daniel Brockman <address@hidden> writes:

> address@hidden (Daniel Jensen) writes:
>
>> In `bongo-universal-prefix/region/marking-object-command', like so:
>>
>>              (let ((marking bongo-marking)
>>                    (beg (region-beginning))
>>                    (end (region-end)))
>
> I saw no reason to save `(region-beginning)', so I just
> saved the end.

Yes, that's right.

I spotted another problem with the region. The executed command can
insert or delete text, but the end position does not move with the
change. So we have to use a marker here.

diff -Naur bongo-old/bongo.el bongo-new/bongo.el
--- bongo-old/bongo.el  2007-05-04 13:18:13.000000000 +0200
+++ bongo-new/bongo.el  2007-05-04 13:20:51.000000000 +0200
@@ -3829,7 +3829,7 @@
             ((bongo-region-active-p)
              (deactivate-mark)
              (let ((marking bongo-marking)
-                   (end (region-end)))
+                   (end (move-marker (make-marker) (region-end))))
                (when marking
                  ;; XXX: This discards the killed marking
                  ;;      as an unfortunate side-effect.
@@ -3839,6 +3839,7 @@
                            (< (point) end))
                  (command-execute command)
                  (goto-char (bongo-point-after-object)))
+               (move-marker end nil)
                (when marking
                  (bongo-yank-marking))))
             (bongo-marking
@@ -3908,7 +3909,7 @@
             ((bongo-region-active-p)
              (deactivate-mark)
              (let ((marking bongo-marking)
-                   (end (region-end)))
+                   (end (move-marker (make-marker) (region-end))))
                (when marking
                  ;; XXX: This discards the killed marking
                  ;;      as an unfortunate side-effect.
@@ -3920,6 +3921,7 @@
                            (< (point) end))
                  (command-execute command)
                  (forward-line 1))
+               (move-marker end nil)
                (when marking
                  (bongo-yank-marking))))
             (bongo-marking
There is a related problem with the prefix argument version. For
example, `3 M-& k' would kill tracks 1, 3 and 5, certainly not the
intended result. How should we address this?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]