all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: emacs-devel@gnu.org
Subject: Re: isearch for doc-view.el
Date: Mon, 05 Nov 2007 22:51:18 +0100	[thread overview]
Message-ID: <877ikw4azt.fsf@baldur.tsdh.de> (raw)
In-Reply-To: <jwv4pg0iea7.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 05 Nov 2007 16:20:41 -0500")

[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> After spending quite some time to make isearch working I have given
>> up.  It seems to be rather complicated, so I only changed the current
>> search facility to use an isearch-like UI.  Now you hit C-s and enter
>> the regexp and each additional C-s or C-r jumps to the next/previous
>> match.  To enter a new regexp, you have to provide a prefix arg to
>> C-s or C-r.
>
> The patch you sent earlier seemed to work (more or less), so please
> add a big comment in the code describing as much as you can of your
> experience: what you did and what were the problems you encountered.

I attach the latest version of doc-view.el using the isearch approach.
The problem was that the function doing the search
(doc-view-search-forward) was called in a loop when entering something
at the isearch-prompt, e.g. I enter "p" at the prompt and then
isearch-search-string calls the function in isearch-search-fun-function
(doc-view-isearch-function) which calls doc-view-search-forward
endlessly.  I don't know why, but I don't know how isearch works
exactly.

But even if we'd get that working no real isearch feeling comes up due
to the missing match highlighting.  Currently I display all lines
containing a match in a tooltip and each C-s or C-r jumps directly to
the next/previous page with a match.  With isearch we could only display
the current match.  So we had to decide if another C-s jumps to the next
page with a match (thus only the first match in a page will be displayed
in a tooltip) or to the next match, which would do nothing visible
(except the tooltip) if the next match is on the same page.

And it's much slower than the current search facility, because isearch
really searches for each step forward or backward wheras the current
approach searches once and then it knows to which pages to jump.


[-- Attachment #2: doc-view.el --]
[-- Type: application/emacs-lisp, Size: 32896 bytes --]

[-- Attachment #3: Type: text/plain, Size: 699 bytes --]


>> Then I tried fixing the auto-compression-mode bug Reiner poined out
>> in <v9640nx9n9.fsf@marauder.physik.uni-ulm.de>.  Because I could not
>> find an elegant solution to work with compressed files transparently
>> I took a trivial approach: doc-view-mode now offers to save the
>> uncompressed file somewhere and then this file is viewed.
>
> A possibly related problem is when the buffer's content is not in-sync
> with the file's: doc-view "should" then show the rendition of the
> buffer's content rather than the file's.

I don't get you.  When you edit the document in an editing mode and hit
`C-c C-c' you'll be queried to save the changes before the conversion is
started.

Bye,
Tassilo

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2007-11-05 21:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30 18:50 doc-view cache file permissions Glenn Morris
2007-10-30 20:11 ` Stefan Monnier
2007-10-30 20:57   ` Glenn Morris
2007-10-30 21:56     ` Stefan Monnier
2007-10-31  7:22       ` Tassilo Horn
2007-10-31  7:56         ` Tassilo Horn
2007-10-31 15:10           ` Stefan Monnier
2007-10-31 17:46             ` Tassilo Horn
2007-10-31 18:21               ` Stefan Monnier
2007-10-31 19:44                 ` Tassilo Horn
2007-10-31 20:41                   ` Stefan Monnier
2007-11-02 20:44                   ` Juri Linkov
2007-11-02 23:53                     ` Tassilo Horn
2007-11-03 14:07                       ` Stefan Monnier
2007-11-03 19:20                         ` Tassilo Horn
2007-11-05 12:01                         ` isearch for doc-view.el (was: doc-view cache file permissions) Tassilo Horn
2007-11-05 12:43                           ` isearch for doc-view.el David Kastrup
2007-11-05 13:19                             ` Tassilo Horn
2007-11-05 15:14                           ` Stefan Monnier
2007-11-05 16:42                             ` CEDET/senator kill the buffer-local value of isearch-search-fun-function (was: isearch for doc-view.el) Tassilo Horn
2007-11-05 21:01                             ` isearch for doc-view.el Tassilo Horn
2007-11-05 21:20                               ` Stefan Monnier
2007-11-05 21:51                                 ` Tassilo Horn [this message]
2007-11-06  0:44                                   ` Juri Linkov
2007-11-06  8:25                                     ` Tassilo Horn
2007-11-06 22:29                                       ` Juri Linkov
2007-11-07  8:41                                         ` Tassilo Horn
2007-11-10 21:57                                           ` Juri Linkov
2007-11-06  8:34                               ` Tassilo Horn
2007-10-30 22:14     ` doc-view cache file permissions Reiner Steib
2007-10-31  0:52       ` Stefan Monnier
2007-10-30 20:34 ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ikw4azt.fsf@baldur.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.