Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Query) status of shift-select-mode #185

Open
akashpal-21 opened this issue Jan 27, 2025 · 0 comments
Open

(Query) status of shift-select-mode #185

akashpal-21 opened this issue Jan 27, 2025 · 0 comments

Comments

@akashpal-21
Copy link

Dear Xah,

On Nov 29,2021 via commit ab84cd9 shift-select-mode was set to nil.

Isn't it more in line with other editing applications to use the shift key for selecting texts?

In emacs 28, a new option 'permanent was added , this behaves more in line with how set-mark operates.

Is there any rationale as to why it is set to nil as part of xah-fly-keys mode

Would you be inclined to add a custom option in line with xah-fly-use-shift-select to set this option?

--- xah-fly-keys.el	        2025-01-27 14:41:50.327959830 +0530
+++ xah-fly-keys--shsel.el	2025-01-27 14:41:29.947803966 +0530
@@ -176,6 +176,16 @@
   "If nil, no change to any key in isearch (`isearch-forward'). Otherwise, arrow keys are for moving between occurrences, and C-v is paste."
   :type 'boolean)

+(defcustom xah-fly-use-shift-select 'permanent
+  "When non-nil, shifted motion keys activate the mark momentarily.
+When the value is `permanent', the mark will be deactivated by any
+action which normally does that, but not by motion keys.
+
+See `shift-select-mode'."
+  :type '(choice (const :tag "Off" nil)
+                 (const :tag "Permanent" permanent)
+                 (other :tag "On" t)))
+
 (defun xah-fly-get-pos-block ()
   "Return the begin end positions of current text block.
 Return value is a `vector'.
@@ -4139,7 +4149,7 @@
   :lighter " xflykeys"
   :keymap xah-fly-insert-map
   (delete-selection-mode 1)
-  (setq shift-select-mode nil)
+  (setq shift-select-mode xah-fly-use-shift-select)

   (if xah-fly-keys
       ;; Construction:

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant