Emacs-wgrep icon indicating copy to clipboard operation
Emacs-wgrep copied to clipboard

Changes are not applied when using (wgrep-finish-edit) function.

Open doctorate75 opened this issue 7 years ago • 20 comments

the issue is reported here in this post link below: https://emacs.stackexchange.com/q/33375/2443

help please.

doctorate75 avatar Jun 07 '17 17:06 doctorate75

This have been fixed in 83674b3. Perhaps update or reinstall wgrep and/or helm ?

thierryvolpiatto avatar Jun 07 '17 17:06 thierryvolpiatto

all are updated, reinstalled yet to no avail. Any further help would be much appreciated!

doctorate75 avatar Jun 08 '17 16:06 doctorate75

here is the output of Edebug step-by-step debugging of wgrep-finish-edit after being deployed, could you please have a look at it and hopefully find out where the bug is?


Edebug: wgrep-finish-edit
Helm Grep Results saved in ‘*hgrep2*’ buffer
Press C-x C-s when finished or C-c C-k to abort changes.
Mark set
Quit
Mark set
11 matches for "12\.06\.2017"
 [2 times]
Result: ((#<buffer org_ANT_2.tex> (#<marker at 4333 in org_ANT_2.tex> "\\EN{Document: org\\_floor\\_ant\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_2 on 13.06.2017} %change here
" #<overlay from 841 to 902 in *hgrep2*> #<overlay from 823 to 902 in *hgrep2*>)) (#<buffer org_CMP.tex> (#<marker at 4290 in org_CMP.tex> "\\EN{Document: org\\_floor\\_cmp 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_cmp 13.06.2017} %change here
" #<overlay from 767 to 822 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*>)) (#<buffer org_CHM_2.tex> (#<marker at 4339 in org_CHM_2.tex> "\\EN{Document: org\\_floor\\_chm\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_2 on 13.06.2017} %change here
" #<overlay from 689 to 750 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*>)) (#<buffer org_ANT_3.tex> (#<marker at 4341 in org_ANT_3.tex> "\\EN{Document: org\\_floor\\_ant\\_3 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_3 on 13.06.2017} %change here
" #<overlay from 609 to 670 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*>)) (#<buffer org_ANT_1.tex> (#<marker at 4281 in org_ANT_1.tex> "\\EN{Document: org\\_floor\\_ant\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_1 on 13.06.2017} %change here
" #<overlay from 529 to 590 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*>)) (#<buffer org_MRU.tex> (#<marker at 4302 in org_MRU.tex> "\\EN{Document: org\\_floor\\_mru on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mru on 13.06.2017} %change here
" #<overlay from 452 to 510 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*>)) (#<buffer org_CHM_1.tex> (#<marker at 4337 in org_CHM_1.tex> "\\EN{Document: org\\_floor\\_chm\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_1 on 13.06.2017} %change here
" #<overlay from 374 to 435 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*>)) (#<buffer org_PHR.tex> (#<marker at 4300 in org_PHR.tex> "\\EN{Document: org\\_floor\\_phr on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phr on 13.06.2017} %change here
" #<overlay from 297 to 355 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*>)) (#<buffer org_PTH.tex> (#<marker at 4298 in org_PTH.tex> "\\EN{Document: org\\_floor\\_pth on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_pth on 13.06.2017} %change here
" #<overlay from 222 to 280 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*>)) (#<buffer org_PHY.tex> (#<marker at 4321 in org_PHY.tex> "\\EN{Document: org\\_floor\\_phy on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phy on 13.06.2017} %change here
" #<overlay from 147 to 205 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*>)) (#<buffer org_MBO.tex> (#<marker at 4334 in org_MBO.tex> "\\EN{Document: org\\_floor\\_mbo on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mbo on 13.06.2017} %change here
" #<overlay from 72 to 130 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>)))
 [2 times]
Result: ((#<buffer org_ANT_2.tex> (#<marker at 4333 in org_ANT_2.tex> "\\EN{Document: org\\_floor\\_ant\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_2 on 13.06.2017} %change here
" #<overlay from 841 to 902 in *hgrep2*> #<overlay from 823 to 902 in *hgrep2*>)) (#<buffer org_CMP.tex> (#<marker at 4290 in org_CMP.tex> "\\EN{Document: org\\_floor\\_cmp 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_cmp 13.06.2017} %change here
" #<overlay from 767 to 822 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*>)) (#<buffer org_CHM_2.tex> (#<marker at 4339 in org_CHM_2.tex> "\\EN{Document: org\\_floor\\_chm\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_2 on 13.06.2017} %change here
" #<overlay from 689 to 750 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*>)) (#<buffer org_ANT_3.tex> (#<marker at 4341 in org_ANT_3.tex> "\\EN{Document: org\\_floor\\_ant\\_3 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_3 on 13.06.2017} %change here
" #<overlay from 609 to 670 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*>)) (#<buffer org_ANT_1.tex> (#<marker at 4281 in org_ANT_1.tex> "\\EN{Document: org\\_floor\\_ant\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_1 on 13.06.2017} %change here
" #<overlay from 529 to 590 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*>)) (#<buffer org_MRU.tex> (#<marker at 4302 in org_MRU.tex> "\\EN{Document: org\\_floor\\_mru on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mru on 13.06.2017} %change here
" #<overlay from 452 to 510 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*>)) (#<buffer org_CHM_1.tex> (#<marker at 4337 in org_CHM_1.tex> "\\EN{Document: org\\_floor\\_chm\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_1 on 13.06.2017} %change here
" #<overlay from 374 to 435 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*>)) (#<buffer org_PHR.tex> (#<marker at 4300 in org_PHR.tex> "\\EN{Document: org\\_floor\\_phr on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phr on 13.06.2017} %change here
" #<overlay from 297 to 355 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*>)) (#<buffer org_PTH.tex> (#<marker at 4298 in org_PTH.tex> "\\EN{Document: org\\_floor\\_pth on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_pth on 13.06.2017} %change here
" #<overlay from 222 to 280 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*>)) (#<buffer org_PHY.tex> (#<marker at 4321 in org_PHY.tex> "\\EN{Document: org\\_floor\\_phy on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phy on 13.06.2017} %change here
" #<overlay from 147 to 205 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*>)) (#<buffer org_MBO.tex> (#<marker at 4334 in org_MBO.tex> "\\EN{Document: org\\_floor\\_mbo on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mbo on 13.06.2017} %change here
" #<overlay from 72 to 130 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>)))
 [4 times]
Result: (#<buffer org_ANT_2.tex> (#<marker at 4333 in org_ANT_2.tex> "\\EN{Document: org\\_floor\\_ant\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_2 on 13.06.2017} %change here
" #<overlay from 841 to 902 in *hgrep2*> #<overlay from 823 to 902 in *hgrep2*>))

Result: #<buffer org_ANT_2.tex>
 [2 times]
Result: (#<buffer org_ANT_2.tex> (#<marker at 4333 in org_ANT_2.tex> "\\EN{Document: org\\_floor\\_ant\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_2 on 13.06.2017} %change here
" #<overlay from 841 to 902 in *hgrep2*> #<overlay from 823 to 902 in *hgrep2*>))

Result: ((#<marker at 4333 in org_ANT_2.tex> "\\EN{Document: org\\_floor\\_ant\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_2 on 13.06.2017} %change here
" #<overlay from 841 to 902 in *hgrep2*> #<overlay from 823 to 902 in *hgrep2*>))

Result: nil
 [3 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_CMP.tex> (#<marker at 4290 in org_CMP.tex> "\\EN{Document: org\\_floor\\_cmp 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_cmp 13.06.2017} %change here
" #<overlay from 767 to 822 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*>))

Result: #<buffer org_CMP.tex>
 [2 times]
Result: (#<buffer org_CMP.tex> (#<marker at 4290 in org_CMP.tex> "\\EN{Document: org\\_floor\\_cmp 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_cmp 13.06.2017} %change here
" #<overlay from 767 to 822 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*>))

Result: ((#<marker at 4290 in org_CMP.tex> "\\EN{Document: org\\_floor\\_cmp 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_cmp 13.06.2017} %change here
" #<overlay from 767 to 822 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*>))

Result: nil
 [3 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_CHM_2.tex> (#<marker at 4339 in org_CHM_2.tex> "\\EN{Document: org\\_floor\\_chm\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_2 on 13.06.2017} %change here
" #<overlay from 689 to 750 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*>))

Result: #<buffer org_CHM_2.tex>
 [2 times]
Result: (#<buffer org_CHM_2.tex> (#<marker at 4339 in org_CHM_2.tex> "\\EN{Document: org\\_floor\\_chm\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_2 on 13.06.2017} %change here
" #<overlay from 689 to 750 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*>))

Result: ((#<marker at 4339 in org_CHM_2.tex> "\\EN{Document: org\\_floor\\_chm\\_2 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_2 on 13.06.2017} %change here
" #<overlay from 689 to 750 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*>))

Result: nil
Stop

Stop

Stop

Result: nil
Stop

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_ANT_3.tex> (#<marker at 4341 in org_ANT_3.tex> "\\EN{Document: org\\_floor\\_ant\\_3 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_3 on 13.06.2017} %change here
" #<overlay from 609 to 670 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*>))

Result: #<buffer org_ANT_3.tex>
 [2 times]
Result: (#<buffer org_ANT_3.tex> (#<marker at 4341 in org_ANT_3.tex> "\\EN{Document: org\\_floor\\_ant\\_3 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_3 on 13.06.2017} %change here
" #<overlay from 609 to 670 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*>))

Result: ((#<marker at 4341 in org_ANT_3.tex> "\\EN{Document: org\\_floor\\_ant\\_3 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_3 on 13.06.2017} %change here
" #<overlay from 609 to 670 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*>))

Result: nil
 [3 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_ANT_1.tex> (#<marker at 4281 in org_ANT_1.tex> "\\EN{Document: org\\_floor\\_ant\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_1 on 13.06.2017} %change here
" #<overlay from 529 to 590 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*>))

Result: #<buffer org_ANT_1.tex>
 [2 times]
Result: (#<buffer org_ANT_1.tex> (#<marker at 4281 in org_ANT_1.tex> "\\EN{Document: org\\_floor\\_ant\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_1 on 13.06.2017} %change here
" #<overlay from 529 to 590 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*>))

Result: ((#<marker at 4281 in org_ANT_1.tex> "\\EN{Document: org\\_floor\\_ant\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_ant\\_1 on 13.06.2017} %change here
" #<overlay from 529 to 590 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*>))

Result: nil
 [3 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_MRU.tex> (#<marker at 4302 in org_MRU.tex> "\\EN{Document: org\\_floor\\_mru on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mru on 13.06.2017} %change here
" #<overlay from 452 to 510 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*>))

Result: #<buffer org_MRU.tex>
Stop

Stop

Result: (#<buffer org_MRU.tex> (#<marker at 4302 in org_MRU.tex> "\\EN{Document: org\\_floor\\_mru on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mru on 13.06.2017} %change here
" #<overlay from 452 to 510 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*>))
Stop

Result: ((#<marker at 4302 in org_MRU.tex> "\\EN{Document: org\\_floor\\_mru on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mru on 13.06.2017} %change here
" #<overlay from 452 to 510 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*>))
Stop

Result: nil
Stop

Stop
 [2 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_CHM_1.tex> (#<marker at 4337 in org_CHM_1.tex> "\\EN{Document: org\\_floor\\_chm\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_1 on 13.06.2017} %change here
" #<overlay from 374 to 435 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*>))

Result: #<buffer org_CHM_1.tex>
 [2 times]
Result: (#<buffer org_CHM_1.tex> (#<marker at 4337 in org_CHM_1.tex> "\\EN{Document: org\\_floor\\_chm\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_1 on 13.06.2017} %change here
" #<overlay from 374 to 435 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*>))

Result: ((#<marker at 4337 in org_CHM_1.tex> "\\EN{Document: org\\_floor\\_chm\\_1 on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_chm\\_1 on 13.06.2017} %change here
" #<overlay from 374 to 435 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*>))
Stop

Result: nil
 [3 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_PHR.tex> (#<marker at 4300 in org_PHR.tex> "\\EN{Document: org\\_floor\\_phr on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phr on 13.06.2017} %change here
" #<overlay from 297 to 355 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*>))

Result: #<buffer org_PHR.tex>
 [2 times]
Result: (#<buffer org_PHR.tex> (#<marker at 4300 in org_PHR.tex> "\\EN{Document: org\\_floor\\_phr on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phr on 13.06.2017} %change here
" #<overlay from 297 to 355 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*>))

Result: ((#<marker at 4300 in org_PHR.tex> "\\EN{Document: org\\_floor\\_phr on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phr on 13.06.2017} %change here
" #<overlay from 297 to 355 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*>))
Stop

Result: nil
 [3 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_PTH.tex> (#<marker at 4298 in org_PTH.tex> "\\EN{Document: org\\_floor\\_pth on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_pth on 13.06.2017} %change here
" #<overlay from 222 to 280 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*>))

Result: #<buffer org_PTH.tex>
 [2 times]
Result: (#<buffer org_PTH.tex> (#<marker at 4298 in org_PTH.tex> "\\EN{Document: org\\_floor\\_pth on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_pth on 13.06.2017} %change here
" #<overlay from 222 to 280 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*>))

Result: ((#<marker at 4298 in org_PTH.tex> "\\EN{Document: org\\_floor\\_pth on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_pth on 13.06.2017} %change here
" #<overlay from 222 to 280 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*>))

Result: nil
 [3 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_PHY.tex> (#<marker at 4321 in org_PHY.tex> "\\EN{Document: org\\_floor\\_phy on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phy on 13.06.2017} %change here
" #<overlay from 147 to 205 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*>))

Result: #<buffer org_PHY.tex>
 [2 times]
Result: (#<buffer org_PHY.tex> (#<marker at 4321 in org_PHY.tex> "\\EN{Document: org\\_floor\\_phy on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phy on 13.06.2017} %change here
" #<overlay from 147 to 205 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*>))

Result: ((#<marker at 4321 in org_PHY.tex> "\\EN{Document: org\\_floor\\_phy on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_phy on 13.06.2017} %change here
" #<overlay from 147 to 205 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*>))

Result: nil
 [3 times]
Result: nil
Stop

Result: nil
Stop

Result: nil

Result: nil

Result: nil
 [4 times]
Result: (#<buffer org_MBO.tex> (#<marker at 4334 in org_MBO.tex> "\\EN{Document: org\\_floor\\_mbo on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mbo on 13.06.2017} %change here
" #<overlay from 72 to 130 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>))

Result: #<buffer org_MBO.tex>
 [2 times]
Result: (#<buffer org_MBO.tex> (#<marker at 4334 in org_MBO.tex> "\\EN{Document: org\\_floor\\_mbo on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mbo on 13.06.2017} %change here
" #<overlay from 72 to 130 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>))

Result: ((#<marker at 4334 in org_MBO.tex> "\\EN{Document: org\\_floor\\_mbo on 12.06.2017} %change here
" "\\EN{Document: org\\_floor\\_mbo on 13.06.2017} %change here
" #<overlay from 72 to 130 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>))
Stop

Result: nil
 [3 times]
Result: nil

Result: nil

Result: nil

Result: nil

Result: nil

Result: nil
 [2 times]
Result: nil
 [2 times]
Result: t
 [4 times]
Result: nil

Result: 0 (#o0, #x0, ?\C-@)

Result: "(0 changed)"
 [2 times]
Result: (#<overlay from 823 to 902 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>)
 [3 times]
Result: (#<overlay from 823 to 902 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>)

Result: nil
 [3 times]
Result: (#<overlay from 823 to 902 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>)

Result: 11 (#o13, #xb, ?\C-k)

Result: nil
 [3 times]
Result: (#<overlay from 823 to 902 in *hgrep2*> #<overlay from 751 to 822 in *hgrep2*> #<overlay from 671 to 750 in *hgrep2*> #<overlay from 591 to 670 in *hgrep2*> #<overlay from 511 to 590 in *hgrep2*> #<overlay from 436 to 510 in *hgrep2*> #<overlay from 356 to 435 in *hgrep2*> #<overlay from 281 to 355 in *hgrep2*> #<overlay from 206 to 280 in *hgrep2*> #<overlay from 131 to 205 in *hgrep2*> #<overlay from 56 to 130 in *hgrep2*>)

Result: 11 (#o13, #xb, ?\C-k)

Result: "(0 changed)"

There are 11 unapplied changes. (0 changed)
Result: "There are 11 unapplied changes. (0 changed)"

Result: "There are 11 unapplied changes. (0 changed)"

Result: "There are 11 unapplied changes. (0 changed)"

Result: "There are 11 unapplied changes. (0 changed)"

scroll-up-command: End of buffer
(No changes need to be saved)
No buffer has been saved.

doctorate75 avatar Jun 08 '17 16:06 doctorate75

doctorate75 [email protected] writes:

all are updated, reinstalled yet to no avail.

Yes, perhaps but be sure to reinstall helm first, restart emacs and then reinstall wgrep, otherwise if you did it in the other sens wgrep is compiled with the old helm.

I red again your report on stack exchange it is really the same bug I fixed some time ago (due to incompatible changes in helm, sorry).

With the good install I can't reproduce.

The reason is before I was getting the file names from help-echo property and now I get them from helm-grep-fname property so wgrep must do the same.

Also be sure when you reinstall to compile from outside emacs and restart emacs.

Try this and let me know if you stiil have the issue.

Thanks.

-- Thierry Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997

thierryvolpiatto avatar Jun 08 '17 19:06 thierryvolpiatto

I don't know how to reinstall helm from outside emacs (clone of githubt) without breaking org-ref stuff, at restart emacs complains that org-ref needs helm<5.5.1> version which I removed form the elpa folder.

I rely solely on package.el management system, except for org from github and with loaded path. Some recommend using el-get.el, others second cask. Which one do you think is useful in cases such as this one? Your advise would be very much appreciated. I would adopt what you suggest if that will solve the problem without doing all that reinstall and install stuff from outside emacs.

doctorate75 avatar Jun 10 '17 16:06 doctorate75

doctorate75 [email protected] writes:

I don't know how to reinstall helm from outside emacs (clone of githubt) without breaking org-ref stuff, at restart emacs complains that org-ref needs helm<5.5.1> version which I removed form the elpa folder.

This confirm that you just have to cleanup your package installation to make all working properly.

Your problem is you have compiled a recent version of a package (wgrep) with a old version of helm and now the compiled code cannot work properly, so you have recompile wgrep with the corresponding new helm code.

You don't have to build helm from git, just use package.el.

  1. Reinstall helm.

  2. Restart emacs.

  3. Reinstall wgrep.

  4. Restart emacs.

I rely solely on package.el management system, except for org from github and with loaded path. Some recommend using el-get.el, others second cask.

No I even don't know how to use these tool, use package.el or installation from git.

-- Thierry Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997

thierryvolpiatto avatar Jun 10 '17 17:06 thierryvolpiatto

It didn't work either. I did the following:

From inside Emacs M-x package-list-packages, I deleted all three helm, wgrep and wgrep-helm by pressing D and then x to delete them from within the packages buffer. However, for helm package I could not delete it completely as others, it changed status from installed to dependency and I don't know which dependency is that. Restarted Emacs, Installed helm shown as dependency, and changed to installed by pressing I and then x to execute installation. Restarted Emacs Reinstalled wgrep and wgrep-helm together, again by pressing I and then x. Restarted Emacs. The same problem remains. What do I miss here? thanks.

doctorate75 avatar Jun 10 '17 17:06 doctorate75

doctorate75 [email protected] writes:

It didn't work too. I did the following:

From inside Emacs M-x package-list-packages, I deleted all three helm, wgrep and wgrep-helm by pressing D and then x to delete them from within the packages buffer. However, for helm package I could not delete it completely as others, it changes status from installed to dependency and I don't know which dependence is that. Restarted Emacs, Installed helm shown as dependency, and changed to installed by pressing I and then x to execute installation. Restarted Emacs Reinstalled wgrep and wgrep-helm together, again by pressing I and then x. Restarted Emacs. The same problem remains. What do I miss here? thanks.

Same you are still using old helm compiled files not compatible with new wgrep.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.*

-- Thierry Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997

thierryvolpiatto avatar Jun 10 '17 18:06 thierryvolpiatto

so what do I need to do in order to get rid of the old one without breaking setup code? I think here is the real issue.

doctorate75 avatar Jun 10 '17 18:06 doctorate75

doctorate75 [email protected] writes:

so what do I need to do in order to get rid of the old one? I think this is the culprit right now.

Uninstall all packages that requires helm, then uninstall helm and reinstall it, restart emacs and reinstall all the packages you have uninstalled one by one.

BTW Once helm is installed I suggest to use M-x helm-list-elisp-packages to manage your packages.

-- Thierry Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997

thierryvolpiatto avatar Jun 10 '17 19:06 thierryvolpiatto

The linked issue on the first message no longer works (please, people, provide proper bug reports instead of a link) but I must mention that I don't use helm and too often wgrep does not apply all the changes. I operate on buffers produced by ag. My wgrep is version 2.2.0 I just came back here to grab the most recent version.

oscarfv avatar May 17 '19 16:05 oscarfv

Make sure buffer is not read-only (if so customize wgrep change read-only flag), and also file is not write-protected (file mode).

xuanni avatar Sep 02 '19 06:09 xuanni

I'm having the same problem operating on ag buffers. I use wgrep-change-to-wgrep-mode (at this point the ag buffer is not read-only), make some changes, C-x C-s, and it goes through each change and turns the text red (on the green background) and says "there are 9 unapplied changes. (0 changed)". I see nothing in the *Messages* buffer. Not sure where to go from here!

garyo avatar Oct 04 '19 21:10 garyo

Ah, I think I see what's going on -- ag uses --column so the matches look like this:

tests/unit/store/project.spec.ts:12:8:import shotStore from '@/store'

Note the :8 which I think wgrep-mode isn't expecting. Unfortunately that can't be turned off for ag-mode.

garyo avatar Oct 04 '19 21:10 garyo

Answer: use the wgrep-ag package; that fixes this.

garyo avatar Oct 05 '19 23:10 garyo

Another cause of the edits failing to be applied is when helm presents the "file name" as the uniquified buffer name. The uniquified file name cannot be found in default directory, so wgrep cannot apply the change.

Workarounds:

  1. Kill similarly named buffers so that the relevant buffer name is no longer uniquified.
  2. Use wgrep-ag

alastairdb avatar May 05 '20 12:05 alastairdb

Another cause of the edits failing to be applied is when helm presents the "file name" as the uniquified buffer name. The uniquified file name cannot be found in default directory, so wgrep cannot apply the change.

Workarounds:

  1. Kill similarly named buffers so that the relevant buffer name is no longer uniquified.
  2. Use wgrep-ag

^ I just encountered a case similar to this. I have a buffer "log" and another "log.org", changes cannot be applied to "log", when I close the "log.org", it works fine. I wonder why wgrep just look at the file name without extension?

xuanni avatar Oct 16 '20 18:10 xuanni

In my case after pressing ZZ I'd get the message 'There are 34 unapplied changes. (0 changed)' and the files in the wgrep buffer would turn red/orange. Also many autosave (#.) files would appear in magit status as untracked.

Then I tried M-x wgrep-save-all-buffers and the changes were applied successfully.

sethidden avatar Nov 13 '23 09:11 sethidden

I am experiencing this as well. In my case, I collect the search results via consult-ripgrep, followed by embark-act, embark-export and wgrep-change-to-wgrep-mode. When I invoke wgrep-finish-edit, sometimes a subset of the files is not saved.

I suspect that it is related to the file extension or the major mode (or something else that correlates with a file extension) since I recently performed a massive search and replace involving over 2000 replacements and the few failures all involved org and texi files, despite the fact that the bulk of the occurrences were in el files (none of which failed).

M-x wgrep-save-all-buffers did not make a difference.

benthamite avatar May 08 '24 12:05 benthamite

I traced back the issue to wgrep-apply-change:

(defun wgrep-apply-change (marker old new)
  "The changes in the *grep* buffer are applied to the file.
NEW may be nil this means deleting whole line."
  (let ((coding buffer-file-coding-system))
    (goto-char marker)
    ;; check BOM
    (when (and (= (point-min-marker) marker)
               coding
               (coding-system-get coding :bom))
      (setq old (wgrep-string-replace-bom old coding))
      (when new
        (setq new (wgrep-string-replace-bom new coding))))
    ;; Check buffer line was modified after execute grep.
    (unless (string= old
		     (buffer-substring-no-properties
		      (line-beginning-position) (line-end-position)))
      (signal 'wgrep-error (list "Buffer was changed after grep.")))
    (cond
     (new
      (wgrep-replace-to-new-line new))
     (t
      ;; new nil means flush whole line.
      (wgrep-flush-whole-line)
))))

The check (unless (string= old ... is the source of the error. For some reason, sometimes the value of old, which is the text shown in the overlay of the Embark buffer, does not match the return value of (buffer-substring-no-properties (line-beginning-position) (line-end-position)).

Here is a concrete, reproducible example:

  1. Visit the file etica-de-la-poblacion.md, attached at the end of this message.
  2. M-x consult-ripgrep RET description:.
  3. embark-act on the first (and only) candidate, then embark-export in the *Embark Actions* menu.
  4. wgrep-change-to-wgrep-mode.
  5. M-x isearch-forward RET description: RET.
  6. M-% (insert-query-repalce) followed by the replacement text, e.g. "description:", followed by SPC to confirm the replacement.
  7. Do not apply the changes yet. Instead, open wgrep.el in the directory where the wgrep package is installed, and move point to the definition of wgrep-apply-change.
  8. Instrument the function with C-u C-M-x (i.e. eval-defun with prefix argument).
  9. Now go back to the Embark buffer and apply the changes with C-c C-c.
  10. Point should jump to the beginning of wgrep-apply-change. Hit SPC until you reach the unless form.
  11. Keep pressing SPC until the value of old is printed in the echo area. This value should be "descripcion: \"La ética de la población aborda cuestiones como el peso de las nuevas vidas en relación con el de las ya existentes, y el modo de equilibrar la cantidad y la calidad de vida (cuando se comparan poblaciones de distinto tamaño). En este capítulo se analizan cinco grandes enfoques de la é".
  12. Keep pressing SPC until the value of (buffer-substring-no-properties (line-beginning-position) (line-end-position)) is printed in the echo area. This value should be "descripcion: \"La ética de la población aborda cuestiones como el peso de las nuevas vidas en relación con el de las ya existentes, y el modo de equilibrar la cantidad y la calidad de vida (cuando se comparan poblaciones de distinto tamaño). En este capítulo se analizan cinco grandes enfoques de la ética de la población: la perspectiva total, la perspectiva promedio, las teorías del valor variable, las teorías del nivel crítico (y del rango crítico) y las perspectivas centradas en las personas afectadas.\""

The two values should be equal, but they are not. This is the source of the error. Not sure why this is happening—perhaps someone with better Elisp skills than I have can figure it out?

@mhayashi1120

etica-de-la-poblacion.md

benthamite avatar May 21 '24 21:05 benthamite