From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kelling Subject: Re: [PATCH] Make the point visible when jumping to the mark Date: Sun, 15 Sep 2013 10:25:00 -0700 Message-ID: <5235ED6C.50101@gmail.com> References: <52357C3B.4080605@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020405030906060200010500" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLG4N-0002Om-E7 for emacs-orgmode@gnu.org; Sun, 15 Sep 2013 13:25:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLG4F-0003NI-0d for emacs-orgmode@gnu.org; Sun, 15 Sep 2013 13:25:11 -0400 Received: from mail-pd0-x229.google.com ([2607:f8b0:400e:c02::229]:53482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLG4E-0003Io-Nz for emacs-orgmode@gnu.org; Sun, 15 Sep 2013 13:25:02 -0400 Received: by mail-pd0-f169.google.com with SMTP id r10so3231097pdi.28 for ; Sun, 15 Sep 2013 10:25:01 -0700 (PDT) In-Reply-To: <52357C3B.4080605@gmail.com> 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'" This is a multi-part message in MIME format. --------------020405030906060200010500 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Updated patch. Tiny commit message format fix. --------------020405030906060200010500 Content-Type: text/x-patch; name="0001-Make-the-point-visible-when-jumping-to-the-mark.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Make-the-point-visible-when-jumping-to-the-mark.patch" >From c46db11ffe0cc0f92222b4fbd5a1ede2b4be0175 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 15 Sep 2013 00:32:08 -0700 Subject: [PATCH] Make the point visible when jumping to the mark * lisp/org.el: advise `pop-global-mark', `exchange-point-and-mark', and `pop-global-mark' with `org-show-context', as appropriate. TINYCHANGE --- lisp/org.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 8e970a1..30b87d9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -23903,6 +23903,27 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]." (outline-invisible-p))) (org-show-context 'bookmark-jump))) +(eval-after-load "simple" + '(defadvice set-mark-command (after org-make-visible activate) + "Make the point visible with `org-show-context'." + (org-mark-jump-unhide))) + +(eval-after-load "simple" + '(defadvice exchange-point-and-mark (after org-make-visible activate) + "Make the point visible with `org-show-context'." + (org-mark-jump-unhide))) + +(eval-after-load "simple" + '(defadvice pop-global-mark (after org-make-visible activate) + "Make the point visible with `org-show-context'." + (org-mark-jump-unhide))) + +(defun org-mark-jump-unhide () + "Make the point visible with `org-show-context' after jumping to the mark." + (and (derived-mode-p 'org-mode) + (outline-invisible-p) + (org-show-context 'mark-goto))) + ;; Make session.el ignore our circular variable (defvar session-globals-exclude) (eval-after-load "session" -- 1.8.3.1 --------------020405030906060200010500--