emacs-devel
[Top][All Lists]
Advanced

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

Re: Word search


From: Vincent Belaïche
Subject: Re: Word search
Date: Sun, 30 Mar 2008 08:13:15 +0200
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

Dear Drew,

Thank you for your patience with me, and sorry for the disturbance. Finally I created another email address on Google, because the one on hotmail was too difficult to use in plain text. Please tell me clearly if you wish me to file a bug and stop any disturbance on this developers only list as you seemed to suggest in your previous email.

I am writing again to you as I made some more investigation on my word search problem, and I have more news about it. Hereinafter I tried only non-interactive word search with the sequence "C-s<RET>C-w SEARCHED FOR WORD SEQUENCE <RET>".

1) It *DOES NOT FULLY* work in *info* node "Word Search", which is better than *FULLY DOES NOT WORK* : 1.1) In the case of an existing word sequence, it will not find it. If for instance I search for the word sequence "the words" it will not find it, whereas this word sequence is at end of 1st line of text. The search will exit with the message in the minibuffer "[(wrong-type-argument integer-or-marker-p t)]" tailing the current content of minibuffer. 1.2) however, in the case of a non existing word sequence, it will correctly exit indicating that the sequence does not exists. For instance if in the same node I search for the word sequence "Drew Adams", it will cleanly exit with the following content of the minibuffer "Failing word search: Drew Adams [initial mode]"

2) however it FULLY works in the *scratch* buffer : it does not find anything if the sequence does not exist in the buffer, and it finds something if the sequence does exists. If for instance I search for "evaluation If" it will correctly point at the end of first word in second line

3) When in the *info* node "Word Search" messages appear between square bracket at the end of the search buffer, which is not the same behaviour as in other modes (such message do not occur there, maybe some traces intended for debug only have been forgotten to disable).

4) The failure does not depend of which *info* node is considered (I made the same type of test in the Top node, as the point value fits into 16 bits there).

5) Still in the *info* node "Word Search", I switched the buffer to text mode by the sequence "M-x text-mode", then I tried to make the same word search (searching for "the words") and it worked !

6) I opened some LaTeX files of mine, and tested word search there, and it also works in LaTeX-mode.

7) Then, I simply tried "M-x word-search-forward" in the *info* node "Word search" that was again in info mode (not text mode) to make the word search, I entered the word sequence "the words", and it worked ! So this is very strange, word search does not work in info mode when it is invoked though the "C-s<RET>C-w" key sequence, but it does work if it is invoked directly by "M-x word-search-forward"


Sorry for the long mail, I am just hoping that this information is useful to Emacs developpers,
           Vincent.

PS-1: FYI, when I sent my 1st email, I thought that word search was not working at all in my environment because when I learn things from *info* I try them as I am reading the documentation. So even if word search is not that useful in *info* as such, it is useful in the sense that people trying the command as they read the document may be puzzled by not achieving it working, and then may not use the command at all as this was my case for years ! So I am spamming again this email list only for the benefit of the community : I personally don't need to make word searches in *info*, I need that only in LaTeX, and it works there.

PS-2: You wrote :

I believe that is normal; the text is copied from the source buffer to the
isearch edit area. You then must hit RET to accept the edited text as your
search string. Then hit C-s to search for that text.


Sorry to have believed that an arrow key could be used to terminate the sequence of words to be searched for. Actually I was trying ARROW RIGHT because in the mail you sent before you had written :

To terminate the search, you can just use RET or an arrow
key or another non-isearch key (except C-g).


I now am realizing that there was a misunderstanding, because I meant to terminate the word sequence to be searched for so that search is executed as it is in the sate when the search sequence is entered by user, and you understood that I was trying to terminate the incremental search processes whereas it is in the state when the search is waiting for some more command (e.g. to search next occurrence).

This made me realize that the documentation on incremental word search is not that clear, I may contribute later on on this. But I think that some other problems concerning the way as the incremental word search is invoked and accessed have to be solved first.


Drew Adams a écrit :
Again, please use plain-text mail, not HTML mail.

        From: Vincent Belaïche Sent: Wednesday, March 26, 2008 1:48 PM
I am realizing that there was no mistake in the mail before the latest one I sent, but that the mailing system has stripped off a part of it. What I meant was "C-sxxxC-w" where instread of "xxx" I had written "RET"

        between less-than and greater-than signs. But it seems that this xxx has

        been stripped off by the mailing system.
Similarly I meant that I terminated the interactive search by "C-s" or by "xxx" where xxx has the same meaning as above (a carriage return key).
C-s does not terminate isearch. But RET (hitting `Enter') should.

The fact is that I am writing to you with Thunderbird using an adds-on that allows to use hotmail without going through the Web interface (it seems that there is some bug with this when HTML is used).

Please do not use an HTML mail format for this mailing list. Please find out how
to use your plug-in or Thunderbird in a way that sends plain-text mail.
        
        > Two comments: (1) address@hidden might be a more appropriate
list.
        > Consider moving this there. (2) Please use plain-text for these
mailing lists.
        >
        > Sorry Drew, There was a mistake in my mail, I did not mean
        > "C-sC-w" but I meant "C-sC-w".
        >
        > What's the difference? They look the same to me.
        
They were not the same when I sent the mail there was RET bracketted with LT and GT signs in between "C-s" and "C-w". So when I am sending this mail "C-sC-w" is different from "C-sC-w"

I cannot follow you. I don't see the difference in the HTML mail you sent.
Please use plain text and type the text you want people to read.

        > I tested it again and it does not work.
> > That you for the information on the incremental word search > ("C-sM-eC-w"). I tested it on the same node, and whether I terminate by > "C-s" or by "" it fails in the same way. To tell you the truth, I > had not even tried that, as the plain non incremental one was not > working in the first place.
        >
> Not sure what you mean by terminate by "C-s" or by "". When I sent the mail between the pair of double quotes "" there was a RET bracketted by LT and GT signs. So when I ma sending this mail "" is different from "".

As you can see, it doesn't appear that way. Please use plain text, not HTML.

        > Does it at least work, in
        > the sense that it finds what you are looking for, regardless of how
you
> terminate the search? It does not find what I am looking for. When I type "C-sM-eC-w" I enter Incremental word search (I can see that as on the left side of the minibuffer is written "Word I-search"). Then if I type "the words" and then RET I get an error message "[(wrong-type-argument integer-or-marker-p t)]"
That sounds like a bug. Please report it using `M-x report-emacs-bug'. Describe
step by step how to reproduce the problem, starting from emacs -Q (that is, with
no .emacs).

        ...
More strange is the following: if I enter again the incremental word search, and I type on the right arrow key, what happens is that the content of the *info* buffer is copied character by character into the minibuffer. That is to say, assume that I type 5 times on the right arrow key, then the effect is as if I had entered the five characters "F" "i" "l" "e" and ":" consecutively (remember that when I enter the Word-I-search the *info* buffer point is pointing at the beginning the text "File: emacs, Node: Word Search, Next: Regexp Search, Prev: Nonincremental Search, Up: Search"

I believe that is normal; the text is copied from the source buffer to the
isearch edit area. You then must hit RET to accept the edited text as your
search string. Then hit C-s to search for that text.

FYI: address@hidden is for help questions. M-x report-emacs-bug is for
bug reports. address@hidden is for discussion of Emacs development.









reply via email to

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