Timeline for line-move-1 in temp buffer, sometimes results in unexpected point
Current License: CC BY-SA 4.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 20, 2024 at 21:12 | vote | accept | Ben Schwehn | ||
| Feb 19, 2024 at 19:58 | history | edited | NickD | CC BY-SA 4.0 | edited title |
| Feb 19, 2024 at 9:15 | answer | added | Ben Schwehn | timeline score: 2 | |
| Feb 19, 2024 at 8:49 | comment | added | dalanicolai | And I forgot to mention that I printed out also (buffer-substring (point) (point-max)) and indeed then we can see that point ends up at various places. | |
| Feb 19, 2024 at 8:44 | comment | added | dalanicolai | Okay, I can reproduce it now indeed. Weird indeed. As the comment before the line-move-1 definition says it is the gut of previous-line, I have tried using previous-line also, then the behavior is even more weird. Also, I have tried (forward -1) in which case the function seems to work correctly. Furthermore, I have used all variants of move-around within test.txt itself, in which case all variants seem to work fine. I have no idea what happens here (you could file a bug and you might get an answer), but at least using (forward-line -1) seems to work correctly. | |
| Feb 19, 2024 at 0:59 | comment | added | Drew | Comment out the calls to message, and just do M-x debug-on-entry RET test-move RET. Then walk through the debugger with d (or c to skip through a step). That should show you exactly what's going on. | |
| Feb 19, 2024 at 0:55 | history | edited | Drew | edited tags | |
| Feb 19, 2024 at 0:55 | comment | added | Drew | emacs.stackexchange.com/tags/elisp/info | |
| Feb 18, 2024 at 22:28 | history | edited | Ben Schwehn | CC BY-SA 4.0 | added 1035 characters in body; added 1 character in body |
| Feb 18, 2024 at 22:24 | comment | added | Ben Schwehn | I can reproduce it in two other machines and updated the exact steps I'm doing to reproduce it. | |
| Feb 18, 2024 at 22:22 | history | edited | Ben Schwehn | CC BY-SA 4.0 | added 1035 characters in body |
| Feb 18, 2024 at 21:46 | comment | added | Ben Schwehn | Thanks for trying it @dalanicolai! The buffer-size stays constant at 110 in both cases when point is 89 and 91 / 93. I'll try if I can reproduce it in my work machine tomorrow. | |
| Feb 18, 2024 at 21:17 | comment | added | dalanicolai | I can not reporiduce it here using eval-last-sexp. But you can try printing the (buffer-size) additionally... see if that is constant. | |
| S Feb 18, 2024 at 20:40 | review | First questions | |||
| Feb 18, 2024 at 23:39 | |||||
| S Feb 18, 2024 at 20:40 | history | asked | Ben Schwehn | CC BY-SA 4.0 |