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 SA0mNCIQ1V7JXwAA0tVLHw (envelope-from ) for ; Mon, 01 Jun 2020 14:26:42 +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 WGLjLyIQ1V6BKAAAbx9fmQ (envelope-from ) for ; Mon, 01 Jun 2020 14:26:42 +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 B53939404CB for ; Mon, 1 Jun 2020 14:26:41 +0000 (UTC) Received: from localhost ([::1]:38606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jflOi-0000sK-5O for larch@yhetil.org; Mon, 01 Jun 2020 10:26:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jflCy-0002h6-S3 for emacs-orgmode@gnu.org; Mon, 01 Jun 2020 10:14:32 -0400 Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]:34152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jflCx-0007bR-DK for emacs-orgmode@gnu.org; Mon, 01 Jun 2020 10:14:32 -0400 Received: by mail-vs1-xe35.google.com with SMTP id q2so14185vsr.1 for ; Mon, 01 Jun 2020 07:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=pcilK6EE/xzz2U/r4teHwXIIDJ16cYzS5PyX6mtGkDc=; b=DKcrNWSl7gKB7HBjPPRNIXXz9jA4CDbtwTCsW+i7kav9kZuHHfmyYvcUUkIZXWzomR 29p0s044I0aBPvikiiwOtjr8HGEteVeobwPfiAqnzY7zlBxE+T+F0mUBjIoNoiFOiPiB Fx5C2pR5Jld0QgAilwhUfgNIK1YafSv0+CT405jbh8HwzTl2u3xC+DXs70Tek1PR3OsH 1RUoKLV5PLz4IavpwZmN1/gvbAGL4Vj3jZcpWjpzaB4bYkASXr4mYWe5FTyGCFIVjEux S7WhVwcAxywQ8kr/7BLPP1dj3X7TCYQThPmdBNhWqmHTjtcV3fbee/aUDRiSLfJnYA/i vmSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=pcilK6EE/xzz2U/r4teHwXIIDJ16cYzS5PyX6mtGkDc=; b=YPGSn0/WalRd7u7fnLJfK62cAi9kU1psbutMpv5tgb0HriqpSzL8odfh7VmwWOLQp5 mQdB4M2OwbVe0cOD25G57HHwi0UA2DUndJl4xiISptgV5E/k0D2/a0G5IS+ohWruUW4i 0ta/XzOy0aBnTorn5IUxtKpn1bf6H7M+Rf8psQIjGxw3a/C5Dv0MPf4xQmpQxie8sTAh HI7LCr+P2jElu+7uu9CCZViMAtfHoegxOWbJuGuPkRSkQF5ylfgFl2D2LTL38hAzb54v 3egsEvEonfHsfCepTK7gu6dDidVTDUybP7wLF2xadJLVIwVWZ/QZUhl3oWscqZzUfPck 2fCA== X-Gm-Message-State: AOAM532dUYx5bMPVYo8MuHQRW00Q7j4XNX8EWPPxeotlOCP8tSeUWYLW O9aR3Y3b8pUnpjzWkmxmQY6SRKRlwqJ7QqmhJ3ZiqME/xjw= X-Google-Smtp-Source: ABdhPJxUFqwNK0Hyuj719Ib6Ubj/j8k1Ibg6N31ygXSod7IirJM2a+0vL6aTeCZGvWUoyGAcoeT4z1nNlQQM/e4NIlw= X-Received: by 2002:a67:8087:: with SMTP id b129mr14420578vsd.163.1591020869488; Mon, 01 Jun 2020 07:14:29 -0700 (PDT) MIME-Version: 1.0 From: Shankar Rao Date: Mon, 1 Jun 2020 16:14:17 +0200 Message-ID: Subject: [PATCH] Add mode for automatically unhiding emphasis markers in the current region To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000c1923505a7066930" Received-SPF: pass client-ip=2607:f8b0:4864:20::e35; envelope-from=shankar.rao@gmail.com; helo=mail-vs1-xe35.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Mon, 01 Jun 2020 10:26:13 -0400 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=DKcrNWSl; 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: 9T/D3xKv0KC0 --000000000000c1923505a7066930 Content-Type: text/plain; charset="UTF-8" * lisp/org.el: (org-auto-emphasis-unhide-at-point): Parameter that controls the behavior of Org Auto Emphasis mode. It can be one of the values nil, t, and 'right-edge, and works similarly to the parameter `prettify-symbols-unprettify-at-point' for `prettify-symbols-mode'. (org-do-emphasis-faces): When hiding emphasis markers, add additional text properties 'org-emph-start and org-emph-end to the emphasized region. (org-auto-emphasis--current-region-bounds): Local variable containing the bounds of the region whose emphasis markers are currently unhidden. (org-auto-emphasis--get-prop-as-list): Helper function that returns Org Auto Emphasis properties as a list. (org-auto-emphasis--post-command-hook): Function added to `post-command-hook' that rehides emphasis markers for the previous region and unhides emphasis marks for the current region. (org-auto-emphasis-mode): Toggles Org Auto Emphasis mode. Can be added to `org-mode-hook' to be enabled for all org-mode files. This code was adapted from prettify-symbols-mode in prog-mode.el I have not yet signed the papers assigning copyright to the FSF. I sent a request for the papers to assign@gnu.org, but have not yet received a response. Shankar Rao --- lisp/org.el | 98 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 87 insertions(+), 11 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 7ff7ec685..870c5c958 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -3644,6 +3644,19 @@ following symbols: :type 'boolean :safe #'booleanp) +(defcustom org-auto-emphasis-unhide-at-point nil + "If non-nil, unhide the emphasis markers for the region when point is on it. +If set to the symbol `right-edge', also unhide the emphasis +markers if point is immediately after the emphasized region. The +emphasis markers will be rehidden as soon as point moves away +from the region. If set to nil, the emphasis markers remain +hidden even when point is in the region." + :version "25.1" + :type '(choice (const :tag "Never unhide emphasis markers" nil) + (const :tag "Unhide emphasis markers when point is inside" t) + (const :tag "Unhide emphasis markers when point is inside or at right edge" right-edge)) + :group 'org-appearance) + (defcustom org-hide-macro-markers nil "Non-nil mean font-lock should hide the brackets marking macro calls." :group 'org-appearance @@ -5056,12 +5069,77 @@ stacked delimiters is N. Escaping delimiters is not possible." '(font-lock-multiline t org-emphasis t)) (when (and org-hide-emphasis-markers (not (org-at-comment-p))) - (add-text-properties (match-end 4) (match-beginning 5) - '(invisible org-link)) - (add-text-properties (match-beginning 3) (match-end 3) - '(invisible org-link))) + (let ((s1 (match-beginning 3)) + (e1 (match-end 3)) + (s2 (match-end 4)) + (e2 (match-beginning 5))) + (add-text-properties s2 e2 '(invisible org-link)) + (add-text-properties s1 e1 '(invisible org-link)) + (add-text-properties s1 e2 + `(org-emph-start ,s1 org-emph-end ,e2)))) (throw :exit t)))))))) +(defvar-local org-auto-emphasis--current-region-bounds nil) + +(defun org-auto-emphasis--get-prop-as-list (prop) + "Helper function to get org-auto-emphasis properties as a list. +If `org-auto-emphasis-unhide-at-point' is set to `t' then return +the text property PROP at point in a list. If +`org-auto-emphasis-unhide-at-point' is set to `right-edge', the +also include the text property PROP at point-1 unless we are at +the beginning of the buffer." + (remove nil + (list (get-text-property (point) prop) + (when (and (eq org-auto-emphasis-unhide-at-point 'right-edge) + (not (bobp))) + (get-text-property (1- (point)) prop))))) + +(defun org-auto-emphasis--post-command-hook () + ;; Rehide emphasis markers for the previous region. + (when (and org-auto-emphasis--current-region-bounds + (or (< (point) (car org-auto-emphasis--current-region-bounds)) + (> (point) (cadr org-auto-emphasis--current-region-bounds)) + (and (not (eq org-auto-emphasis-unhide-at-point 'right-edge)) + (= (point) (cadr org-auto-emphasis--current-region-bounds))))) + (apply #'font-lock-flush org-auto-emphasis--current-region-bounds) + (setq org-auto-emphasis--current-region-bounds nil)) + ;; Unhide emphasis markers for the current region. + (when-let* ((s (org-auto-emphasis--get-prop-as-list 'org-emph-start)) + (e (org-auto-emphasis--get-prop-as-list 'org-emph-end)) + (s (apply #'min s)) + (e (apply #'max e))) + (with-silent-modifications + (setq org-auto-emphasis--current-region-bounds (list s e)) + (remove-text-properties s (1+ s) '(invisible org-link)) + (remove-text-properties (1- e) e '(invisible org-link))))) + +(define-minor-mode org-auto-emphasis-mode + "Toggle Org Auto Emphasis mode. +This mode, when enabled, unhides emphasis markers for the region +at point, depending on the value of +`org-auto-emphasis-unhide-at-point'. With a prefix argument ARG, +enable Org Auto Emphasis mode if ARG is positive, and disable it +otherwise. If called from Lisp, enable the mode if ARG is +omitted or nil. + +To enable this in all org-mode files, add the following line to init.el: + + (add-hook 'org-mode #'org-auto-emphasis-mode) +" + :init-value nil + (if org-auto-emphasis-mode + ;; Turn on + (progn + (setq-local font-lock-extra-managed-props + (append font-lock-extra-managed-props + '(org-emph-start org-emph-end))) + (when org-auto-emphasis-unhide-at-point + (add-hook 'post-command-hook + #'org-auto-emphasis--post-command-hook nil t)) + (font-lock-flush)) + ;; Turn off + (remove-hook 'post-command-hook #'org-auto-emphasis--post-command-hook t))) + (defun org-emphasize (&optional char) "Insert or change an emphasis, i.e. a font like bold or italic. If there is an active region, change that region to a new emphasis. @@ -20482,16 +20560,15 @@ With ARG, repeats or can move backward if negative." (beginning-of-line)) (_ nil))) (cl-incf arg)) - (while (and (> arg 0) (re-search-forward regexp nil t)) + (while (and (> arg 0) (re-search-forward regexp nil :move)) (pcase (get-char-property-and-overlay (point) 'invisible) (`(outline . ,o) (goto-char (overlay-end o)) - (skip-chars-forward " \t\n") - (end-of-line)) + (end-of-line 2)) (_ (end-of-line))) (cl-decf arg)) - (if (> arg 0) (goto-char (point-max)) (beginning-of-line)))) + (when (/= arg initial-arg) (beginning-of-line)))) (defun org-previous-visible-heading (arg) "Move to the previous visible heading. @@ -20830,11 +20907,10 @@ ones already marked." (set-mark (save-excursion (goto-char (mark)) - (goto-char (org-element-property :end (org-element-at-point))) - (point))) + (goto-char (org-element-property :end (org-element-at-point))))) (let ((element (org-element-at-point))) (end-of-line) - (push-mark (min (point-max) (org-element-property :end element)) t t) + (push-mark (org-element-property :end element) t t) (goto-char (org-element-property :begin element)))))) (defun org-narrow-to-element () -- 2.17.1 --000000000000c1923505a7066930 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
* lisp/org.el:
(o= rg-auto-emphasis-unhide-at-point): Parameter that controls the
behavior = of Org Auto Emphasis mode.=C2=A0 It can be one of the values nil, t, and'right-edge, and works similarly to the parameter
`prettify-symbols= -unprettify-at-point' for `prettify-symbols-mode'.
(org-do-empha= sis-faces): When hiding emphasis markers, add additional
text properties= 'org-emph-start and org-emph-end to the emphasized
region.
(org-= auto-emphasis--current-region-bounds): Local variable containing
the bou= nds of the region whose emphasis markers are currently
unhidden.
(org= -auto-emphasis--get-prop-as-list): Helper function that returns
Org Auto= Emphasis properties as a list.
(org-auto-emphasis--post-command-hook): = Function added to
`post-command-hook' that rehides emphasis markers = for the previous
region and unhides emphasis marks for the current regio= n.
(org-auto-emphasis-mode): Toggles Org Auto Emphasis mode.=C2=A0 Can b= e
added to `org-mode-hook' to be enabled for all org-mode files.
=
This code was adapted from prettify-symbols-mode in prog-mode.el
I have not yet signed the papers assigning copyright to the FSF.=C2=A0 I s= ent a
request for the papers to assign= @gnu.org, but have not yet received a
response.

Shankar Rao
---
=C2=A0lisp/org.el | 98 +++++++++++++++++++++++++++++++++++++++= ++++++++------
=C2=A01 file changed, 87 insertions(+), 11 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 7ff7ec685..870c5c958 = 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3644,6 +3644,19 @@ = following symbols:
=C2=A0 =C2=A0:type 'boolean
=C2=A0 =C2=A0:safe= #'booleanp)
=C2=A0
+(defcustom org-auto-emphasis-unhide-at-point= nil
+ =C2=A0"If non-nil, unhide the emphasis markers for the regio= n when point is on it.
+If set to the symbol `right-edge', also unhi= de the emphasis
+markers if point is immediately after the emphasized re= gion.=C2=A0 The
+emphasis markers will be rehidden as soon as point move= s away
+from the region.=C2=A0 If set to nil, the emphasis markers remai= n
+hidden even when point is in the region."
+ =C2=A0:version &q= uot;25.1"
+ =C2=A0:type '(choice (const :tag "Never unhide= emphasis markers" nil)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 (const :tag "Unhide emphasis markers when point is insi= de" t)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (c= onst :tag "Unhide emphasis markers when point is inside or at right ed= ge" right-edge))
+ =C2=A0:group 'org-appearance)
+
=C2=A0= (defcustom org-hide-macro-markers nil
=C2=A0 =C2=A0"Non-nil mean fo= nt-lock should hide the brackets marking macro calls."
=C2=A0 =C2= =A0:group 'org-appearance
@@ -5056,12 +5069,77 @@ stacked delimiters= is N.=C2=A0 Escaping delimiters is not possible."
=C2=A0 =C2=A0 &#= 39;(font-lock-multiline t org-emphasis t))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(w= hen (and org-hide-emphasis-markers
=C2=A0 (not (org-at-comment-p)))
-= (add-text-properties (match-end 4) (match-beginning 5)
- =C2=A0 =C2=A0 = '(invisible org-link))
- (add-text-properties (match-beginning 3) (m= atch-end 3)
- =C2=A0 =C2=A0 '(invisible org-link)))
+ (let ((s1 (= match-beginning 3))
+ =C2=A0 =C2=A0 =C2=A0(e1 (match-end 3))
+ =C2=A0= =C2=A0 =C2=A0(s2 (match-end 4))
+ =C2=A0 =C2=A0 =C2=A0(e2 (match-beginn= ing 5)))
+ =C2=A0(add-text-properties s2 e2 '(invisible org-link))+ =C2=A0(add-text-properties s1 e1 '(invisible org-link))
+ =C2=A0= (add-text-properties s1 e2
+ =C2=A0 =C2=A0 =C2=A0 `(org-emph-start ,s1 o= rg-emph-end ,e2))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(throw :exit t))))))))=C2=A0
+(defvar-local org-auto-emphasis--current-region-bounds nil)
= +
+(defun org-auto-emphasis--get-prop-as-list (prop)
+ =C2=A0"He= lper function to get org-auto-emphasis properties as a list.
+If `org-au= to-emphasis-unhide-at-point' is set to `t' then return
+the text= property PROP at point in a list. If
+`org-auto-emphasis-unhide-at-poin= t' is set to `right-edge', the
+also include the text property P= ROP at point-1 unless we are at
+the beginning of the buffer."
+= =C2=A0(remove nil
+ =C2=A0(list (get-text-property (point) prop)
+ (= when (and (eq org-auto-emphasis-unhide-at-point 'right-edge)
+ =C2= =A0 (not (bobp)))
+ =C2=A0(get-text-property (1- (point)) prop)))))
+=
+(defun org-auto-emphasis--post-command-hook ()
+ =C2=A0;; Rehide em= phasis markers for the previous region.
+ =C2=A0(when (and org-auto-emph= asis--current-region-bounds
+ =C2=A0 =C2=A0 (or (< (point) (car org-a= uto-emphasis--current-region-bounds))
+ (> (point) (cadr org-auto-emp= hasis--current-region-bounds))
+ (and (not (eq org-auto-emphasis-unhide-= at-point 'right-edge))
+ =C2=A0 =C2=A0 =C2=A0(=3D (point) (cadr org-= auto-emphasis--current-region-bounds)))))
+ (apply #'font-lock-flush= org-auto-emphasis--current-region-bounds)
+ (setq org-auto-emphasis--cu= rrent-region-bounds nil))
+ =C2=A0;; Unhide emphasis markers for the cur= rent region.
+ =C2=A0(when-let* ((s (org-auto-emphasis--get-prop-as-list= 'org-emph-start))
+ =C2=A0 =C2=A0 =C2=A0(e (org-auto-emphasis--get-= prop-as-list 'org-emph-end))
+ =C2=A0 =C2=A0 =C2=A0(s (apply #'m= in s))
+ =C2=A0 =C2=A0 =C2=A0(e (apply #'max e)))
+ =C2=A0 =C2=A0= (with-silent-modifications
+ =C2=A0 =C2=A0 =C2=A0(setq org-auto-emphasis= --current-region-bounds (list s e))
+ =C2=A0 =C2=A0 =C2=A0(remove-text-p= roperties s (1+ s) '(invisible org-link))
+ =C2=A0 =C2=A0 =C2=A0(rem= ove-text-properties (1- e) e '(invisible org-link)))))
+
+(define= -minor-mode org-auto-emphasis-mode
+ =C2=A0"Toggle Org Auto Emphasi= s mode.
+This mode, when enabled, unhides emphasis markers for the regio= n
+at point, depending on the value of
+`org-auto-emphasis-unhide-at-= point'. With a prefix argument ARG,
+enable Org Auto Emphasis mode i= f ARG is positive, and disable it
+otherwise.=C2=A0 If called from Lisp,= enable the mode if ARG is
+omitted or nil.
+
+To enable this in a= ll org-mode files, add the following line to init.el:
+
+ =C2=A0(add-= hook 'org-mode #'org-auto-emphasis-mode)
+"
+ =C2=A0:ini= t-value nil
+ =C2=A0(if org-auto-emphasis-mode
+ =C2=A0 =C2=A0 =C2=A0= ;; Turn on
+ =C2=A0 =C2=A0 =C2=A0(progn
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= (setq-local font-lock-extra-managed-props
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(append font-lock-extra-managed-pr= ops
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'(org-emph-start org-emph-end)))
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0(when org-auto-emphasis-unhide-at-point
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(add-hook 'post-command-hook
+ =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#'org-au= to-emphasis--post-command-hook nil t))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0(fon= t-lock-flush))
+ =C2=A0 =C2=A0;; Turn off
+ =C2=A0 =C2=A0(remove-hook= 'post-command-hook #'org-auto-emphasis--post-command-hook t)))
= +
=C2=A0(defun org-emphasize (&optional char)
=C2=A0 =C2=A0"= Insert or change an emphasis, i.e. a font like bold or italic.
=C2=A0If = there is an active region, change that region to a new emphasis.
@@ -204= 82,16 +20560,15 @@ With ARG, repeats or can move backward if negative."= ;
=C2=A0 =C2=A0 (beginning-of-line))
=C2=A0 =C2=A0(_ nil)))
=C2=A0= =C2=A0 =C2=A0 =C2=A0(cl-incf arg))
- =C2=A0 =C2=A0(while (and (> arg= 0) (re-search-forward regexp nil t))
+ =C2=A0 =C2=A0(while (and (> a= rg 0) (re-search-forward regexp nil :move))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(= pcase (get-char-property-and-overlay (point) 'invisible)
=C2=A0 (`(o= utline . ,o)
=C2=A0 (goto-char (overlay-end o))
- (skip-chars-forward= " \t\n")
- (end-of-line))
+ (end-of-line 2))
=C2=A0 (_<= br>=C2=A0 (end-of-line)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(cl-decf arg))
-= =C2=A0 =C2=A0(if (> arg 0) (goto-char (point-max)) (beginning-of-line))= ))
+ =C2=A0 =C2=A0(when (/=3D arg initial-arg) (beginning-of-line))))=C2=A0
=C2=A0(defun org-previous-visible-heading (arg)
=C2=A0 =C2=A0= "Move to the previous visible heading.
@@ -20830,11 +20907,10 @@ on= es already marked."
=C2=A0 (set-mark
=C2=A0 (save-excursion
= =C2=A0 =C2=A0 (goto-char (mark))
- =C2=A0 (goto-char (org-element-proper= ty :end (org-element-at-point)))
- =C2=A0 (point)))
+ =C2=A0 (goto-ch= ar (org-element-property :end (org-element-at-point)))))
=C2=A0 =C2=A0 = =C2=A0 =C2=A0(let ((element (org-element-at-point)))
=C2=A0 (end-of-line= )
- (push-mark (min (point-max) (org-element-property :end element)) t t= )
+ (push-mark (org-element-property :end element) t t)
=C2=A0 (goto-= char (org-element-property :begin element))))))
=C2=A0
=C2=A0(defun o= rg-narrow-to-element ()
--
2.17.1
--000000000000c1923505a7066930--