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