[Top][All Lists]

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

Re: [bongo-devel] Re: Marks

From: Daniel Brockman
Subject: Re: [bongo-devel] Re: Marks
Date: Tue, 13 Feb 2007 04:10:19 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux)

address@hidden (Daniel Jensen) writes:

> Okay, so I guess what all this comes down to is that
> a) we should leave the marks after commands (customizable),

Why?  I think in the most common use case, you will mark
some tracks, run some command on them, and then no longer
care about the marking.  That suggests that the default
behavior should be to have commands "use up" the marking.

> b) and the stack is probably overkill. (Who uses it in Gnus anyway?)

Probably.  (We can add it later if it is, in fact, needed.)

One thing I like about `* *' is that, being a toggle command,
it is very forgiving:  You don't have to worry so much about
running it, because it can always invert its own effect later.

> c) Unmarking all saves the marks, or we can have a separate command.
> d) We use the `* *' command because it's handy.

Having an unmark all command separate from `* *' would
be redundant, I think.

We could put it on `U' as well as `* *', but to tell you the
truth I would still rather put `bongo-unmark-backward' on `U'.

If we make commands do their own unmarking, you will no
longer have to do it yourself very often --- right?

Besides, doesn't it annoy you that you have to reach for the
backspace key to unmark backwards? :-)

> Did I get it right?
> And I don't think I mind "marking" for a set of marks.
> Where have you seen it used like this?

Nowhere, I guess.  I made it up.  But it's a useful term.

(Webster defines `marking' as "the mark or marks made;
arrangement or disposition of marks",

   Marking \Mark"ing\, n.
      The act of one who, or that which, marks; the mark or marks
      made; arrangement or disposition of marks or coloring; as,
      the marking of a bird's plumage.

and WordNet defines it as "a pattern of marks".)

       n 1: a distinguishing symbol; "the owner's mark was on all
            the sheep" [syn: marker, mark]
       2: a pattern of marks
       3: evaluation of performance by assigning a grade or score;
          "what he disliked about teaching was all the grading he
          had to do" [syn: grading, scoring]
       4: the act of making a visible mark on a surface
> Daniel Brockman <address@hidden> writes:
>> However, I couldn't see any performance improvement when
>> using this function, which avoids the repeated linear search.
>> (defun bongo-invert-marks ()
>>   "Mark unmarked tracks, and unmark marked tracks in the buffer."
>>   (interactive)
>>   (setq bongo-marked-track-line-markers nil)
>>   (save-excursion
>>     (goto-char (point-min))
>>     (while (not (eobp))
>>       (cond ((bongo-marked-track-line-p)
>>              (let ((bongo-marked-track-line-markers nil))
>>                (bongo-unmark-line)))
>>             ((bongo-track-line-p)
>>              (bongo-mark-line)))
>>       (forward-line 1))))
>> Maybe I'm confused?
> Wow, I tested running this function 100 times in a small
> library buffer, and it took a minute.  But removing
> redisplay from unmark and mark commands, it took only
> three seconds.
> I'm profiling the code, and I see bottlenecks in
> `bongo-line-internal-infoset' and `bongo-line-get-property'.
> The latter is called a lot of times all over the place.
> We could use a little optimization here.


Daniel Brockman <address@hidden>

reply via email to

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