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: Wed, 21 May 2014 12:01:29 -0700 Message-ID: <87lhtvufau.fsf@treetowl.lan> References: <874n1aq9y5.fsf@treetowl.lan> <87lhtvwakr.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnBmr-0007fR-Av for emacs-orgmode@gnu.org; Wed, 21 May 2014 15:02:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnBmm-000561-OX for emacs-orgmode@gnu.org; Wed, 21 May 2014 15:02:49 -0400 In-Reply-To: <87lhtvwakr.fsf@bzg.ath.cx> (Bastien's message of "Wed, 21 May 2014 15:00:36 +0200") 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: Bastien Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Bastien writes: > The formatting of the Changelog message not good. > > It should be > > * org.el: Advise commands which jump to the mark. > > See http://orgmode.org/worg/org-contribute.html and example in > the git logs. > My mistake. Fixed in the attached patch. >> +(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))) > > Why this one? The user don't want to use C-SPC in hidden parts. Yes, I agree. They want to use C-u C-SPC to go to hidden parts. I've updated the patch to advise pop-to-mark-command instead. It is attached. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Make-the-point-visible-when-jumping-to-the-mark.patch >From ead59ed465eb33e822dd69f6e34b087477ebc239 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 30 Apr 2014 21:54:08 -0700 Subject: [PATCH] Make the point visible when jumping to the mark * org.el: Advise commands which jump to the mark --- lisp/org.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 40e16ea..17f7997 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -24510,6 +24510,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 pop-to-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." + (when (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.7.10.4 --=-=-=--