Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    'Replace All in All Open Documents' problem in 7.4.1

    Help wanted · · · – – – · · ·
    7
    18
    11826
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Steven Speirs
      Steven Speirs last edited by

      Hi.

      I’ve encountered a problem in 7.4.1.

      If I open 12 text files (for example) and do a simple ‘Replace All in All Open Documents’ operation (for a text string that occurs only once per document), the status bar in the ‘Replace’ window displays “Replace in Opened Files: 12 occurrences replaced.” but not all occurrences have actually been replaced.

      The number of files which have been modified seems to be random (and the document tab icons indicate which files they are).

      A file seems more likely to have its find and replace operation be successful if I click on its tab first (but I don’t want to open many files and then have to click each tab individually before running a find and replace operation).

      I’ve tried disabling Document Peeker (just in case it was somehow contributing to the problem, being that the tabs seem to be involved) but this made no difference.

      I’ve never seen this problem before and I’ve had to revert to 7.3.3 where the above process works flawlessly every time.

      Anyone else seen this issue? Any ideas?

      Thanks,
      Steve

      1 Reply Last reply Reply Quote 0
      • guy038
        guy038 last edited by guy038

        Hello, @steven-speirs, and All,

        Indeed, like you, Steven, I noticed that there’s a problem with the global replacement, in N++ v7.4.1. To test it :

        • I downloaded the latest 7z, 32 bits, archive : npp.7.4.1.bin.7z

        • I extract it in a folder C:\ _741, with default plugins.

        • Then, I UNchecked the Enable session snapshot and periodic backup option in Settings > Preferences >Backup

        • In this local folder, I created five txt files, named test1.txt, test2.txt … till test5.txt

        • I inserted the simple string 00000, without any line-break, in each of them and save them

        • Once Npp v7.4.1 started, I opened these five test files, which were, all, UTF-8 encoded

        • I opened the Find in Files dialog ( Ctrl + Shift + F )

          • The Find what: box contained the initial string 00000

          • The Replace with: box contained the string 11111

          • The Filters box contained Test?.txt

          • The Directory contained C:\_741

          • The Normal search mode was selected

          • The Follow current doc. option was enabled, too

          • Finally I clicked on the Replace in Files button, and I confirmed the replacement

        • I then opened a DOS console windows

        • With a DOS visualization tool, I could verify, at the same time, just after replacement, the unique line of the five modified files

        After a first S/R ( “00000” -> “11111” ), with test2.txt as current file, I personally noticed that the two files test1.txt and test3.txt were not modified, although the message Replace in Files: 5 occurrences replaced has been displayed !

        Remarks :

        • As this bug is quite random, you may have to repeat that S/R ( for instance “11111” -> “22222”, then “22222” -> “33333” and so on… ) to obverse the bug :-(( But it does happens, after a few S/R actions, anyway !

        • Even if you open, for instance, the change.log file, and keep it as current file, after some S/R, some of the five test files are not modified !?

        • I test this same procedure with a N++ 7.3.3 version but I could not detect any problem, although I did numerous tests


        May someone else could test if this bug occurs, too, in its configuration, with the latest 7.4.1 version ? Many thanks, in advance !

        Best Regards,

        guy038

        Claudia Frank 1 Reply Last reply Reply Quote 0
        • Claudia Frank
          Claudia Frank @guy038 last edited by

          @guy038

          I can confirm that this happens at my installation as well.
          And it affects replace all in all opened documents as well as find in files.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • donho
            donho last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • donho
              donho last edited by donho

              @guy038 @Steven-Speirs @Claudia-Frank

              I think I’ve found the culprit : Document Peeker.
              Could you disable Document Peeker (uncheck it in MISC section of Preference Dialog) to make sure replace all in
              files works again?

              Thank you.

              1 Reply Last reply Reply Quote 0
              • Steven Speirs
                Steven Speirs last edited by

                Hi.

                Do you mean ‘Document Peeker’? I had already tried disabling ‘Document Peeker’ to no avail. (I noted this in my first post above.) I’ve just tried again with the same results.

                • Installed v7.4.1.
                • Deselected both ‘Peek on tab’ and ‘Peek on document map’ - can still reproduce problem.
                • Restarted Notepad++ with Document Peeker disabled - can still reproduce problem.

                Not sure if this info will help but these are my findings.
                Thanks for looking into the problem.

                Regards,
                Steve

                1 Reply Last reply Reply Quote 1
                • Claudia Frank
                  Claudia Frank last edited by Claudia Frank

                  Don, Steven

                  when document peeker settings are unchecked it seems to work fine for me.
                  I tried ~50 times to replace content in 15 open files and it always was replaced in all files
                  but as soon as I check the settings I do see the issue.
                  I guess I even found when it happens - as soon as a peek (?) has been displayed, the content of this
                  document doesn’t get replaced - looks like.

                  Cheers
                  Claudia

                  1 Reply Last reply Reply Quote 1
                  • donho
                    donho last edited by

                    Thank you @Claudia-Frank , I have the same result.

                    @Steven-Speirs Could you give me a screenshot to show me how you disable Document Peeker ?

                    1 Reply Last reply Reply Quote 0
                    • Steven Speirs
                      Steven Speirs last edited by

                      @donho

                      Here’s a screenshot: https://app.box.com/s/osnrj1i9ix2cqi530fobdboeuzns2up7

                      donho 1 Reply Last reply Reply Quote 1
                      • donho
                        donho @Steven Speirs last edited by

                        @Steven-Speirs Yes, I have experienced the same problem.
                        You have to restart Notepad++ after disable Document Peeker.
                        Please restart Notepad++ and check this settings to ensure it’s not active then test.
                        Pleas let me know the result of your test.

                        1 Reply Last reply Reply Quote 0
                        • Steven Speirs
                          Steven Speirs last edited by

                          Hi.

                          I’ve tried again this morning and disabling Document Peeker does seem to fix the problem.
                          I have no idea what I was doing last night when I thought the problem still existed (maybe searching for text that was not in all files). Sorry for the false alarm.

                          To reiterate: the problem does not exist when Document Peeker has been disabled.

                          Cheers,
                          Steve

                          donho 1 Reply Last reply Reply Quote 1
                          • donho
                            donho @Steven Speirs last edited by

                            @Steven-Speirs Thank you for your confirmation !

                            1 Reply Last reply Reply Quote 0
                            • guy038
                              guy038 last edited by guy038

                              Hi, @donho, @steven-Speirs and All,

                              Quite strange, indeed ! Finally, I’m, exactly, in the same situation than Steven and I could have writen a similar post to the Steven’s one :-)) But, certainly, in less fluent American-English !

                              So, presently, the features Replace All in All documents and Replace in Files properly work, when Document Peeker new feature is disabled, in N++ v7.4.1 :-))

                              Many thanks, @donho, for your feedback, about that matter !

                              Cheers,

                              guy038

                              1 Reply Last reply Reply Quote 0
                              • Gary Collier
                                Gary Collier last edited by

                                issue continues in v7.7.1 both 64 and 32 bit versions
                                I notice when my file contains hex code 85 the all document replace function works on focus document only. When I try with another group of files that do not contain hex code 85 the replace all documents is successful for all. Perhaps this observation might help to reduce the randomness of the underlying issue.

                                Alan Kilborn 1 Reply Last reply Reply Quote 0
                                • Alan Kilborn
                                  Alan Kilborn @Gary Collier last edited by Alan Kilborn

                                  @Gary-Collier

                                  That’s really too vague for anyone to care about pursuing. Why don’t you do something like this:

                                  fileset, all in one folder:
                                  file1.txt - active document when replacement is started - contains hex 85 - what happens to it after replacement operation
                                  file2.txt - doesn’t contain hex 85 - what happens to it after replacement operation
                                  file3.txt - etc
                                  etc.

                                  Nobody really likes typing to describe a problem. BUT…You’ve got to give something to get something.

                                  Prediction: No reply.

                                  1 Reply Last reply Reply Quote 2
                                  • guy038
                                    guy038 last edited by guy038

                                    Hello, @gary-collier,

                                    First of all, Gary, when you speak of the "hex 85" character, do you mean :

                                    • The Unicode character …, of code-point U+0085, which belongs to the Control-C1 range, of short name NEL ( NExt Line ), and which can be found with any of the regexes, below :

                                      • \x85

                                      • \x{85}

                                      • \x{0085}

                                    when the current encoding of your file is, either, UTF-8, UTF-8-BOM, UCS-2 BE BOM or UCS-2 LE BOM, exclusively

                                    ( Refer to http://www.unicode.org/charts/PDF/U0080.pdf )

                                    OR

                                    • The Unicode character …, of code-point U+2026, which belongs to the General Punctuation script, of name Horisontal Ellipsis, and which can be found with :

                                    • the regex \x{2026}

                                    when the current encoding of your file is, either, UTF-8, UTF-8-BOM, UCS-2 BE BOM or UCS-2 LE BOM

                                    • the regex \x85

                                    when the current encoding of your file is ANSI

                                    ( Refer to http://www.unicode.org/charts/PDF/U2000.pdf )


                                    Personally, I tried with a local N++ v7.7.1 installation, in folder D:@@\771, containing 3 UTF-8 text files Guy_1.txt, Guy_2.txt and Guy_3.txt

                                    Then, I considered 4 cases, in the Guy_2 file :

                                    • Only letters

                                    • Letters + the U+0085 character

                                    • Letters + the U+2026 character

                                    • Letters + the U+0085 and U+2026 characters

                                    And I replaced just one occurence of a word, per file, with an other one. But luckily, in all cases, I did obtain 3 replacements ;-)), with Filters field = Guy*.txt and Directory field = D:\@@\771

                                    Best Regards,

                                    guy038

                                    1 Reply Last reply Reply Quote 2
                                    • Hugo Alves
                                      Hugo Alves last edited by

                                      I am using version 7.8.6 and got the same problem on my first attempt.
                                      But it works properly when i run NP++ as Administrator

                                      Alan Kilborn 1 Reply Last reply Reply Quote 0
                                      • Alan Kilborn
                                        Alan Kilborn @Hugo Alves last edited by

                                        @Hugo-Alves

                                        You might want to be a bit more specific about what the “same problem” is, after all, this thread is a bit old and several things were discussed above.

                                        Also, while 7.8.6 isn’t “ancient” by any means, maybe try something more recent?

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post
                                        Copyright © 2014 NodeBB Forums | Contributors