From mboxrd@z Thu Jan 1 00:00:00 1970 From: pinard@iro.umontreal.ca (=?utf-8?Q?Fran=C3=A7ois?= Pinard) Subject: C-k in visual line mode Date: Sat, 07 Jan 2012 10:46:43 -0500 Message-ID: <87mx9zwm58.fsf@iro.umontreal.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjYTl-0006Xu-Md for emacs-orgmode@gnu.org; Sat, 07 Jan 2012 10:46:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjYTk-0007l7-SL for emacs-orgmode@gnu.org; Sat, 07 Jan 2012 10:46:45 -0500 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:56707 helo=mercure.epsilon-ti.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjYTk-0007l3-Ow for emacs-orgmode@gnu.org; Sat, 07 Jan 2012 10:46:44 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, Org people. Let me suggest this tiny patch, so C-k does the proper thing in visual line mode. diff --git a/lisp/org.el b/lisp/org.el index a8ac17d..2d0db0c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20491,7 +20491,8 @@ depending on context." (if (or (eq org-ctrl-k-protect-subtree 'error) (not (y-or-n-p "Kill hidden subtree along with headline? "))) (error "C-k aborted - would kill hidden subtree"))) - (call-interactively 'kill-line)) + (call-interactively + (if visual-line-mode 'kill-visual-line 'kill-line))) ((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]= *$")) (kill-region (point) (match-beginning 1)) (org-set-tags nil t)) Fran=C3=A7ois