emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] How to set C-o back to open-line?


From: Andreas Röhler
Subject: Re: [O] How to set C-o back to open-line?
Date: Fri, 17 May 2013 07:53:09 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Am 17.05.2013 04:28, schrieb Christopher Allan Webber:
Suvayu Ali writes:

Hello Christopher,

On Thu, May 16, 2013 at 05:38:11PM -0500, Christopher Allan Webber wrote:
I really hate org-open-line... I can see why people might want it, but
it's messed up my workflow.  I'd like to set C-o back.

However, I have no idea what org-defkey is doing, but I expected this to
work:

   (define-key org-mode-map (kbd "C-o") 'open-line)

it isn't working!

How to get the standard-ol-open-line behavior back?

Does using org-defkey instead make it work?

org-defkey doesn't seem to work.

That said, I'm curious what is so different about org-open-line?  The
docstring says the following:

   It is bound to C-o, <insertline>.

   (org-open-line N)

   Insert a new row in tables, call `open-line' elsewhere.

So unless you are in a table, it should be the same as normal.  Is that
broken?  Anyway, I never use open-line myself, but I was curious after I
saw several people mention it on unrelated threads on a few lists.

Cheers,

Right, exactly.  The way I use org-diet often involves me splitting
apart and rejoining tables and the whole "adding a new line in between"
is part of expected behavior for me.  The new system is driving me crazy!



Installing this instead should fix it:

(defun org-open-line (n)
  "Insert a new row in tables, call `open-line' elsewhere.
With \C-u NUMBER `open-line' is called the common way also in table context"
  (interactive "*P")
  (cond (n
         (open-line (prefix-numeric-value n)))
        ((org-at-table-p)
         (org-table-insert-row))
        (t (open-line (prefix-numeric-value n)))))

Cheers,

Andreas




reply via email to

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