searching in gannotate

Bug #73965 reported by Wouter van Heyst
2
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Fix Released
Low
Vincent Ladeuil

Bug Description

It would be nice if the navigation in gannotate was a bit more powerful, most importantly for me, being able to search in the text.

Right now I have to check elsewhere what linenumber I need, and then scroll down till I'm there.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 73965] searching in gannotate

  status confirmed

Makes sense. How about showing line numbers and adding a "Go To Line"
button (Ctrl-G seems to be the shortcut most often used for this).

Changed in bzr-gtk:
status: Unconfirmed → Confirmed
Revision history for this message
Wouter van Heyst (larstiq) wrote :

On Thu, Nov 30, 2006 at 07:31:19PM -0000, Jelmer Vernooij wrote:
> status confirmed
>
> Makes sense. How about showing line numbers and adding a "Go To Line"
> button (Ctrl-G seems to be the shortcut most often used for this).

That is probably easier, and will help a bit, but still requires looking
up the line number somewhere else. So full search support is still on my
wishlist :)

Wouter van Heyst

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Thu, 2006-11-30 at 19:49 +0000, Wouter van Heyst wrote:
> On Thu, Nov 30, 2006 at 07:31:19PM -0000, Jelmer Vernooij wrote:
> > status confirmed
> >
> > Makes sense. How about showing line numbers and adding a "Go To Line"
> > button (Ctrl-G seems to be the shortcut most often used for this).
> That is probably easier, and will help a bit, but still requires looking
> up the line number somewhere else. So full search support is still on my
> wishlist :)
Oh, of course. Sorry, I had misread your original bugreport :-)

--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/

Revision history for this message
Vincent Ladeuil (vila) wrote :

Searching line numers is already available (but not obvious):
- type Ctrl-F
- type desired line number
- enjoy

The mechanism used is the standard gtk one, appears to be there from day one, and thus, should have been unnoticed :-)

Typing Ctrl-G will show you the next matching line number, err wait, only for *small* line numbers will it matches again (Ctrl-F 10, Ctrl-G matches 101 :)

Of course that does not fix the bug...

So what about the associated patch instead ?

It makes the above shortcuts works on the text instead of the line number.

Ok, ok, that may not be the best solution, but I have some little things to be forgiven for by Larstiq :-)

I'm open to all ideas for more serious solutions.

Changed in bzr-gtk:
assignee: nobody → v-ladeuil
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 73965] Re: searching in gannotate

On Fri, 2006-12-01 at 13:06 +0000, vila wrote:
> Searching line numers is already available (but not obvious):
> - type Ctrl-F
> - type desired line number
> - enjoy
I think this should be Ctrl+G. Ctrl+F should be reserved for searching
strings (for consistency reasons).

> The mechanism used is the standard gtk one, appears to be there from day
> one, and thus, should have been unnoticed :-)
(-:

I'll have a look at your patch in the next few days.

Cheers,

Jelmer

--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/

Revision history for this message
Wouter van Heyst (larstiq) wrote :

On Fri, Dec 01, 2006 at 01:06:40PM -0000, vila wrote:
> Searching line numers is already available (but not obvious):
> - type Ctrl-F
> - type desired line number
> - enjoy
>
> The mechanism used is the standard gtk one, appears to be there from day
> one, and thus, should have been unnoticed :-)
>
> Typing Ctrl-G will show you the next matching line number, err wait,
> only for *small* line numbers will it matches again (Ctrl-F 10, Ctrl-G
> matches 101 :)

Ugh, indeed. Shows how much I'm totally not into gtk bindings.

> Of course that does not fix the bug...
>
> So what about the associated patch instead ?
>
> It makes the above shortcuts works on the text instead of the line
> number.

That works for me, now to vimify it more ;)

> Ok, ok, that may not be the best solution, but I have some little things
> to be forgiven for by LarstiQ :-)

thanks, I appreciate it, although not necessary :)

> I'm open to all ideas for more serious solutions.

Whatever happens, it needs to be more discoverable than it was, whomever
thinks of Ctrl-F!? Sheesh!

Wouter van Heyst

Revision history for this message
Vincent Ladeuil (vila) wrote :

Any directions prefered for a more serious solution or should I just go with:
- Ctrl-G for search line
- Ctrl-F for search text
- both opening a button-box a-la-firefox (bottom of the screen) containing a close button, a text entry for line or text, next/previous buttons, regexp checkbutton (text only)

More ideas ? Different ones ?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Yeah, that sounds like the most useful and most logical bindings to me. +1 (-:

Revision history for this message
Wouter van Heyst (larstiq) wrote :

On Wed, Dec 13, 2006 at 06:05:08PM -0000, vila wrote:
> Any directions prefered for a more serious solution or should I just go with:
> - Ctrl-G for search line
> - Ctrl-F for search text
> - both opening a button-box a-la-firefox (bottom of the screen) containing a close button, a text entry for line or text, next/previous buttons, regexp checkbutton (text only)
>
> More ideas ? Different ones ?

At the moment, the search autostarts when I begin to type, I can
probably learn that, but my fingers seem to keep inserting a leading /.

Having full vi motions would rock ;)

More seriously, what about a way to get at the old behaviour of jumping
to linenumbers?

Wouter van Heyst

Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
importance: Undecided → Low
Revision history for this message
Vincent Ladeuil (vila) wrote :

>>>>> "larstiq" == Wouter van Heyst <email address hidden> writes:

    larstiq> On Wed, Dec 13, 2006 at 06:05:08PM -0000, vila wrote:
    >> Any directions prefered for a more serious solution or should I just go with:
    >> - Ctrl-G for search line
    >> - Ctrl-F for search text

    >> - both opening a button-box a-la-firefox (bottom of the
    >> screen) containing a close button, a text entry for line
    >> or text, next/previous buttons, regexp checkbutton (text
    >> only)
    >>
    >> More ideas ? Different ones ?

    larstiq> At the moment, the search autostarts when I begin to
    larstiq> type, I can probably learn that, but my fingers seem
    larstiq> to keep inserting a leading /.

    larstiq> Having full vi motions would rock ;)

If you tell me more about them*, I can have a look at the
simplest way to make them available to you (as in: a simple
change in .gtkrc (a mapping for vi may already exists, I know
there is one for emacs even if I don't use it) for a clean
solution or a specific patch once the whole thing is
implemented).

    larstiq> More seriously, what about a way to get at the old
    larstiq> behaviour of jumping to linenumbers?

My proposition will enable the following work-flow:

- C-g: open the search button-bar and give focus to text entry,
- type 100
- type return or click next
- displays the line 100

I.e. I'm not sure I can keep the incremental search active
without coding it explicitly.

Voice your preferences ;)

        Vincent

*: I'm an emacs user.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Here you are:

- C-f : search for text,
- C-g: search for line.

For text, handles 'Match case' and 'Regexp' check boxes.

Search is circular and begins with line *following* the currently selected one.

This seems to be the more natural considering that we have no cursor inside the line.

Searching in a true text buffer is generally handled by having a cursor at "point" so you can find multiple occurrences in the same line.

As we use a ListStore here, it looked easier to slightly adapt the concept.

Changed in bzr-gtk:
status: Confirmed → In Progress
Revision history for this message
Vincent Ladeuil (vila) wrote :

<cough> This is the correct one.

Revision history for this message
Vincent Ladeuil (vila) wrote :

With a +1 from Aaron

Changed in bzr-gtk:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.