[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-sele
From: |
Noam Postavsky |
Subject: |
bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection |
Date: |
Fri, 13 Oct 2017 09:32:28 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> ((and (/= (region-beginning) (region-end))
>> (or (gui-backend-selection-owner-p 'PRIMARY)
>> - (null (gui-backend-selection-exists-p 'PRIMARY))))
>> + (null (gui-backend-selection-exists-p 'PRIMARY)))
>> + ;; `winner-undo' shouldn't update the selection
>> (Bug#28631).
>> + (not (eq this-command 'winner-undo)))
>> (gui-set-selection 'PRIMARY
>> (funcall region-extract-function nil)))))
> Is there really no way to solve this in winner? It seems like a
> winner bug/misfeature, and I'm worried by the possible effect of this
> patch on use cases that have nothing to do with the specific scenario
> of this bug. deactivate-mark is used a lot in places and ways we
> cannot possibly predict.
That patch only has affect during winner-undo, no? Probably cleaner to
avoid relying on `this-command' if possible though.
Tino Calancha <tino.calancha@gmail.com> writes:
> I agree it's better if it is handled inside winner.
> I am not a winner guru, just an user so sorry if the following patch
> is not right.
> + ;; `winner-undo' shouldn't update the selection (Bug#28631) when
> + ;; select-enable-primary is non-nil.
> + (unless select-enable-primary
> + (save-current-buffer
> + (cl-loop for buf in buffers
> + for entry = (cadr (assq buf winner-point-alist))
> + do (progn (set-buffer buf)
> + (set-mark (car entry))
> + (setf (winner-active-region) (cdr entry))))))
Maybe only the (setf (winner-active-region) (cdr entry)) part should be
skipped?
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Tino Calancha, 2017/10/11
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Noam Postavsky, 2017/10/11
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Tino Calancha, 2017/10/11
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Noam Postavsky, 2017/10/12
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Tino Calancha, 2017/10/12
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Eli Zaretskii, 2017/10/13
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Tino Calancha, 2017/10/13
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection,
Noam Postavsky <=
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Tino Calancha, 2017/10/13
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Noam Postavsky, 2017/10/13
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Eli Zaretskii, 2017/10/14
- bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection, Tino Calancha, 2017/10/17