xahlee / xah-fly-keys

the most efficient keybinding for emacs
http://xahlee.info/emacs/misc/xah-fly-keys.html
484 stars 83 forks source link

Fix xah-show-kill-ring, `ttt` after formfeed line #60

Closed duianto closed 5 years ago

duianto commented 5 years ago

In the *copy history* buffer, ttt is shown at the end of each formfeed line.


Before:

emacs_2018-12-23_14-06-17

After:

emacs_2018-12-23_14-06-56

duianto commented 5 years ago

The xah-insert-formfeed function: https://github.com/xahlee/xah-fly-keys/blob/ff552e04ea66413cd0032643db6522f27e9d0e2c/xah-fly-keys.el#L1801-L1804

doesn't need to be updated it already inserts the formfeed line without ttt.

Instead of writing the formfeed string "\n\u000c\n" in two functions, maybe xah-insert-formfeed should be called from xah-show-kill-ring.

xahlee commented 5 years ago

sorry for the late reply. been busy. the ttt is actually intentional. It lets people quickly navigate sections by isearch ttt. of course there's forward-page, backward-page, but they are not well known, and have bad default keys that can't be held down to repeat.

about merging 2 function, i think it's better to be independent for small code. People can copy or read a function without another. But that's just a personal decision.

xahlee commented 5 years ago

i close the pull request now. If you have comment and suggestion, please feel free to reopen. thanks a lot for your code.

duianto commented 5 years ago

Don't worry about the time, this wasn't an urgent change.

the ttt is actually intentional.

Ok, I see how it could be useful to search for ttt.

If someone else wonders if it's a typo, then the explanation can now be found in this PR, when they search on github or on a search engine when the page has been indexed.

But to someone that's just browsing the code, it might be helpful to add a comment above that line, explaining that it's intentional.

about merging 2 function, i think it's better to be independent for small code. People can copy or read a function without another. But that's just a personal decision.

Understood, that's totally fine.