bongo-devel
[Top][All Lists]
Advanced

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

[bongo-devel] Re: [bug #18725] Stray section header after track lines ar


From: Daniel Brockman
Subject: [bongo-devel] Re: [bug #18725] Stray section header after track lines are removed
Date: Fri, 06 Apr 2007 19:22:02 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

Daniel Jensen writes:

> Follow-up Comment #2, bug #18725 (project bongo):
>
> I implemented this in `bongo-kill-line'.

>From your patch:

(I wish Savannah would attach files in mails.)

> @@ -7610,7 +7611,8 @@
>    (interactive)
>    (save-excursion
>      (bongo-goto-point point)
> -    (let ((inhibit-read-only t))
> +    (let ((inhibit-read-only t)
> +          (before-kill (point)))
>        (cond ((bongo-track-line-p)
>               (when (bongo-line-marker)
>                 (move-marker (bongo-line-marker) nil))

Why are you saving that position?  Is there a situation in
which it would not work to just assume that point will be in
the right place after the killing?

> @@ -7634,7 +7636,14 @@
>                 (let ((line-move-ignore-invisible nil))
>                   (kill-region (point) (bongo-point-after-object)))))
>              (t
> -             (kill-line))))))
> +             (kill-line)))
> +      ;; remove empty sections before the killed region

(Here's where I think point will already be in the right place.)

> +      (goto-char before-kill)
> +      (while (progn
> +               (forward-line -1)

We should use `bongo-previous-object-line' here, so as not
to assume that nothing will appear between object lines.

> The patch also includes a fix in `bongo-empty-section-p'
> which I believe fixes a bug in that function.

Thanks, I installed this.

-- 
Daniel Brockman <address@hidden>




reply via email to

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