From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Prevent auto-fill-mode from filling Property values in drawers Date: Sun, 04 Feb 2018 23:16:47 +0100 Message-ID: <87y3k8h034.fsf@nicolasgoaziou.fr> References: <87shaiuoxe.fsf@nicolasgoaziou.fr> <87d11muofz.fsf@nicolasgoaziou.fr> <87372i82p5.fsf@alphaville.usersys.redhat.com> <874lmxvhwb.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiSan-0002Kq-Hq for emacs-orgmode@gnu.org; Sun, 04 Feb 2018 17:16:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiSag-0005i6-Dm for emacs-orgmode@gnu.org; Sun, 04 Feb 2018 17:16:56 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:36381) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eiSag-0005f4-6D for emacs-orgmode@gnu.org; Sun, 04 Feb 2018 17:16:50 -0500 In-Reply-To: (Kaushal Modi's message of "Sun, 04 Feb 2018 15:52:36 +0000") 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" To: Kaushal Modi Cc: Nick Dokos , emacs-orgmode@gnu.org Kaushal Modi writes: > Of course. But "the right thing" would be to prevent call to auto filling > within `org-return` (somehow? I haven't yet dug deeper into that) if point > is in a property drawer. `org-return' doesn't call any auto fill function. > If you want to add a new property, use C-c C-x p, or, if you insist on >> typing it manually, use C-q instead. >> > > C-c C-x p is a bit unnatural and also longer to type than RET, Yet, it doesn't break properties drawers. > especially > if the point is already inside the property drawer. Yes, if my point is > inside the subtree, and I think of adding a property, C-c C-x p is great! > > C-q RET is a good tip, but again, RET would be better. Actually, that would be C-q C-j, not C-q > I'll try hacking something around this, tweaking org-return should work > using a simple advice. Would a patch be welcome for this? I don't think tweaking `org-return' is a good solution. This is not the only way to break a line (e.g. "C-q C-j", or "C-M-o"), so it would not be a panacea. You may want to use fill-nobreak-predicate variable instead, e.g. with `org-at-property-p'.