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 mPaFMb9FIF84AgAA0tVLHw (envelope-from ) for ; Tue, 28 Jul 2020 15:35:27 +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 gOc4Lb9FIF8JYgAAbx9fmQ (envelope-from ) for ; Tue, 28 Jul 2020 15:35:27 +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 419C89402D1 for ; Tue, 28 Jul 2020 15:35:27 +0000 (UTC) Received: from localhost ([::1]:44166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0RdV-0002cU-Mv for larch@yhetil.org; Tue, 28 Jul 2020 11:35:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0Rd9-0002cL-BK for emacs-orgmode@gnu.org; Tue, 28 Jul 2020 11:35:03 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:36496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k0Rd7-0003hb-PT for emacs-orgmode@gnu.org; Tue, 28 Jul 2020 11:35:03 -0400 Received: by mail-ej1-x62a.google.com with SMTP id kq25so8141880ejb.3 for ; Tue, 28 Jul 2020 08:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version; bh=B3C3xCvW5fION+h5sYjeF3WQ51yjA8ojWLPJ3NcQkSw=; b=nIhnWdKt8+GMm/e/0DM+3raBC1rZdorkv4DLQmAME4l8xiBDM9er+R4MHCACkT89Tq NgSs1S2QGKI0PuyTCa0KQygfqgixF/uUXIi1bT4pw9M6QQ5ksSwjRShZsTTPOsV28JOl MVD2EVHT24J3o8y8hJULiFgZfgX6RuNRQkGjX79tI1ikSvxeQQnNcNw4bOslKjmePd/+ pINqhCFYRa6IFFzbkyIOJbAP2/QXuJ0G3uXzgxkjZF+JyZNYY7kX96+mAm1HIHtlVXbt ppq5imveJsxnYrCumH6XWTErKe+r10iwP3fdMOmbcqZA6u9zjmfcUiXVG5iwYHwIAK2i JDmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=B3C3xCvW5fION+h5sYjeF3WQ51yjA8ojWLPJ3NcQkSw=; b=DpnivUfOHwvqvEfOFEPEml3oeP9MC0N4PIRWr2/xuuQuwcYe1900vCvF+YDKKVNeoJ McKzWyv6uDUOyQ407r+/nHidkytReBizR4Z6CxqSyWEvi6XvLeD+wCfJ6IA7/WVOd9kK vjRf0MAqK1SLI/4HOtvN4ZEW9rEEoMLmSpCFnOJAqLPc0Up3dn3DGW0NmmGIdMNeyK64 mAwlGtOkajcd7wi4Tbt+jHYa//gEAOIbq6ggXRjyhE9XN0xGjLX+9ns5yOCa/pEGFQEU hZ850oGTnuh6NaxlFs54MVITBcl4SDDWM4tlFrzCA1qijmfOtZCkq3KM+YnutyYfd6cT TFSw== X-Gm-Message-State: AOAM533Qt19ixFgLAtVu+1qMLQFrUdda+aueBqCMHTyXvUZnBNFk8AMV fi5l+tUOuxnxsGMBvYKV3vE= X-Google-Smtp-Source: ABdhPJyUNdFj1eDXoRNyBAJsibuKIWwAEKnZRwfl3i6WTCUCjF/JHjsRt4MHAfdkOkh70PRuY4nfag== X-Received: by 2002:a17:906:17cc:: with SMTP id u12mr25397502eje.344.1595950500235; Tue, 28 Jul 2020 08:35:00 -0700 (PDT) Received: from aspire-5942 (p200300ecdf44184a2164d320967663d4.dip0.t-ipconnect.de. [2003:ec:df44:184a:2164:d320:9676:63d4]) by smtp.gmail.com with ESMTPSA id w22sm9401570ejj.123.2020.07.28.08.34.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jul 2020 08:34:59 -0700 (PDT) From: Marco Wahl To: emacs-orgmode@gnu.org 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: <87a6zkv3m2.fsf@gmail.com> (Gustavo Barros's message of "Mon, 27 Jul 2020 22:18:45 -0300") References: <87a6zkv3m2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 28 Jul 2020 17:34:58 +0200 Message-ID: <87zh7jfyal.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=marcowahlsoft@gmail.com; helo=mail-ej1-x62a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=nIhnWdKt; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -1.71 X-TUID: 5zn6t6FGu7vE Hi Gustavo, > The Org line commands -- `org-beginning-of-line', `org-end-of-line', and > `org-kill-line' -- all take due care for the presence of > `visual-line-mode' to do the right thing if it is turned on. However, > when `visual-line-mode' is indeed on, the bindings on > `visual-line-mode-map' shadow Org's bindings, so that we actually get > `beginning-of-visual-line', `end-of-visual-line', and `kill-visual-line' > for the usual keybindings, instead of the much nicer specialized Org > commands. > > To check this, start with =emacs -Q=, set load-path to get the proper > version of Org (as your case may be): > > #+begin_src emacs-lisp > (add-to-list 'load-path "~/.emacs.d/elpa/org-plus-contrib-20200727") > #+end_src > > > Then visit an Org file, and enable "M-x visual-line-mode", and check the > bindings with "C-h k C-a", "C-h k C-e", and "C-h k C-k" to get: > > #+begin_example > beginning-of-visual-line > end-of-visual-line > kill-visual-line > #+end_example > > I'm not sure this is a "bug", strictly speaking, or if it is correct > unfortunate behavior. Anyway, is there something that could be done > from Org's side? Also not sure if this is a bug. But you can configure the desired behavior by hooking in at activation of visual line mode AFAICS. You could e.g. add --8<---------------cut here---------------start------------->8--- (add-hook 'visual-line-mode-hook (lambda () (when (derived-mode-p 'org-mode) (local-set-key (kbd "C-a") #'org-beginning-of-line) (local-set-key (kbd "C-e") #'org-end-of-line) (local-set-key (kbd "C-k") #'org-kill-line)))) --8<---------------cut here---------------end--------------->8--- to your config. Best, -- Marco