From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UI8ODbFU4l9NYQAA0tVLHw (envelope-from ) for ; Tue, 22 Dec 2020 20:18:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UM/ICLFU4l+AMQAAbx9fmQ (envelope-from ) for ; Tue, 22 Dec 2020 20:18:57 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 915EC9404C5 for ; Tue, 22 Dec 2020 20:18:56 +0000 (UTC) Received: from localhost ([::1]:44844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kro7T-0006Bw-DZ for larch@yhetil.org; Tue, 22 Dec 2020 15:18:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kro75-0006BJ-Q7 for emacs-orgmode@gnu.org; Tue, 22 Dec 2020 15:18:31 -0500 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]:33680) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kro74-0004CY-7u; Tue, 22 Dec 2020 15:18:31 -0500 Received: by mail-qv1-xf34.google.com with SMTP id a13so6597448qvv.0; Tue, 22 Dec 2020 12:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version; bh=Tip9eurKCWNCm/ERz3vL4KFnO9k0t3k0Bc25688Nhuw=; b=YshkIkK7iKm4/DzCWKOkfpmuXow8mUf0Mnsz5xgq/cmo3QK8mhJTNXNKp3EXsaQbVc a0HNDjsIxmOgETmJrJdULNm0sHK/OoDZG+BwJH7nTkB564LVsmg0V4sZWmfhW4zoLs/t dJXadlxSV4qosXeW0HxPzLPsukw2yNP6+p6UGunKGcnRBX50Qp8LjoJzv0t1ffHrPLT9 qksl+6q7PAkFYcl4gYu7lGB4LkFDvWi7GYGg0xG010pl9U6Sv/Qr0nq8KkptTXlTqzAA A2XF+xOfUJFd6dv7FFKwkjruktPnK6ckwCt3C4HZMLMfVsqI7OyJk3XOKcEdidXP9m8/ ryVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=Tip9eurKCWNCm/ERz3vL4KFnO9k0t3k0Bc25688Nhuw=; b=Y86Kc7tyR8x2TGruCWVc/3aRidGvpYt6TNilBIRklbgMjSsMMtJ5+vdU1/fpHf/7Ih tLhuCSrTzRr8vNZ1xAgscV9fP3R+ECwMU5sd74jlu40cmxNuwFIq+fLA4g0+afL74pOd RGdxE2id6gwJdN2hixK2mXCX0WLvDQfITv0AnOXkW33KMFrqkaTdx3Ms1w82CRrkW27M 5CWm6GyEJ/bbNIwNBcB23FGmZelC3rCOIG4zGgBY2i9nB1jsxhvf+KTOZzndjpeyMH8w X7Yu/UYrzMe0+nVbezlvYJOg04ndLl+TfPCH/Nfuzz5jBPc69KsfVZ+UToGU9YMLgT2X PRMw== X-Gm-Message-State: AOAM532IHFZZUzTI/uQKbp/bncNNrAAHQOF1HbesHFvBOaoWc3YWplcZ 3f4kkdnMBW9ZSchp+tUQ3iP6HHrJshA= X-Google-Smtp-Source: ABdhPJwFwRezf2owGx9Fv4fWIW0B8Jr2O140HxB4lamFUWM3eb3fbqLean7KktbXT3NZ9ES97x2JMA== X-Received: by 2002:a0c:b20d:: with SMTP id x13mr23800339qvd.18.1608668308229; Tue, 22 Dec 2020 12:18:28 -0800 (PST) Received: from gusbrs-laptop (h93-n190-106-134.v8.fangio.net. [190.106.134.93]) by smtp.gmail.com with ESMTPSA id n188sm13905757qke.17.2020.12.22.12.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 12:18:27 -0800 (PST) References: <87a6zkv3m2.fsf@gmail.com> <87zh7jfyal.fsf@gmail.com> <87r1rhk1qm.fsf@gnu.org> <87r1rhfsxb.fsf@gmail.com> <87eenh8mtk.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Gustavo Barros To: Bastien Subject: Re: Bug: Org line commands and visual-line mode bindings [9.3.7 (9.3.7-15-gc9abb4-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20200727/)] In-reply-to: <87eenh8mtk.fsf@gnu.org> Message-ID: <87v9ctlhma.fsf@gmail.com> Date: Tue, 22 Dec 2020 17:18:21 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2607:f8b0:4864:20::f34; envelope-from=gusbrs.2016@gmail.com; helo=mail-qv1-xf34.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marco Wahl , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.22 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=YshkIkK7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 915EC9404C5 X-Spam-Score: -1.22 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0aVF4lWo73wD Hi Bastien, Hi Marco, On Fri, 04 Sep 2020 at 14:37, Bastien wrote: > Hi Gustavo, > > Gustavo Barros writes: > >> I do think my other workaround is worth pondering to be included, so >> that this would work out-of-the-box. Do you see any particular >> drawbacks of setting these bindings directly (that is, not by >> remapping) >> in `org-mode-map'? > > You mean by adding something like > > (org-defkey org-mode-map (kbd "C-a") #'org-beginning-of-line) > > in org-keys.el? I'm pretty sure such "hard" remapping breaks an Emacs > convention--I'll ask emacs-devel, because that would indeed fix the > problem you are reporting. > > Thanks for insisting, I've been playing with 'mwim.el' today, and came up with something that might be interesting. Btw, Bastien, I've seen the message you've sent to emacs-devel about this. Thank you. A pity it doesn't seem to have drawn much attention. Anyway, what I came up is a slight variation from Marco's approach, which may be just general enough to be employed by Org. #+begin_src emacs-lisp (add-hook 'visual-line-mode-hook #'my/visual-line-mode-hook-for-org) (defun my/visual-line-mode-hook-for-org () (when (and (derived-mode-p 'org-mode) visual-line-mode) ;; Ensure 'visual-line-mode' does not shadow Org's line commands. (local-set-key [remap move-beginning-of-line] nil) (local-set-key [remap move-end-of-line] nil) (local-set-key [remap kill-line] nil))) #+end_src I've lightly tested this here and it seems to be working. WDYT? Best regards, Gustavo.