From mboxrd@z Thu Jan 1 00:00:00 1970 From: Le Wang Subject: `session-jump-to-last-change' and org-mode Date: Wed, 16 Mar 2011 23:18:38 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf307f344a302f81049e9b0fe4 Return-path: Received: from [140.186.70.92] (port=41666 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzsUl-0000S0-2D for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 11:18:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzsUi-0002bF-DK for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 11:18:42 -0400 Received: from mail-vw0-f52.google.com ([209.85.212.52]:54598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzsUi-0002ab-Ag for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 11:18:40 -0400 Received: by vws16 with SMTP id 16so2235784vws.39 for ; Wed, 16 Mar 2011 08:18:38 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Orgmode Mailing List --20cf307f344a302f81049e9b0fe4 Content-Type: text/plain; charset=ISO-8859-1 Hi, One of my favorite key cords is C-xC-/, which is bound to `session-jump-to-last-change' from session.el ( http://emacs-session.sourceforge.net/). If I'm editing a large file, it allows me to revisit all the locations that I've "touched". However, when the related section is folded in org-mode, the point only moves to the heading. How hard would it be to have the section automatically expanded? -- Le --20cf307f344a302f81049e9b0fe4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

One of my favorite key cords is C-xC-/, which is bound to `sessi= on-jump-to-last-change' from session.el (http://emacs-session.sourceforge.net/).=A0 If I'= ;m editing a large file, it allows me to revisit all the locations that I&#= 39;ve "touched".=A0 However, when the related section is folded i= n org-mode, the point only moves to the heading.

How hard would it be to have the section automatically expanded?

--
Le
--20cf307f344a302f81049e9b0fe4-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: `session-jump-to-last-change' and org-mode Date: Wed, 16 Mar 2011 09:13:35 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=55942 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PztM0-0001Hn-5P for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 12:13:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PztLs-00006u-UN for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 12:13:37 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:54957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PztLs-00006q-Rw for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 12:13:36 -0400 Received: by gyg10 with SMTP id 10so902809gyg.0 for ; Wed, 16 Mar 2011 09:13:36 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Le Wang Cc: Orgmode Mailing List You can defadvice it to do org-reveal in org buffers. Or wrap it. -- AIDS 2.0 is here now: http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html I support the Whittemore-Peterson Institute (WPI) === I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV paper. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Le Wang Subject: Re: `session-jump-to-last-change' and org-mode Date: Thu, 17 Mar 2011 00:27:06 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec501669d022549049e9c04ef Return-path: Received: from [140.186.70.92] (port=36297 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PztZ6-0007Xx-07 for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 12:27:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PztYx-0002T0-QD for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 12:27:09 -0400 Received: from mail-vw0-f52.google.com ([209.85.212.52]:45578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PztYx-0002Sv-Mv for emacs-orgmode@gnu.org; Wed, 16 Mar 2011 12:27:07 -0400 Received: by vws16 with SMTP id 16so2317297vws.39 for ; Wed, 16 Mar 2011 09:27:07 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: Orgmode Mailing List --bcaec501669d022549049e9c04ef Content-Type: text/plain; charset=ISO-8859-1 Yes, I didn't know about `org-reveal'. That could work. But how do I figure out if I need to expand the heading? The last change could be to a folded heading itself, in which case, it shouldn't be expanded. Is there a org-goto-char type of function that always goes to that location in the buffer, expanding sections along the way? On Thu, Mar 17, 2011 at 12:13 AM, Samuel Wales wrote: > You can defadvice it to do org-reveal in org buffers. > > Or wrap it. > > -- > AIDS 2.0 is here now: > > http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html > I support the Whittemore-Peterson Institute (WPI) > === > I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV > paper. > -- Le --bcaec501669d022549049e9c04ef Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes, I didn't know about `org-reveal'.=A0 That could work.=A0 But h= ow do I figure out if I need to expand the heading?=A0 The last change coul= d be to a folded heading itself, in which case, it shouldn't be expande= d.

Is there a org-goto-char type of function that always goes to that loca= tion in the buffer, expanding sections along the way?



On Thu, Mar 17, 2011 at 12:13 AM, Samuel Wales <samologist@gmail.com= > wrote:
You can defadvice it to do org-reveal in or= g buffers.

Or wrap it.

--
AIDS 2.0 is here now:
=A0http://thekafkapandemic.= blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
I support the Whittemore-Peterson Institute (WPI)
=3D=3D=3D
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV pa= per.



--
Le
--bcaec501669d022549049e9c04ef-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Le Wang Subject: Re: `session-jump-to-last-change' and org-mode Date: Thu, 17 Mar 2011 14:20:23 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf307f341416a67c049ea7a813 Return-path: Received: from [140.186.70.92] (port=59684 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q06ZN-0003iz-R8 for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 02:20:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q06ZM-00013O-HC for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 02:20:25 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:55124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q06ZM-00013J-CQ for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 02:20:24 -0400 Received: by vws4 with SMTP id 4so2917737vws.0 for ; Wed, 16 Mar 2011 23:20:23 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: Orgmode Mailing List --20cf307f341416a67c049ea7a813 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Mar 17, 2011 at 12:27 AM, Le Wang wrote: > Yes, I didn't know about `org-reveal'. That could work. But how do I > figure out if I need to expand the heading? The last change could be to a > folded heading itself, in which case, it shouldn't be expanded. > > Is there a org-goto-char type of function that always goes to that location > in the buffer, expanding sections along the way? I've solved it by advising goto-char like so: (defadvice goto-char (around org-expand activate compile) (if (eq major-mode 'org-mode) (progn ad-do-it (org-reveal) ad-do-it) ad-do-it)) Can anyone see any problems with advising such a fundamental function? -- Le --20cf307f341416a67c049ea7a813 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Mar 17, 2011 at 12:27 AM, Le Wang <l26wang@gmail.com&= gt; wrote:
Yes, I didn't know about `org-reveal'.=A0 That could work.=A0 But h= ow do I figure out if I need to expand the heading?=A0 The last change coul= d be to a folded heading itself, in which case, it shouldn't be expande= d.

Is there a org-goto-char type of function that always goes to that loca= tion in the buffer, expanding sections along the way?

= I've solved it by advising goto-char like so:

(defadvice goto-char (around org-expand activate compile)
=A0 (if (eq ma= jor-mode 'org-mode)
=A0=A0=A0=A0=A0 (progn
=A0=A0=A0=A0=A0=A0=A0 = ad-do-it
=A0=A0=A0=A0=A0=A0=A0 (org-reveal)
=A0=A0=A0=A0=A0=A0=A0 ad-= do-it)
=A0=A0=A0 ad-do-it))
=A0
Can anyone see any p= roblems with advising such a fundamental function?

--
Le
--20cf307f341416a67c049ea7a813-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: `session-jump-to-last-change' and org-mode Date: Thu, 17 Mar 2011 08:02:28 +0100 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=40156 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q07EA-000624-K9 for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 03:02:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q07E9-0001by-7X for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 03:02:34 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:44634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q07E9-0001bu-24 for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 03:02:33 -0400 Received: by wyf19 with SMTP id 19so2715432wyf.0 for ; Thu, 17 Mar 2011 00:02:32 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Le Wang Cc: Orgmode Mailing List On 17.3.2011, at 07:20, Le Wang wrote: > On Thu, Mar 17, 2011 at 12:27 AM, Le Wang wrote: > Yes, I didn't know about `org-reveal'. That could work. But how do I = figure out if I need to expand the heading? The last change could be to = a folded heading itself, in which case, it shouldn't be expanded. >=20 > Is there a org-goto-char type of function that always goes to that = location in the buffer, expanding sections along the way? >=20 > I've solved it by advising goto-char like so: >=20 > (defadvice goto-char (around org-expand activate compile) > (if (eq major-mode 'org-mode) > (progn > ad-do-it > (org-reveal) > ad-do-it) > ad-do-it)) > =20 > Can anyone see any problems with advising such a fundamental function? Yes, this is certainly a very bad idea. goto-char is used many times in = lisp programs, also in Org, so executing normal Org functions will be = slowed down and reveal parts that should not be revealed. Instead you should be advising session-jump-to-last-change itself. If you do not want to expand a full entry if the change was in=20 a headline, you can check for invisibility: (defadvice session-jump-to-last-change (after org-expand activate = compile) "Reveal hidden point after jumping." (when (and (eq major-mode 'org-mode) (outline-invisible-p)) (org-reveal))) HTH - Carsten= From mboxrd@z Thu Jan 1 00:00:00 1970 From: Le Wang Subject: Re: `session-jump-to-last-change' and org-mode Date: Thu, 17 Mar 2011 16:53:21 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec501669d2740a3049ea9cbbb Return-path: Received: from [140.186.70.92] (port=39946 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q08xP-0002Ns-Vi for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 04:53:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q08xO-000676-KN for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 04:53:23 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:33604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q08xO-000671-Hw for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 04:53:22 -0400 Received: by vws4 with SMTP id 4so3006677vws.0 for ; Thu, 17 Mar 2011 01:53:22 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Orgmode Mailing List --bcaec501669d2740a3049ea9cbbb Content-Type: text/plain; charset=ISO-8859-1 On Thu, Mar 17, 2011 at 3:02 PM, Carsten Dominik wrote: > (defadvice session-jump-to-last-change (after org-expand activate compile) > "Reveal hidden point after jumping." > (when (and (eq major-mode 'org-mode) > (outline-invisible-p)) > (org-reveal))) > Thanks Carsten! That's xactly what I wanted. I'll coordinate with session's author to get this change integrated. -- Le --bcaec501669d2740a3049ea9cbbb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Mar 17, 2011 at 3:02 PM, Carsten Dominik= <carsten= .dominik@gmail.com> wrote:
(defadvice session-jump-to-last-change (after org-expand ac= tivate compile)
=A0"Reveal hidden point after jumping."
=A0(when (and (eq major-mode 'org-mode)
=A0 =A0 =A0 =A0 =A0 =A0 (outline-invisible-p))
=A0 =A0(org-reveal)))

Thanks Carsten!=A0 That'= ;s xactly what I wanted.=A0 I'll coordinate with session's author t= o get this change integrated.

--
Le
--bcaec501669d2740a3049ea9cbbb-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: `session-jump-to-last-change' and org-mode Date: Thu, 17 Mar 2011 10:27:50 -0400 Message-ID: <8120.1300372070@alphaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=57499 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0EBX-0000EF-IG for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 10:28:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0EBW-0002Ax-Hf for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 10:28:19 -0400 Received: from vms173005pub.verizon.net ([206.46.173.5]:38130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0EBW-0002Ap-9m for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 10:28:18 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LI700LLPHIFXE10@vms173005.mailsrvcs.net> for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 09:27:57 -0500 (CDT) In-reply-to: Message from Le Wang of "Thu\, 17 Mar 2011 16\:53\:21 +0800." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Le Wang Cc: nicholas.dokos@hp.com, Orgmode Mailing List , Carsten Dominik Le Wang wrote: > On Thu, Mar 17, 2011 at 3:02 PM, Carsten Dominik wrote: >=20 > (defadvice session-jump-to-last-change (after org-expand activate com= pile) > =C2=A0"Reveal hidden point after jumping." > =C2=A0(when (and (eq major-mode 'org-mode) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (outline-invisible-p)) > =C2=A0 =C2=A0(org-reveal))) >=20 > Thanks Carsten!=C2=A0 That's xactly what I wanted.=C2=A0 I'll coordinate = with session's author to get this > change integrated. >=20 Why would you need to coordinate with the session author about advising a function? It's your own personal advice and you can do whatever you want. Of course, as Carsten pointed out, there is good advice and there is bad advice, and you should only give good advice. But you are not requesting any changes to the session code. You just stick the advice in your .emacs and that's that. Am I missing something? Nick From mboxrd@z Thu Jan 1 00:00:00 1970 From: Le Wang Subject: Re: `session-jump-to-last-change' and org-mode Date: Thu, 17 Mar 2011 22:54:12 +0800 Message-ID: References: <8120.1300372070@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec501669dab06f5049eaed519 Return-path: Received: from [140.186.70.92] (port=34264 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0EoX-0003fg-92 for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 11:08:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0EnL-000167-1h for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 11:07:24 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:38780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0EnK-000163-UJ for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 11:07:23 -0400 Received: by vws4 with SMTP id 4so3357073vws.0 for ; Thu, 17 Mar 2011 08:07:22 -0700 (PDT) In-Reply-To: <8120.1300372070@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: Orgmode Mailing List --bcaec501669dab06f5049eaed519 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Mar 17, 2011 at 10:27 PM, Nick Dokos wrote: > Why would you need to coordinate with the session author about advising > a function? It's your own personal advice and you can do whatever you > want. Of course, as Carsten pointed out, there is good advice and there > is bad advice, and you should only give good advice. But you are not > requesting any changes to the session code. You just stick the advice in > your .emacs and that's that. > > Am I missing something? The defadvice is a hack until session can be changed to not need it. I assume I won't be the only one to ever find this useful. -- Le --bcaec501669dab06f5049eaed519 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Mar 17, 2011 at 10:27 PM, Nick Dokos <nicholas.dokos@= hp.com> wrote:
Why would you need to coordinate with the session author about advising
a function? It's your own personal advice and you can do whatever you want. Of course, as Carsten pointed out, there is good advice and there
is bad advice, and you should only give good advice. But you are not
requesting any changes to the session code. You just stick the advice in your .emacs and that's that.

Am I missing something?=A0

The defadvice is a hack unt= il session can be changed to not need it.=A0 I assume I won't be the on= ly one to ever find this useful.



-= -
Le
--bcaec501669dab06f5049eaed519-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: `session-jump-to-last-change' and org-mode Date: Thu, 17 Mar 2011 18:30:45 +0000 Message-ID: <87ei65ioq2.fsf@ucl.ac.uk> References: <8120.1300372070@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=45920 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0HyK-0008ED-5L for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 14:30:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0HyE-0004oa-Mu for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 14:30:51 -0400 Received: from vscane-a2.ucl.ac.uk ([144.82.108.42]:56231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0HyE-0004oS-Il for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 14:30:50 -0400 In-Reply-To: (Le Wang's message of "Thu, 17 Mar 2011 22:54:12 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Le Wang Cc: nicholas.dokos@hp.com, Orgmode Mailing List Le Wang writes: > On Thu, Mar 17, 2011 at 10:27 PM, Nick Dokos wrote: > >> Why would you need to coordinate with the session author about advising >> a function? It's your own personal advice and you can do whatever you >> want. Of course, as Carsten pointed out, there is good advice and there >> is bad advice, and you should only give good advice. But you are not >> requesting any changes to the session code. You just stick the advice in >> your .emacs and that's that. >> >> Am I missing something? > > > The defadvice is a hack until session can be changed to not need it. I > assume I won't be the only one to ever find this useful. Sure but I don't think it makes sense to customise the behaviour of /session/ for /org/ specific issues? The session code should be kept as general as possible, I would suggest. -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.77.g74268.dirty) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: `session-jump-to-last-change' and org-mode Date: Thu, 17 Mar 2011 21:13:46 +0100 Message-ID: References: <8120.1300372070@alphaville.dokosmarshall.org> <87ei65ioq2.fsf@ucl.ac.uk> Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=49629 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0JZy-0003ZS-H1 for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 16:13:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0JZx-0005hQ-FX for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 16:13:54 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:44158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0JZx-0005hK-36 for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 16:13:53 -0400 Received: by wyf19 with SMTP id 19so3518917wyf.0 for ; Thu, 17 Mar 2011 13:13:52 -0700 (PDT) In-Reply-To: <87ei65ioq2.fsf@ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric S Fraga Cc: nicholas.dokos@hp.com, Orgmode Mailing List , Le Wang On 17.3.2011, at 19:30, Eric S Fraga wrote: > Le Wang writes: >=20 >> On Thu, Mar 17, 2011 at 10:27 PM, Nick Dokos = wrote: >>=20 >>> Why would you need to coordinate with the session author about = advising >>> a function? It's your own personal advice and you can do whatever = you >>> want. Of course, as Carsten pointed out, there is good advice and = there >>> is bad advice, and you should only give good advice. But you are not >>> requesting any changes to the session code. You just stick the = advice in >>> your .emacs and that's that. >>>=20 >>> Am I missing something? >>=20 >>=20 >> The defadvice is a hack until session can be changed to not need it. = I >> assume I won't be the only one to ever find this useful. >=20 > Sure but I don't think it makes sense to customise the behaviour of > /session/ for /org/ specific issues? The session code should be kept = as > general as possible, I would suggest. A good solution would be for session to provide a hook that we can use. - Carsten >=20 > --=20 > : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 > : using Org-mode version 7.5 (release_7.5.77.g74268.dirty) >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Le Wang Subject: Re: `session-jump-to-last-change' and org-mode Date: Wed, 13 Apr 2011 09:59:13 +0800 Message-ID: References: <8120.1300372070@alphaville.dokosmarshall.org> <87ei65ioq2.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9pMS-0005kY-GY for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 21:59:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9pMQ-0002Ic-Lw for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 21:59:16 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:49556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9pMQ-0002IP-J0 for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 21:59:14 -0400 Received: by vxk20 with SMTP id 20so153943vxk.0 for ; Tue, 12 Apr 2011 18:59:13 -0700 (PDT) In-Reply-To: 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: Carsten Dominik Cc: Orgmode Mailing List On Fri, Mar 18, 2011 at 4:13 AM, Carsten Dominik wrote: > A good solution would be for session to provide a hook that we can use. Christoph has submitted version 2.3a of session http://sourceforge.net/projects/emacs-session/files/session/ The required hook has been added, maybe someone who knows org-mode can add it to the appropriate file? >From my .emacs: (add-hook 'session-after-jump-to-last-change-hook (lambda () (when (and (eq major-mode 'org-mode) (outline-invisible-p)) (org-reveal)))) -- Le