emacs-erc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't do `backward-word' at end of line with certain timestamp confi


From: Emanuel Berg
Subject: Re: can't do `backward-word' at end of line with certain timestamp config
Date: Thu, 28 Mar 2024 18:36:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]