emacs-diffs
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r104500: lisp/textmodes/bibtex.el


From: Roland Winkler
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r104500: lisp/textmodes/bibtex.el: new command bibtex-search-entries
Date: Tue, 7 Jun 2011 14:45:41 -0500

On Tue Jun 7 2011 Stefan Monnier wrote:
> > - I would never know whether I need to search forward or backward,
> >   unless point is at the beginning (or end) of the buffer, which is
> >   rarely the case for me.
> 
> Good point.  I have a hack to turn "C-s <number>" into a search for the
> line number <number>, and I always use it instead of goto-line, but
> I often end up having to type C-s one more time to force wrapping the
> search to the beginning of the buffer.
> 
> > - I don't know which BibTeX file contains the entry I am looking
> >   for. At somepoint in time it might have been natural that I put it
> >   in one file. But later this might have shifted due to whatever
> >   reason. For me, that's when I need the new command
> >   bibtex-search-entries.
> 
> This can be addressed with `multi-isearch-next-buffer-function', whereby
> rather than wrap to the beginning of the file the search can continue to
> some other file.  ChangeLog file supports that, for example, and it
> could make sense to add that to BibTeX.
> 
> I'm not completely satisfied with the UI of this feature, so I set
> multi-isearch-search to nil in ChangeLog files, but I think it'd be good
> to support the feature in BibTeX (and to improve the UI).

The whole concept of isearch (the way I see it when using it) is
based on the idea that a file (or buffer) has a certain linear
structure such that it is more likely to find the result one is
looking for when following this linear structure by searching
forward or backward. On the other hand, a search in BibTeX files
appears to me more like a search in a hash table, where the elements
come in no particular order. In that sense, I guess I'd always
prefer the approach implemented in bibtex-search-entries that gives
me a dedicated buffer for the search results, where I can look at
them without getting distracted by the other entries nearby, which
are usually completely irrelevant. (Unlike in the case of regular
text, the concept of "context" has certainly little relevance for
BibTeX buffers: neighboring entries have usually little or nothing
to do with each other.)

So the more I think about this, the more it appears to me that such
an isearch feature might not be too useful for BibTeX buffers.

But maybe I am overlooking something. What would be a more visible
place for such a discussion where others might want to participate,
too?

A rather different thing just came to my mind: it could be more
useful if bibtex-search-entries could provide more flexible means to
sort the results. Currently, the entries collected from multiple
files are ordered alphabetically by keys. Publication year in
ascending or descending order could be useful, too.

Roland



reply via email to

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