Re: can't do `backward-word' at end of line with certain timestamp config
"J.P." <[email protected]> Thu, 28 Mar 2024 10:25:14 -0700
| Newsgroups | gmane.emacs.erc.general |
|---|---|
| Message-ID | <[email protected]> |
Emanuel Berg <[email protected]> writes: > 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) > 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?