emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug with cua-mode & org-support-shift-select
@ 2010-01-31 22:36 Ivan Vanyushkin
  2010-02-01  1:49 ` Ryan Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Vanyushkin @ 2010-01-31 22:36 UTC (permalink / raw)
  To: emacs-orgmode

Hello.

I want to use C-x/C-c/C-v and Shift-arrows selection with org-mode.

GNU Emacs 23.1.50.1, org-mode 6.34, .emacs:
(cua-mode 1)
(setq org-support-shift-select t)

If this two options are on, then Shift key selection with arrow keys 
doesn't work: no selection, just cursor movements. According to 
http://orgmode.org/manual/Conflicts.html I think that org-mode should 
support CUA. If not, what can you suggest for correct support of 
C-x/C-c/C-v + org-support-shift-select?

As far as I can say, the reason of problem is there:

In org.el:
(defun org-call-for-shift-select (cmd)
   (let ((this-command-keys-shift-translated t))
     (call-interactively cmd)))

Called like this: (org-call-for-shift-select 'forward-char)

In cua-base.el Shift key is detected like this:
     (memq 'shift (event-modifiers
               (aref (this-single-command-raw-keys) 0)))
binded as pre-command-hook.

So, I think, Shift key is just not detected by CUA, and need a way to 
set it's flag. Sorry, I don't know emacs lisp.

Thank you for your suggestions.

-- 
Ivan Vanyushkin - Vanav.
http://vanav.com.ua
mailto:Vanav@vanav.com.ua
Jabber/GTalk: Vanav@vanav.com.ua
ICQ: 190644448
Yahoo: Vanav_I
MSN: Vanav@vanav.com.ua

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug with cua-mode & org-support-shift-select
  2010-01-31 22:36 Bug with cua-mode & org-support-shift-select Ivan Vanyushkin
@ 2010-02-01  1:49 ` Ryan Thompson
  2010-02-01  9:01   ` Ivan
  0 siblings, 1 reply; 3+ messages in thread
From: Ryan Thompson @ 2010-02-01  1:49 UTC (permalink / raw)
  To: Ivan Vanyushkin; +Cc: emacs-orgmode

Vanilla emacs now has shift selection (as of version 23?), so try
disabling shift select in CUA and enabling the standard shift select.

M-x customize-variable shift-select-mode

On Sun, Jan 31, 2010 at 2:36 PM, Ivan Vanyushkin <vanav@vanav.com.ua> wrote:
> Hello.
>
> I want to use C-x/C-c/C-v and Shift-arrows selection with org-mode.
>
> GNU Emacs 23.1.50.1, org-mode 6.34, .emacs:
> (cua-mode 1)
> (setq org-support-shift-select t)
>
> If this two options are on, then Shift key selection with arrow keys doesn't
> work: no selection, just cursor movements. According to
> http://orgmode.org/manual/Conflicts.html I think that org-mode should
> support CUA. If not, what can you suggest for correct support of C-x/C-c/C-v
> + org-support-shift-select?
>
> As far as I can say, the reason of problem is there:
>
> In org.el:
> (defun org-call-for-shift-select (cmd)
>  (let ((this-command-keys-shift-translated t))
>    (call-interactively cmd)))
>
> Called like this: (org-call-for-shift-select 'forward-char)
>
> In cua-base.el Shift key is detected like this:
>    (memq 'shift (event-modifiers
>              (aref (this-single-command-raw-keys) 0)))
> binded as pre-command-hook.
>
> So, I think, Shift key is just not detected by CUA, and need a way to set
> it's flag. Sorry, I don't know emacs lisp.
>
> Thank you for your suggestions.
>
> --
> Ivan Vanyushkin - Vanav.
> http://vanav.com.ua
> mailto:Vanav@vanav.com.ua
> Jabber/GTalk: Vanav@vanav.com.ua
> ICQ: 190644448
> Yahoo: Vanav_I
> MSN: Vanav@vanav.com.ua
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug with cua-mode & org-support-shift-select
  2010-02-01  1:49 ` Ryan Thompson
@ 2010-02-01  9:01   ` Ivan
  0 siblings, 0 replies; 3+ messages in thread
From: Ivan @ 2010-02-01  9:01 UTC (permalink / raw)
  To: emacs-orgmode

I see no way to disable shift-select handling in CUA.

CUA on initializing disables shift-select-mode, and also if try to 
enable later, we got bug 
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4249 :

<citation>
CUA mode and shift-select-mode don't seem to be aware of each other.

If I turn on CUA first, and then shift-select-mode, shifted selection
fails (e.g. shift-right marks only one character as region).

Emacs -Q
(cua-mode 1)
(setq shift-select-mode t)

Why would one want to do that?
For example in order to get org-mode to work correctly with shifted
selection and the appropriate org-mode customization variable.

The fact that org-mode doesn't understand CUA's shifted selection is a
bit sad, too.
</citation>

So need some other way to fix this.


On 01.02.2010 3:49, Ryan Thompson wrote:
> Vanilla emacs now has shift selection (as of version 23?), so try
> disabling shift select in CUA and enabling the standard shift select.
>
> M-x customize-variable shift-select-mode
>
> On Sun, Jan 31, 2010 at 2:36 PM, Ivan Vanyushkin<vanav@vanav.com.ua>  wrote:
>> Hello.
>>
>> I want to use C-x/C-c/C-v and Shift-arrows selection with org-mode.
>>
>> GNU Emacs 23.1.50.1, org-mode 6.34, .emacs:
>> (cua-mode 1)
>> (setq org-support-shift-select t)
>>
>> If this two options are on, then Shift key selection with arrow keys doesn't
>> work: no selection, just cursor movements. According to
>> http://orgmode.org/manual/Conflicts.html I think that org-mode should
>> support CUA. If not, what can you suggest for correct support of C-x/C-c/C-v
>> + org-support-shift-select?
>>
>> As far as I can say, the reason of problem is there:
>>
>> In org.el:
>> (defun org-call-for-shift-select (cmd)
>>   (let ((this-command-keys-shift-translated t))
>>     (call-interactively cmd)))
>>
>> Called like this: (org-call-for-shift-select 'forward-char)
>>
>> In cua-base.el Shift key is detected like this:
>>     (memq 'shift (event-modifiers
>>               (aref (this-single-command-raw-keys) 0)))
>> binded as pre-command-hook.
>>
>> So, I think, Shift key is just not detected by CUA, and need a way to set
>> it's flag. Sorry, I don't know emacs lisp.
>>
>> Thank you for your suggestions.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-01  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-31 22:36 Bug with cua-mode & org-support-shift-select Ivan Vanyushkin
2010-02-01  1:49 ` Ryan Thompson
2010-02-01  9:01   ` Ivan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).