Re: can't do `backward-word' at end of line with certain timestamp config
Emanuel Berg <[email protected]> Thu, 28 Mar 2024 18:36:58 +0100
| Newsgroups | gmane.emacs.erc.general |
|---|---|
| Message-ID | <[email protected]> |
J.P. wrote: >> I can't do `backward-word' with point at the end of an >> inputted ERC line with this timestamp config and timestamps >> disabled - nothing happens, the cursor doesn't move. >> >> (setq erc-timestamp-format "[%s]") >> (setq erc-timestamp-format-left "[%F]\n") >> >> (let ((insert-fun #'erc-insert-timestamp-right)) >> (setq erc-insert-timestamp-function insert-fun) >> (setq erc-insert-away-timestamp-function insert-fun) ) > > Perhaps you can do something like > > (defun my-erc-backward-word (&optional arg) > (interactive "^p") > (let ((inhibit-field-text-motion > (or (< (point) erc-input-marker) inhibit-field-text-motion))) > (backward-word arg))) > > (keymap-set erc-mode-map "<remap> <backward-word>" #'my-erc-backward-word) Thanks, will try it later Gw. >> With this it works: >> >> (setq erc-timestamp-format nil) >> (setq erc-timestamp-format-left nil) >> >> (let ((insert-fun #'ignore)) >> (setq erc-insert-timestamp-function insert-fun) >> (setq erc-insert-away-timestamp-function insert-fun) ) > > But doesn't this omit stamps entirely? Yes, probably they are the ones causing the malfunction. -- underground experts united https://dataswamp.org/~incal