emacs-orgmode
[Top][All Lists]
Advanced

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

Re: C-SPC works; C-u C-SPC doesn't. How could be?


From: Ypo
Subject: Re: C-SPC works; C-u C-SPC doesn't. How could be?
Date: Sun, 26 Jun 2022 21:26:36 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

Thanks, Bruno

I will save your advice for future debugging :-)

Maybe you could use the keys that are already defined by org, to move
between list items ?


    ‘S-<UP>’
    ‘S-<DOWN>’
         Jump to the previous/next item in the current list, but only if
         ‘org-support-shift-select’ is off(6).  If not, you can still use
         paragraph jumping commands like ‘C-<UP>’ and ‘C-<DOWN>’ to quite
         similar effect.
That requires me to change hands position, I must think about it. Best regards :-)
El 26/06/2022 a las 21:13, Bruno Barbier escribió:
Ypo <ypuntot@gmail.com> writes:

Thanks, Bruno

I've debugged it manually because (keymap-lookup) doesn't seem to exist 
in my emacs, if that's possible.
Sorry, my bad. 'keymap-lookup' will only exist in 29.  I should have
used 'lookup-key':

     (lookup-key global-map (kbd "C-u"))
     
The problem comes from:

(define-key org-mode-map (kbd "C-u C-n") #'org-next-item)

If I eval that line, "C-u C-SPC" stops working on org-mode.

Same problem in runemacs -q. Is it a bug?
That line is the problem. It's hiding the real "C-u"
(universal-argument) in org-mode buffers. Once you've lost the standard
meaning of "C-u", you can't use C-u C-SPC and all other functions.

Maybe you could use the keys that are already defined by org, to move
between list items ?


    ‘S-<UP>’
    ‘S-<DOWN>’
         Jump to the previous/next item in the current list, but only if
         ‘org-support-shift-select’ is off(6).  If not, you can still use
         paragraph jumping commands like ‘C-<UP>’ and ‘C-<DOWN>’ to quite
         similar effect.

Bruno



El 25/06/2022 a las 9:47, Bruno Barbier escribió:
Hi Ypo,

Ypo<ypuntot@gmail.com>  writes:

Hi, Bruno

Yes, I tried your assertion for bug-hunter, but it didn't work.

(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
         (error "C-u has been redefined"))

I'm not sure in what way it didn't work and I didn't try bug-hunter yet.


FWIW, just in case it might help you, when I have such a problem, I just
define a function, something like:

    (defun my-check-bug ()
      "Throw an error when C-u is not the universal argument in org-mode."
      (with-temp-buffer
        (org-mode)
        (unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
          (error "C-u has been redefined"))))


Then I add:

    (my-check-bug)
    
everywhere in my init files and I start emacs with --debug-init.

Good luck,

Bruno



reply via email to

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