* saving state of buffer @ 2013-03-20 11:19 42 147 2013-03-20 13:49 ` Bastien 0 siblings, 1 reply; 24+ messages in thread From: 42 147 @ 2013-03-20 11:19 UTC (permalink / raw) To: emacs-orgmode How would I save the state of the headlines? e.g.,: * Books * Movies * Music ** Analysis *** Classical **** Composers ***** Beethoven ****** Eroica ******* II. Marcia funebre: Adagio assai ******** General Comments ********* Climax of the Movement The climax of the movement for me is the sudden prominence of the French Horn at measures 136 - 140 (9:21 - 9:36, Bernstein). . . . When I return to this buffer, I want all of this to be opened. The problem with the Emacs bookmarks is that the headlines get completely garbled. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-20 11:19 saving state of buffer 42 147 @ 2013-03-20 13:49 ` Bastien 2013-03-20 17:00 ` 42 147 0 siblings, 1 reply; 24+ messages in thread From: Bastien @ 2013-03-20 13:49 UTC (permalink / raw) To: 42 147; +Cc: emacs-orgmode Hi Fourtytwo, 42 147 <aeuster@gmail.com> writes: > When I return to this buffer, I want all of this to be opened. (info "(Org)Visibility cycling") When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top level headlines are visible. This can be configured through the variable 'org-startup-folded', or on a per-file basis by adding one of the following lines anywhere in the buffer: #+STARTUP: overview #+STARTUP: content #+STARTUP: showall #+STARTUP: showeverything The startup visibility options are ignored when the file is open for the first time during the agenda generation: if you want the agenda to honor the startup visibility, set 'org-agenda-inhibit-startup' to nil. Furthermore, any entries with a 'VISIBILITY' property (*note Properties and Columns::) will get their visibility adapted accordingly. Allowed values for this property are 'folded', 'children', 'content', and 'all'. 'C-u C-u <TAB>' ('org-set-startup-visibility') Switch back to the startup visibility of the buffer, i.e., whatever is requested by startup options and 'VISIBILITY' properties in individual entries. HTH, -- Bastien ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-20 13:49 ` Bastien @ 2013-03-20 17:00 ` 42 147 2013-03-20 17:09 ` Christoph 2013-03-20 18:28 ` 42 147 0 siblings, 2 replies; 24+ messages in thread From: 42 147 @ 2013-03-20 17:00 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1935 bytes --] Apologies on behalf of my inferior cognitive faculty, but I do not see a solution to my problem in those options (perhaps merely a means to it). Between OVERVIEW, CONTENT, SHOWALL, SHOWEVERYTHING, which == "allow me to save and reopen the buffer in its current configuration." From what I can gather from limited reading comprehension, these are still general settings, i.e., ALL headlines will be opened; ALL drawers will be opened; ALL text will be exposed. What I want is to just have those things exposed that I exposed in my particular session. mit freundlichen Grüßen, 42 2013/3/20 Bastien <bzg@altern.org> > Hi Fourtytwo, > > 42 147 <aeuster@gmail.com> writes: > > > When I return to this buffer, I want all of this to be opened. > > (info "(Org)Visibility cycling") > > When Emacs first visits an Org file, the global state is set to > OVERVIEW, i.e., only the top level headlines are visible. This can be > configured through the variable 'org-startup-folded', or on a per-file > basis by adding one of the following lines anywhere in the buffer: > > #+STARTUP: overview > #+STARTUP: content > #+STARTUP: showall > #+STARTUP: showeverything > > The startup visibility options are ignored when the file is open for > the first time during the agenda generation: if you want the agenda to > honor the startup visibility, set 'org-agenda-inhibit-startup' to nil. > > Furthermore, any entries with a 'VISIBILITY' property (*note Properties and > Columns::) will get their visibility adapted accordingly. Allowed values > for > this property are 'folded', 'children', 'content', and 'all'. 'C-u C-u > <TAB>' ('org-set-startup-visibility') > Switch back to the startup visibility of the buffer, i.e., whatever is > requested by startup options and 'VISIBILITY' properties in individual > entries. > > HTH, > > -- > Bastien > [-- Attachment #2: Type: text/html, Size: 2491 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-20 17:00 ` 42 147 @ 2013-03-20 17:09 ` Christoph 2013-03-20 18:28 ` 42 147 1 sibling, 0 replies; 24+ messages in thread From: Christoph @ 2013-03-20 17:09 UTC (permalink / raw) To: emacs-orgmode On 03/20/2013 06:00 PM, 42 147 wrote: > Apologies on behalf of my inferior cognitive faculty, but I do not see a > solution to my problem in those options (perhaps merely a means to it). > > Between OVERVIEW, CONTENT, SHOWALL, SHOWEVERYTHING, which == "allow me to > save and reopen the buffer in its current configuration." > > From what I can gather from limited reading comprehension, these are still > general settings, i.e., ALL headlines will be opened; ALL drawers will be > opened; ALL text will be exposed. > > What I want is to just have those things exposed that I exposed in my > particular session. > (require 'saveplace) (setq-default save-place t) works for me. It just opens the place where I had the point, nothing more, but that's what I need most. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-20 17:00 ` 42 147 2013-03-20 17:09 ` Christoph @ 2013-03-20 18:28 ` 42 147 2013-03-20 18:57 ` Loyall, David 2013-03-21 6:58 ` Carsten Dominik 1 sibling, 2 replies; 24+ messages in thread From: 42 147 @ 2013-03-20 18:28 UTC (permalink / raw) To: Org Mode [-- Attachment #1: Type: text/plain, Size: 2399 bytes --] > (require 'saveplace) > (setq-default save-place t) > works for me. It just opens the place where I had the point, nothing > more, but that's what I need most. This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain extent: all non top-level headlines below point are hidden. At least for me. 2013/3/20 42 147 <aeuster@gmail.com> > Apologies on behalf of my inferior cognitive faculty, but I do not see a > solution to my problem in those options (perhaps merely a means to it). > > Between OVERVIEW, CONTENT, SHOWALL, SHOWEVERYTHING, which == "allow me to > save and reopen the buffer in its current configuration." > > From what I can gather from limited reading comprehension, these are still > general settings, i.e., ALL headlines will be opened; ALL drawers will be > opened; ALL text will be exposed. > > What I want is to just have those things exposed that I exposed in my > particular session. > > mit freundlichen Grüßen, > > 42 > > > 2013/3/20 Bastien <bzg@altern.org> > >> Hi Fourtytwo, >> >> 42 147 <aeuster@gmail.com> writes: >> >> > When I return to this buffer, I want all of this to be opened. >> >> (info "(Org)Visibility cycling") >> >> When Emacs first visits an Org file, the global state is set to >> OVERVIEW, i.e., only the top level headlines are visible. This can be >> configured through the variable 'org-startup-folded', or on a per-file >> basis by adding one of the following lines anywhere in the buffer: >> >> #+STARTUP: overview >> #+STARTUP: content >> #+STARTUP: showall >> #+STARTUP: showeverything >> >> The startup visibility options are ignored when the file is open for >> the first time during the agenda generation: if you want the agenda to >> honor the startup visibility, set 'org-agenda-inhibit-startup' to nil. >> >> Furthermore, any entries with a 'VISIBILITY' property (*note Properties >> and >> Columns::) will get their visibility adapted accordingly. Allowed values >> for >> this property are 'folded', 'children', 'content', and 'all'. 'C-u C-u >> <TAB>' ('org-set-startup-visibility') >> Switch back to the startup visibility of the buffer, i.e., whatever >> is >> requested by startup options and 'VISIBILITY' properties in >> individual >> entries. >> >> HTH, >> >> -- >> Bastien >> > > [-- Attachment #2: Type: text/html, Size: 3215 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-20 18:28 ` 42 147 @ 2013-03-20 18:57 ` Loyall, David 2013-03-21 6:58 ` Carsten Dominik 1 sibling, 0 replies; 24+ messages in thread From: Loyall, David @ 2013-03-20 18:57 UTC (permalink / raw) To: 42 147, Org Mode [-- Attachment #1: Type: text/plain, Size: 3058 bytes --] 42, Try this: Move the point to some headline. Press C-c C-x p v <TAB> <ENTER> a <TAB> <ENTER> Observe how lines, like :PROPERTIES:, were added to your headline. Press C-u C-u <TAB> to simulate closing the file and reopening it. I know that this isn't exactly what you're looking for. You're looking for org-mode to automatically track and save the folding state. I'd like that, too. But maybe this VISIBILITY property will suffice for now. Cheers, --Dave From: emacs-orgmode-bounces+david.loyall=nebraska.gov@gnu.org [mailto:emacs-orgmode-bounces+david.loyall=nebraska.gov@gnu.org] On Behalf Of 42 147 Sent: Wednesday, March 20, 2013 13:28 PM To: Org Mode Subject: Re: [O] saving state of buffer > (require 'saveplace) > (setq-default save-place t) > works for me. It just opens the place where I had the point, nothing > more, but that's what I need most. This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain extent: all non top-level headlines below point are hidden. At least for me. 2013/3/20 42 147 <aeuster@gmail.com<mailto:aeuster@gmail.com>> Apologies on behalf of my inferior cognitive faculty, but I do not see a solution to my problem in those options (perhaps merely a means to it). Between OVERVIEW, CONTENT, SHOWALL, SHOWEVERYTHING, which == "allow me to save and reopen the buffer in its current configuration." From what I can gather from limited reading comprehension, these are still general settings, i.e., ALL headlines will be opened; ALL drawers will be opened; ALL text will be exposed. What I want is to just have those things exposed that I exposed in my particular session. mit freundlichen Grüßen, 42 2013/3/20 Bastien <bzg@altern.org<mailto:bzg@altern.org>> Hi Fourtytwo, 42 147 <aeuster@gmail.com<mailto:aeuster@gmail.com>> writes: > When I return to this buffer, I want all of this to be opened. (info "(Org)Visibility cycling") When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top level headlines are visible. This can be configured through the variable 'org-startup-folded', or on a per-file basis by adding one of the following lines anywhere in the buffer: #+STARTUP: overview #+STARTUP: content #+STARTUP: showall #+STARTUP: showeverything The startup visibility options are ignored when the file is open for the first time during the agenda generation: if you want the agenda to honor the startup visibility, set 'org-agenda-inhibit-startup' to nil. Furthermore, any entries with a 'VISIBILITY' property (*note Properties and Columns::) will get their visibility adapted accordingly. Allowed values for this property are 'folded', 'children', 'content', and 'all'. 'C-u C-u <TAB>' ('org-set-startup-visibility') Switch back to the startup visibility of the buffer, i.e., whatever is requested by startup options and 'VISIBILITY' properties in individual entries. HTH, -- Bastien [-- Attachment #2: Type: text/html, Size: 8641 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-20 18:28 ` 42 147 2013-03-20 18:57 ` Loyall, David @ 2013-03-21 6:58 ` Carsten Dominik 2013-03-21 7:14 ` Marcin Borkowski 2013-03-21 9:05 ` 42 147 1 sibling, 2 replies; 24+ messages in thread From: Carsten Dominik @ 2013-03-21 6:58 UTC (permalink / raw) To: 42 147; +Cc: Org Mode [-- Attachment #1: Type: text/plain, Size: 959 bytes --] On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com> wrote: > > (require 'saveplace) > > (setq-default save-place t) > > > works for me. It just opens the place where I had the point, nothing > > more, but that's what I need most. > > This is more convenient than Emacs bookmarks, but still breaks org-mode to > a certain extent: all non top-level headlines below point are hidden. At > least for me. Org-mode has very precise control for situations when a jump into invisible text happens, for example by isearch or by bookmark-jump or saveplace. Take a look at the variable org-show-siblings and set a special context for bookmark-jump, that should do it. This will work for both saveplace and bookmarks. You can do this with customize, or just like this: (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) There are companion variables, they are all in the customization group org-reveal-context. - Carsten [-- Attachment #2: Type: text/html, Size: 1528 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 6:58 ` Carsten Dominik @ 2013-03-21 7:14 ` Marcin Borkowski 2013-03-21 9:05 ` 42 147 1 sibling, 0 replies; 24+ messages in thread From: Marcin Borkowski @ 2013-03-21 7:14 UTC (permalink / raw) To: emacs-orgmode Dnia 2013-03-21, o godz. 07:58:51 Carsten Dominik <carsten.dominik@gmail.com> napisał(a): > > On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com> wrote: > > > > (require 'saveplace) > > > (setq-default save-place t) > > > > > works for me. It just opens the place where I had the point, > > > nothing more, but that's what I need most. > > > > This is more convenient than Emacs bookmarks, but still breaks > > org-mode to a certain extent: all non top-level headlines below > > point are hidden. At least for me. > > Org-mode has very precise control for situations when a jump into > invisible text happens, for example by isearch or by bookmark-jump or > saveplace. Take a look at the variable org-show-siblings and set a > special context for bookmark-jump, that should do it. This will work > for both saveplace and bookmarks. > > You can do this with customize, or just like this: > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > There are companion variables, they are all in the customization > group org-reveal-context. After almost 2 years on TeX.SE and more than 3 years on BGG, what I probably lack most in mailing lists is an upvote/thumb up button... :) > - Carsten Regards, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 6:58 ` Carsten Dominik 2013-03-21 7:14 ` Marcin Borkowski @ 2013-03-21 9:05 ` 42 147 2013-03-21 9:23 ` Rainer M Krug 2013-03-21 9:47 ` Carsten Dominik 1 sibling, 2 replies; 24+ messages in thread From: 42 147 @ 2013-03-21 9:05 UTC (permalink / raw) To: Carsten Dominik, Loyall, David; +Cc: Org Mode [-- Attachment #1: Type: text/plain, Size: 1390 bytes --] Thanks David, but what Carsten suggested completely resolved my problem (it applies not just to bookmarks; it fully preserves my buffer's folded state after adding Christoph's code to my .emacs). But I should also thank you for finding the words I struggled to find ("folded state"). I feel honored that royalty stepped into the discussion. Herzlichen Dank, 42 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com> > > On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com> wrote: > > > (require 'saveplace) > > (setq-default save-place t) > > > works for me. It just opens the place where I had the point, nothing > > more, but that's what I need most. > > This is more convenient than Emacs bookmarks, but still breaks org-mode to > a certain extent: all non top-level headlines below point are hidden. At > least for me. > > > Org-mode has very precise control for situations when a jump into > invisible text happens, for example by isearch or by bookmark-jump or > saveplace. Take a look at the variable org-show-siblings and set a special > context for bookmark-jump, that should do it. This will work for both > saveplace and bookmarks. > > You can do this with customize, or just like this: > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > There are companion variables, they are all in the customization group > org-reveal-context. > > - Carsten > [-- Attachment #2: Type: text/html, Size: 2085 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 9:05 ` 42 147 @ 2013-03-21 9:23 ` Rainer M Krug 2013-03-21 9:28 ` Carsten Dominik 2013-03-21 9:47 ` Carsten Dominik 1 sibling, 1 reply; 24+ messages in thread From: Rainer M Krug @ 2013-03-21 9:23 UTC (permalink / raw) To: 42 147, Carsten Dominik, Loyall, David; +Cc: Org Mode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 21/03/13 10:05, 42 147 wrote: > Thanks David, but what Carsten suggested completely resolved my problem (it applies not just to > bookmarks; it fully preserves my buffer's folded state after adding Christoph's code to my > .emacs). Good - May I suggest, that you write a step - by step howto and mail it here or even add it to worg? This would be a useful addition. > But I should also thank you for finding the words I struggled to find ("folded state"). And we have to thank you for this useful question! Cheers, Rainer > > I feel honored that royalty stepped into the discussion. > > Herzlichen Dank, > > 42 > > > 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com <mailto:carsten.dominik@gmail.com>> > > > On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com>> wrote: > >>> (require 'saveplace) (setq-default save-place t) >> >>> works for me. It just opens the place where I had the point, nothing more, but that's what >>> I need most. >> >> This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain extent: >> all non top-level headlines below point are hidden. At least for me. >> > > Org-mode has very precise control for situations when a jump into invisible text happens, for > example by isearch or by bookmark-jump or saveplace. Take a look at the variable > org-show-siblings and set a special context for bookmark-jump, that should do it. This will > work for both saveplace and bookmarks. > > You can do this with customize, or just like this: > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > There are companion variables, they are all in the customization group org-reveal-context. > > - Carsten > > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRStGHAAoJENvXNx4PUvmCgRMH/2XsE18ysYpwvEFr9dB8Peek 91vSz/YddFROCFO+B2kd8hAT404j1IGR1MKp0cyEgh3bIAvnKxWIMzK42WaWjNf+ SqxJrtwy6Q1m4fwCMeaegReYxc5kJN5CUC3inCXuYgqvWAEgWQOE+9+xq3j0LEOD pcA084O5rx2JzS4Fo/FeuvB3TuVqcpobkFYM5r89+7WSfDhy+04kp581xzcH4oBr JISGbfd17RFEIabgTAYkyJKQLMRY6BVFY8WSGQALT+ggSEAiYytYbHoTZUUfnfS2 UlwlTCgCn3xfc1QCBTv09YKVB+xOurtqL3tbfnj7CY3eATJz1YMtOoqyVMLJ68Y= =cEvT -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 9:23 ` Rainer M Krug @ 2013-03-21 9:28 ` Carsten Dominik 2013-03-21 9:42 ` Rainer M Krug 0 siblings, 1 reply; 24+ messages in thread From: Carsten Dominik @ 2013-03-21 9:28 UTC (permalink / raw) To: Rainer; +Cc: 42 147, Loyall, David, Org Mode On 21 mrt. 2013, at 10:23, Rainer M Krug <r.m.krug@gmail.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 21/03/13 10:05, 42 147 wrote: >> Thanks David, but what Carsten suggested completely resolved my problem (it applies not just to >> bookmarks; it fully preserves my buffer's folded state after adding Christoph's code to my >> .emacs). > > Good - May I suggest, that you write a step - by step howto and mail it here or even add it to > worg? This would be a useful addition. I guess it would make a good FAQ entry. I also think that maybe the current default is not good, show-siblings should probably default to t for bookmark jump. - Carsten > >> But I should also thank you for finding the words I struggled to find ("folded state"). > > And we have to thank you for this useful question! > > Cheers, > > Rainer > >> >> I feel honored that royalty stepped into the discussion. >> >> Herzlichen Dank, >> >> 42 >> >> >> 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com <mailto:carsten.dominik@gmail.com>> >> >> >> On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com>> wrote: >> >>>> (require 'saveplace) (setq-default save-place t) >>> >>>> works for me. It just opens the place where I had the point, nothing more, but that's what >>>> I need most. >>> >>> This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain extent: >>> all non top-level headlines below point are hidden. At least for me. >>> >> >> Org-mode has very precise control for situations when a jump into invisible text happens, for >> example by isearch or by bookmark-jump or saveplace. Take a look at the variable >> org-show-siblings and set a special context for bookmark-jump, that should do it. This will >> work for both saveplace and bookmarks. >> >> You can do this with customize, or just like this: >> >> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >> >> There are companion variables, they are all in the customization group org-reveal-context. >> >> - Carsten >> >> > > > - -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. > (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax : +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJRStGHAAoJENvXNx4PUvmCgRMH/2XsE18ysYpwvEFr9dB8Peek > 91vSz/YddFROCFO+B2kd8hAT404j1IGR1MKp0cyEgh3bIAvnKxWIMzK42WaWjNf+ > SqxJrtwy6Q1m4fwCMeaegReYxc5kJN5CUC3inCXuYgqvWAEgWQOE+9+xq3j0LEOD > pcA084O5rx2JzS4Fo/FeuvB3TuVqcpobkFYM5r89+7WSfDhy+04kp581xzcH4oBr > JISGbfd17RFEIabgTAYkyJKQLMRY6BVFY8WSGQALT+ggSEAiYytYbHoTZUUfnfS2 > UlwlTCgCn3xfc1QCBTv09YKVB+xOurtqL3tbfnj7CY3eATJz1YMtOoqyVMLJ68Y= > =cEvT > -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 9:28 ` Carsten Dominik @ 2013-03-21 9:42 ` Rainer M Krug 2013-03-21 10:16 ` 42 147 0 siblings, 1 reply; 24+ messages in thread From: Rainer M Krug @ 2013-03-21 9:42 UTC (permalink / raw) To: Carsten Dominik, Rainer; +Cc: 42 147, Loyall, David, Org Mode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 21/03/13 10:28, Carsten Dominik wrote: > > On 21 mrt. 2013, at 10:23, Rainer M Krug <r.m.krug@gmail.com> wrote: > > On 21/03/13 10:05, 42 147 wrote: >>>> Thanks David, but what Carsten suggested completely resolved my problem (it applies not >>>> just to bookmarks; it fully preserves my buffer's folded state after adding Christoph's >>>> code to my .emacs). > > Good - May I suggest, that you write a step - by step howto and mail it here or even add it to > worg? This would be a useful addition. > >> I guess it would make a good FAQ entry. Haven't thought about these - they would even be better then worg. > >> I also think that maybe the current default is not good, show-siblings should probably >> default to t for bookmark jump. Would make much sense - I assume that would then open the location when doing a search - replace. Cheers, Rainer > >> - Carsten > > >>>> But I should also thank you for finding the words I struggled to find ("folded state"). > > And we have to thank you for this useful question! > > Cheers, > > Rainer > >>>> >>>> I feel honored that royalty stepped into the discussion. >>>> >>>> Herzlichen Dank, >>>> >>>> 42 >>>> >>>> >>>> 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com <mailto:carsten.dominik@gmail.com>> >>>> >>>> >>>> On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com>> wrote: >>>> >>>>>> (require 'saveplace) (setq-default save-place t) >>>>> >>>>>> works for me. It just opens the place where I had the point, nothing more, but that's >>>>>> what I need most. >>>>> >>>>> This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain >>>>> extent: all non top-level headlines below point are hidden. At least for me. >>>>> >>>> >>>> Org-mode has very precise control for situations when a jump into invisible text happens, >>>> for example by isearch or by bookmark-jump or saveplace. Take a look at the variable >>>> org-show-siblings and set a special context for bookmark-jump, that should do it. This >>>> will work for both saveplace and bookmarks. >>>> >>>> You can do this with customize, or just like this: >>>> >>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >>>> >>>> There are companion variables, they are all in the customization group >>>> org-reveal-context. >>>> >>>> - Carsten >>>> >>>> > > > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRStYGAAoJENvXNx4PUvmCOYQH/iun7nUB4Wr4KJXwGuCJizgW 7h7565oAlV0ka6JONGG03xnxh0PvZCrj3Ns7xE6kitLeVZ0oIEa8Wp1I4eMGX1PI qXGnTuJ/nwVtpdn9geswCM11Rfz3KdlBWUz6zYFUXrD1GVaEyXBJPj2j0H1N27RD 6pK0IS3T7pnuycIpmqzEU5aWAkgK01sB3mIs5JYvnMGfoV0ZXLGcVplqXO0Hc3XR P1Ea/uzzWSSKgJWGSlB9ELVC1sZg8xPqjM/vWPG2U+/fp3VfJ2aeJJc9v87mq3li YI8Z4fYKO00oKv+quEOGWyDr0bO3w9PjJGAWmlw0cFu9UzxU4pRAmHR+XyTTCOc= =y9LZ -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 9:42 ` Rainer M Krug @ 2013-03-21 10:16 ` 42 147 2013-03-21 11:02 ` Carsten Dominik 2013-03-21 16:10 ` Thomas S. Dye 0 siblings, 2 replies; 24+ messages in thread From: 42 147 @ 2013-03-21 10:16 UTC (permalink / raw) To: Rainer, Carsten Dominik; +Cc: Org Mode [-- Attachment #1: Type: text/plain, Size: 4863 bytes --] > Good - May I suggest, that you write a step - by step howto and mail it here or even add it to > worg? This would be a useful addition. I adapted this thread the best I could. Feel free to do with it what you wish. QUESTION How do I restore the state of my buffer where I left it? ANSWER When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top level headlines are visible. If you wish Emacs to restore the position of point where you left it in your previous session, add the following code to your .emacs: (require 'saveplace) (setq-default save-place t) If you wish Org-mode to restore the folded state of the buffer (not just the position of point), you can either use customize, or add the following to .emacs: (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) If you use customize, take look at the variable org-show-siblings and set a special context for bookmark-jump. This will work for both saveplace and bookmarks. Org-mode has very precise control for situations when a jump into invisible text happens, for example by isearch or by bookmark-jump or saveplace. There are companion variables, and they are all in the customization group org-reveal-context. 2013/3/21 Rainer M Krug <r.m.krug@gmail.com> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 21/03/13 10:28, Carsten Dominik wrote: > > > > On 21 mrt. 2013, at 10:23, Rainer M Krug <r.m.krug@gmail.com> wrote: > > > > On 21/03/13 10:05, 42 147 wrote: > >>>> Thanks David, but what Carsten suggested completely resolved my > problem (it applies not > >>>> just to bookmarks; it fully preserves my buffer's folded state after > adding Christoph's > >>>> code to my .emacs). > > > > Good - May I suggest, that you write a step - by step howto and mail it > here or even add it to > > worg? This would be a useful addition. > > > >> I guess it would make a good FAQ entry. > > Haven't thought about these - they would even be better then worg. > > > > >> I also think that maybe the current default is not good, show-siblings > should probably > >> default to t for bookmark jump. > > Would make much sense - I assume that would then open the location when > doing a search - replace. > > Cheers, > > Rainer > > > > >> - Carsten > > > > > >>>> But I should also thank you for finding the words I struggled to find > ("folded state"). > > > > And we have to thank you for this useful question! > > > > Cheers, > > > > Rainer > > > >>>> > >>>> I feel honored that royalty stepped into the discussion. > >>>> > >>>> Herzlichen Dank, > >>>> > >>>> 42 > >>>> > >>>> > >>>> 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com <mailto: > carsten.dominik@gmail.com>> > >>>> > >>>> > >>>> On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto: > aeuster@gmail.com>> wrote: > >>>> > >>>>>> (require 'saveplace) (setq-default save-place t) > >>>>> > >>>>>> works for me. It just opens the place where I had the point, > nothing more, but that's > >>>>>> what I need most. > >>>>> > >>>>> This is more convenient than Emacs bookmarks, but still breaks > org-mode to a certain > >>>>> extent: all non top-level headlines below point are hidden. At least > for me. > >>>>> > >>>> > >>>> Org-mode has very precise control for situations when a jump into > invisible text happens, > >>>> for example by isearch or by bookmark-jump or saveplace. Take a look > at the variable > >>>> org-show-siblings and set a special context for bookmark-jump, that > should do it. This > >>>> will work for both saveplace and bookmarks. > >>>> > >>>> You can do this with customize, or just like this: > >>>> > >>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > >>>> > >>>> There are companion variables, they are all in the customization group > >>>> org-reveal-context. > >>>> > >>>> - Carsten > >>>> > >>>> > > > > > > > > - -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation > Biology, UCT), Dipl. Phys. > (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax : +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJRStYGAAoJENvXNx4PUvmCOYQH/iun7nUB4Wr4KJXwGuCJizgW > 7h7565oAlV0ka6JONGG03xnxh0PvZCrj3Ns7xE6kitLeVZ0oIEa8Wp1I4eMGX1PI > qXGnTuJ/nwVtpdn9geswCM11Rfz3KdlBWUz6zYFUXrD1GVaEyXBJPj2j0H1N27RD > 6pK0IS3T7pnuycIpmqzEU5aWAkgK01sB3mIs5JYvnMGfoV0ZXLGcVplqXO0Hc3XR > P1Ea/uzzWSSKgJWGSlB9ELVC1sZg8xPqjM/vWPG2U+/fp3VfJ2aeJJc9v87mq3li > YI8Z4fYKO00oKv+quEOGWyDr0bO3w9PjJGAWmlw0cFu9UzxU4pRAmHR+XyTTCOc= > =y9LZ > -----END PGP SIGNATURE----- > [-- Attachment #2: Type: text/html, Size: 6978 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 10:16 ` 42 147 @ 2013-03-21 11:02 ` Carsten Dominik 2013-03-21 11:25 ` Rainer M Krug 2013-03-21 16:10 ` Thomas S. Dye 1 sibling, 1 reply; 24+ messages in thread From: Carsten Dominik @ 2013-03-21 11:02 UTC (permalink / raw) To: 42 147; +Cc: Rainer, Org Mode [-- Attachment #1: Type: text/plain, Size: 5220 bytes --] This is nice, does anyone of you have write permissions on Work to add this? - Carsten On 21 mrt. 2013, at 11:16, 42 147 <aeuster@gmail.com> wrote: > > Good - May I suggest, that you write a step - by step howto and mail it here or even add it to > > worg? This would be a useful addition. > I adapted this thread the best I could. Feel free to do with it what you wish. > > QUESTION > > How do I restore the state of my buffer where I left it? > > ANSWER > > When Emacs first visits an Org file, the global state is set to > OVERVIEW, i.e., only the top level headlines are visible. > > If you wish Emacs to restore the position of point where you left it in > your previous session, add the following code to your .emacs: > > (require 'saveplace) > (setq-default save-place t) > > If you wish Org-mode to restore the folded state of the buffer (not just > the position of point), you can either use customize, or add the following > to .emacs: > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > If you use customize, take look at the variable org-show-siblings and set a > special context for bookmark-jump. This will work for both saveplace and > bookmarks. > > Org-mode has very precise control for situations when a jump into invisible > text happens, for example by isearch or by bookmark-jump or saveplace. > There are companion variables, and they are all in the customization group > org-reveal-context. > > 2013/3/21 Rainer M Krug <r.m.krug@gmail.com> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 21/03/13 10:28, Carsten Dominik wrote: > > > > On 21 mrt. 2013, at 10:23, Rainer M Krug <r.m.krug@gmail.com> wrote: > > > > On 21/03/13 10:05, 42 147 wrote: > >>>> Thanks David, but what Carsten suggested completely resolved my problem (it applies not > >>>> just to bookmarks; it fully preserves my buffer's folded state after adding Christoph's > >>>> code to my .emacs). > > > > Good - May I suggest, that you write a step - by step howto and mail it here or even add it to > > worg? This would be a useful addition. > > > >> I guess it would make a good FAQ entry. > > Haven't thought about these - they would even be better then worg. > > > > >> I also think that maybe the current default is not good, show-siblings should probably > >> default to t for bookmark jump. > > Would make much sense - I assume that would then open the location when doing a search - replace. > > Cheers, > > Rainer > > > > >> - Carsten > > > > > >>>> But I should also thank you for finding the words I struggled to find ("folded state"). > > > > And we have to thank you for this useful question! > > > > Cheers, > > > > Rainer > > > >>>> > >>>> I feel honored that royalty stepped into the discussion. > >>>> > >>>> Herzlichen Dank, > >>>> > >>>> 42 > >>>> > >>>> > >>>> 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com <mailto:carsten.dominik@gmail.com>> > >>>> > >>>> > >>>> On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com>> wrote: > >>>> > >>>>>> (require 'saveplace) (setq-default save-place t) > >>>>> > >>>>>> works for me. It just opens the place where I had the point, nothing more, but that's > >>>>>> what I need most. > >>>>> > >>>>> This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain > >>>>> extent: all non top-level headlines below point are hidden. At least for me. > >>>>> > >>>> > >>>> Org-mode has very precise control for situations when a jump into invisible text happens, > >>>> for example by isearch or by bookmark-jump or saveplace. Take a look at the variable > >>>> org-show-siblings and set a special context for bookmark-jump, that should do it. This > >>>> will work for both saveplace and bookmarks. > >>>> > >>>> You can do this with customize, or just like this: > >>>> > >>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > >>>> > >>>> There are companion variables, they are all in the customization group > >>>> org-reveal-context. > >>>> > >>>> - Carsten > >>>> > >>>> > > > > > > > > - -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. > (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax : +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJRStYGAAoJENvXNx4PUvmCOYQH/iun7nUB4Wr4KJXwGuCJizgW > 7h7565oAlV0ka6JONGG03xnxh0PvZCrj3Ns7xE6kitLeVZ0oIEa8Wp1I4eMGX1PI > qXGnTuJ/nwVtpdn9geswCM11Rfz3KdlBWUz6zYFUXrD1GVaEyXBJPj2j0H1N27RD > 6pK0IS3T7pnuycIpmqzEU5aWAkgK01sB3mIs5JYvnMGfoV0ZXLGcVplqXO0Hc3XR > P1Ea/uzzWSSKgJWGSlB9ELVC1sZg8xPqjM/vWPG2U+/fp3VfJ2aeJJc9v87mq3li > YI8Z4fYKO00oKv+quEOGWyDr0bO3w9PjJGAWmlw0cFu9UzxU4pRAmHR+XyTTCOc= > =y9LZ > -----END PGP SIGNATURE----- > [-- Attachment #2: Type: text/html, Size: 7451 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 11:02 ` Carsten Dominik @ 2013-03-21 11:25 ` Rainer M Krug 2013-03-21 11:38 ` Carsten Dominik 0 siblings, 1 reply; 24+ messages in thread From: Rainer M Krug @ 2013-03-21 11:25 UTC (permalink / raw) To: Carsten Dominik, 42 147; +Cc: Rainer, Org Mode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 21/03/13 12:02, Carsten Dominik wrote: > This is nice, does anyone of you have write permissions on Work to add this? I should have, but I have never done it. Rainer > > - Carsten > > On 21 mrt. 2013, at 11:16, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com>> wrote: > >>> Good - May I suggest, that you write a step - by step howto and mail it here or even add it >>> to worg? This would be a useful addition. >> I adapted this thread the best I could. Feel free to do with it what you wish. >> >> QUESTION >> >> How do I restore the state of my buffer where I left it? >> >> ANSWER >> >> When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top >> level headlines are visible. >> >> If you wish Emacs to restore the position of point where you left it in your previous >> session, add the following code to your .emacs: >> >> (require 'saveplace) (setq-default save-place t) >> >> If you wish Org-mode to restore the folded state of the buffer (not just the position of >> point), you can either use customize, or add the following to .emacs: >> >> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >> >> If you use customize, take look at the variable org-show-siblings and set a special context >> for bookmark-jump. This will work for both saveplace and bookmarks. >> >> Org-mode has very precise control for situations when a jump into invisible text happens, for >> example by isearch or by bookmark-jump or saveplace. There are companion variables, and they >> are all in the customization group org-reveal-context. >> >> 2013/3/21 Rainer M Krug <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> >> > On 21/03/13 10:28, Carsten Dominik wrote: > >> On 21 mrt. 2013, at 10:23, Rainer M Krug <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> >> wrote: > >> On 21/03/13 10:05, 42 147 wrote: >>>>> Thanks David, but what Carsten suggested completely resolved my problem (it applies >>>>> not just to bookmarks; it fully preserves my buffer's folded state after adding >>>>> Christoph's code to my .emacs). > >> Good - May I suggest, that you write a step - by step howto and mail it here or even add it >> to worg? This would be a useful addition. > >>> I guess it would make a good FAQ entry. > > Haven't thought about these - they would even be better then worg. > > >>> I also think that maybe the current default is not good, show-siblings should probably >>> default to t for bookmark jump. > > Would make much sense - I assume that would then open the location when doing a search - > replace. > > Cheers, > > Rainer > > >>> - Carsten > > >>>>> But I should also thank you for finding the words I struggled to find ("folded >>>>> state"). > >> And we have to thank you for this useful question! > >> Cheers, > >> Rainer > >>>>> >>>>> I feel honored that royalty stepped into the discussion. >>>>> >>>>> Herzlichen Dank, >>>>> >>>>> 42 >>>>> >>>>> >>>>> 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com >>>>> <mailto:carsten.dominik@gmail.com> > <mailto:carsten.dominik@gmail.com <mailto:carsten.dominik@gmail.com>>> >>>>> >>>>> >>>>> On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com> > <mailto:aeuster@gmail.com <mailto:aeuster@gmail.com>>> wrote: >>>>> >>>>>>> (require 'saveplace) (setq-default save-place t) >>>>>> >>>>>>> works for me. It just opens the place where I had the point, nothing more, but >>>>>>> that's what I need most. >>>>>> >>>>>> This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain >>>>>> extent: all non top-level headlines below point are hidden. At least for me. >>>>>> >>>>> >>>>> Org-mode has very precise control for situations when a jump into invisible text >>>>> happens, for example by isearch or by bookmark-jump or saveplace. Take a look at the >>>>> variable org-show-siblings and set a special context for bookmark-jump, that should do >>>>> it. This will work for both saveplace and bookmarks. >>>>> >>>>> You can do this with customize, or just like this: >>>>> >>>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >>>>> >>>>> There are companion variables, they are all in the customization group >>>>> org-reveal-context. >>>>> >>>>> - Carsten >>>>> >>>>> > > > > >> >> > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRSu5FAAoJENvXNx4PUvmCjUwH/RUIVrrAJXxiPlC2Kv32+K7X MAC6mLb+NFsXLLq4ErJXvajxqy4Q1PAc+FeVo84LaKT3Ad7nRH9le+oQ4U+wOwbR HdcVfMKk+Osgbpe9xW/N2/8LW/wjQfvv5ZbM5aq+VgWzUZfSBKvAOxnvHOjFIUFT nBqxyj+CAECja23EoWOEhcLozMjfuCgLxxCcTnTCWqW9VUbpXYlbYCO5eV1rLjw9 IRI3Vpz10zWZtN5TmhyWXYJzYmCpGYynKQAClV3VF/mG3iyn5ceBVBo8T95vSgBh A/zFjrWLH+mAqVYOEz7Jg7K2fz6x0oAPuw42H8t0pm5A2cSECaKVZbD9fnuVaUA= =6F+X -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 11:25 ` Rainer M Krug @ 2013-03-21 11:38 ` Carsten Dominik 2013-03-21 11:59 ` Rainer M Krug 0 siblings, 1 reply; 24+ messages in thread From: Carsten Dominik @ 2013-03-21 11:38 UTC (permalink / raw) To: Rainer; +Cc: 42 147, Org Mode On 21 mrt. 2013, at 12:25, Rainer M Krug <r.m.krug@gmail.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 21/03/13 12:02, Carsten Dominik wrote: >> This is nice, does anyone of you have write permissions on Work to add this? > > I should have, but I have never done it. Well, you can try, or else I'll do it. - Carsten > > Rainer > >> >> - Carsten >> >> On 21 mrt. 2013, at 11:16, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com>> wrote: >> >>>> Good - May I suggest, that you write a step - by step howto and mail it here or even add it >>>> to worg? This would be a useful addition. >>> I adapted this thread the best I could. Feel free to do with it what you wish. >>> >>> QUESTION >>> >>> How do I restore the state of my buffer where I left it? >>> >>> ANSWER >>> >>> When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only the top >>> level headlines are visible. >>> >>> If you wish Emacs to restore the position of point where you left it in your previous >>> session, add the following code to your .emacs: >>> >>> (require 'saveplace) (setq-default save-place t) >>> >>> If you wish Org-mode to restore the folded state of the buffer (not just the position of >>> point), you can either use customize, or add the following to .emacs: >>> >>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >>> >>> If you use customize, take look at the variable org-show-siblings and set a special context >>> for bookmark-jump. This will work for both saveplace and bookmarks. >>> >>> Org-mode has very precise control for situations when a jump into invisible text happens, for >>> example by isearch or by bookmark-jump or saveplace. There are companion variables, and they >>> are all in the customization group org-reveal-context. >>> >>> 2013/3/21 Rainer M Krug <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> >>> >> On 21/03/13 10:28, Carsten Dominik wrote: >> >>> On 21 mrt. 2013, at 10:23, Rainer M Krug <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> >>> wrote: >> >>> On 21/03/13 10:05, 42 147 wrote: >>>>>> Thanks David, but what Carsten suggested completely resolved my problem (it applies >>>>>> not just to bookmarks; it fully preserves my buffer's folded state after adding >>>>>> Christoph's code to my .emacs). >> >>> Good - May I suggest, that you write a step - by step howto and mail it here or even add it >>> to worg? This would be a useful addition. >> >>>> I guess it would make a good FAQ entry. >> >> Haven't thought about these - they would even be better then worg. >> >> >>>> I also think that maybe the current default is not good, show-siblings should probably >>>> default to t for bookmark jump. >> >> Would make much sense - I assume that would then open the location when doing a search - >> replace. >> >> Cheers, >> >> Rainer >> >> >>>> - Carsten >> >> >>>>>> But I should also thank you for finding the words I struggled to find ("folded >>>>>> state"). >> >>> And we have to thank you for this useful question! >> >>> Cheers, >> >>> Rainer >> >>>>>> >>>>>> I feel honored that royalty stepped into the discussion. >>>>>> >>>>>> Herzlichen Dank, >>>>>> >>>>>> 42 >>>>>> >>>>>> >>>>>> 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com >>>>>> <mailto:carsten.dominik@gmail.com> >> <mailto:carsten.dominik@gmail.com <mailto:carsten.dominik@gmail.com>>> >>>>>> >>>>>> >>>>>> On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com> >> <mailto:aeuster@gmail.com <mailto:aeuster@gmail.com>>> wrote: >>>>>> >>>>>>>> (require 'saveplace) (setq-default save-place t) >>>>>>> >>>>>>>> works for me. It just opens the place where I had the point, nothing more, but >>>>>>>> that's what I need most. >>>>>>> >>>>>>> This is more convenient than Emacs bookmarks, but still breaks org-mode to a certain >>>>>>> extent: all non top-level headlines below point are hidden. At least for me. >>>>>>> >>>>>> >>>>>> Org-mode has very precise control for situations when a jump into invisible text >>>>>> happens, for example by isearch or by bookmark-jump or saveplace. Take a look at the >>>>>> variable org-show-siblings and set a special context for bookmark-jump, that should do >>>>>> it. This will work for both saveplace and bookmarks. >>>>>> >>>>>> You can do this with customize, or just like this: >>>>>> >>>>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >>>>>> >>>>>> There are companion variables, they are all in the customization group >>>>>> org-reveal-context. >>>>>> >>>>>> - Carsten >>>>>> >>>>>> >> >> >> >> >>> >>> >> > > - -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. > (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax : +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJRSu5FAAoJENvXNx4PUvmCjUwH/RUIVrrAJXxiPlC2Kv32+K7X > MAC6mLb+NFsXLLq4ErJXvajxqy4Q1PAc+FeVo84LaKT3Ad7nRH9le+oQ4U+wOwbR > HdcVfMKk+Osgbpe9xW/N2/8LW/wjQfvv5ZbM5aq+VgWzUZfSBKvAOxnvHOjFIUFT > nBqxyj+CAECja23EoWOEhcLozMjfuCgLxxCcTnTCWqW9VUbpXYlbYCO5eV1rLjw9 > IRI3Vpz10zWZtN5TmhyWXYJzYmCpGYynKQAClV3VF/mG3iyn5ceBVBo8T95vSgBh > A/zFjrWLH+mAqVYOEz7Jg7K2fz6x0oAPuw42H8t0pm5A2cSECaKVZbD9fnuVaUA= > =6F+X > -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 11:38 ` Carsten Dominik @ 2013-03-21 11:59 ` Rainer M Krug 2013-03-21 13:50 ` Carsten Dominik 0 siblings, 1 reply; 24+ messages in thread From: Rainer M Krug @ 2013-03-21 11:59 UTC (permalink / raw) To: Carsten Dominik, Rainer; +Cc: 42 147, Org Mode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 21/03/13 12:38, Carsten Dominik wrote: > > On 21 mrt. 2013, at 12:25, Rainer M Krug <r.m.krug@gmail.com> wrote: > > On 21/03/13 12:02, Carsten Dominik wrote: >>>> This is nice, does anyone of you have write permissions on Work to add this? > > I should have, but I have never done it. > >> Well, you can try, or else I'll do it. I could, and I would (I was looking for an excuse for a long time), but I have no time before middle next week. I can put it into my TODO items for then. I just relised, I was only registered to repo.or.cz - but I will register as described at http://orgmode.org/worg/worg-git.html If it should be up earlier, please feel free to do it. Cheers, Rainer > >> - Carsten > > > Rainer > >>>> >>>> - Carsten >>>> >>>> On 21 mrt. 2013, at 11:16, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com>> wrote: >>>> >>>>>> Good - May I suggest, that you write a step - by step howto and mail it here or even >>>>>> add it to worg? This would be a useful addition. >>>>> I adapted this thread the best I could. Feel free to do with it what you wish. >>>>> >>>>> QUESTION >>>>> >>>>> How do I restore the state of my buffer where I left it? >>>>> >>>>> ANSWER >>>>> >>>>> When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only >>>>> the top level headlines are visible. >>>>> >>>>> If you wish Emacs to restore the position of point where you left it in your previous >>>>> session, add the following code to your .emacs: >>>>> >>>>> (require 'saveplace) (setq-default save-place t) >>>>> >>>>> If you wish Org-mode to restore the folded state of the buffer (not just the position >>>>> of point), you can either use customize, or add the following to .emacs: >>>>> >>>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >>>>> >>>>> If you use customize, take look at the variable org-show-siblings and set a special >>>>> context for bookmark-jump. This will work for both saveplace and bookmarks. >>>>> >>>>> Org-mode has very precise control for situations when a jump into invisible text >>>>> happens, for example by isearch or by bookmark-jump or saveplace. There are companion >>>>> variables, and they are all in the customization group org-reveal-context. >>>>> >>>>> 2013/3/21 Rainer M Krug <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> >>>>> >>>> On 21/03/13 10:28, Carsten Dominik wrote: >>>> >>>>> On 21 mrt. 2013, at 10:23, Rainer M Krug <r.m.krug@gmail.com >>>>> <mailto:r.m.krug@gmail.com>> wrote: >>>> >>>>> On 21/03/13 10:05, 42 147 wrote: >>>>>>>> Thanks David, but what Carsten suggested completely resolved my problem (it >>>>>>>> applies not just to bookmarks; it fully preserves my buffer's folded state after >>>>>>>> adding Christoph's code to my .emacs). >>>> >>>>> Good - May I suggest, that you write a step - by step howto and mail it here or even >>>>> add it to worg? This would be a useful addition. >>>> >>>>>> I guess it would make a good FAQ entry. >>>> >>>> Haven't thought about these - they would even be better then worg. >>>> >>>> >>>>>> I also think that maybe the current default is not good, show-siblings should >>>>>> probably default to t for bookmark jump. >>>> >>>> Would make much sense - I assume that would then open the location when doing a search - >>>> replace. >>>> >>>> Cheers, >>>> >>>> Rainer >>>> >>>> >>>>>> - Carsten >>>> >>>> >>>>>>>> But I should also thank you for finding the words I struggled to find ("folded >>>>>>>> state"). >>>> >>>>> And we have to thank you for this useful question! >>>> >>>>> Cheers, >>>> >>>>> Rainer >>>> >>>>>>>> >>>>>>>> I feel honored that royalty stepped into the discussion. >>>>>>>> >>>>>>>> Herzlichen Dank, >>>>>>>> >>>>>>>> 42 >>>>>>>> >>>>>>>> >>>>>>>> 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com >>>>>>>> <mailto:carsten.dominik@gmail.com> >>>> <mailto:carsten.dominik@gmail.com <mailto:carsten.dominik@gmail.com>>> >>>>>>>> >>>>>>>> >>>>>>>> On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com> >>>> <mailto:aeuster@gmail.com <mailto:aeuster@gmail.com>>> wrote: >>>>>>>> >>>>>>>>>> (require 'saveplace) (setq-default save-place t) >>>>>>>>> >>>>>>>>>> works for me. It just opens the place where I had the point, nothing more, >>>>>>>>>> but that's what I need most. >>>>>>>>> >>>>>>>>> This is more convenient than Emacs bookmarks, but still breaks org-mode to a >>>>>>>>> certain extent: all non top-level headlines below point are hidden. At least >>>>>>>>> for me. >>>>>>>>> >>>>>>>> >>>>>>>> Org-mode has very precise control for situations when a jump into invisible text >>>>>>>> happens, for example by isearch or by bookmark-jump or saveplace. Take a look at >>>>>>>> the variable org-show-siblings and set a special context for bookmark-jump, that >>>>>>>> should do it. This will work for both saveplace and bookmarks. >>>>>>>> >>>>>>>> You can do this with customize, or just like this: >>>>>>>> >>>>>>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >>>>>>>> >>>>>>>> There are companion variables, they are all in the customization group >>>>>>>> org-reveal-context. >>>>>>>> >>>>>>>> - Carsten >>>>>>>> >>>>>>>> >>>> >>>> >>>> >>>> >>>>> >>>>> >>>> > > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRSvYUAAoJENvXNx4PUvmCDcIIANZf6cBZOJ1ydJap3hiHmXab EeURoiwNxpyh8/vtuxn1VPKBQEPFPw52ybEKHGCby5Tsm0txtj4ySo9aZj1sYfPf UmUekIM1u5iqhBBy8xaMnUda4VfrN1o7kyJGVKMDlnF27ED1+Oa99rbugaLhDvB9 D+witVVPIOOXisgssGJiIpTSrOToUczVDjgcVsvKRCVXqXtwcwy/3r/gL2vmUb6g GIhHpzQLKK/5qRCdMiSMmZ3sAhDDqndP+VCXF5g6keX6qQLj60OQ7yu1gW3Aw2fx eQSjkXKZ0+8sZRRzhTT0WasBAzVYZqEMb9UtI0Y0stBZ+J2rl8sPbJ69Sq8ZVrQ= =dJLC -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 11:59 ` Rainer M Krug @ 2013-03-21 13:50 ` Carsten Dominik 2013-04-06 1:03 ` Bastien 0 siblings, 1 reply; 24+ messages in thread From: Carsten Dominik @ 2013-03-21 13:50 UTC (permalink / raw) To: Rainer; +Cc: 42 147, Org Mode Here is a patch that would change the default values for bookmark-jump and saveplace. Bastien, what do you think? - Carsten diff --git a/lisp/org.el b/lisp/org.el index bf74afd..1d48338 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -916,7 +916,7 @@ contexts. See `org-show-hierarchy-above' for valid contexts." :group 'org-reveal-location :type org-context-choice) -(defcustom org-show-siblings '((default . nil) (isearch t)) +(defcustom org-show-siblings '((default . nil) (isearch t) (bookmark-jump t)) "Non-nil means show all sibling heading when revealing a location. Org-mode often shows locations in an org-mode file which might have been invisible before. When this is set, the sibling of the current entry On 21 mrt. 2013, at 12:59, Rainer M Krug <r.m.krug@gmail.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 21/03/13 12:38, Carsten Dominik wrote: >> >> On 21 mrt. 2013, at 12:25, Rainer M Krug <r.m.krug@gmail.com> wrote: >> >> On 21/03/13 12:02, Carsten Dominik wrote: >>>>> This is nice, does anyone of you have write permissions on Work to add this? >> >> I should have, but I have never done it. >> >>> Well, you can try, or else I'll do it. > > I could, and I would (I was looking for an excuse for a long time), but I have no time before > middle next week. I can put it into my TODO items for then. > > I just relised, I was only registered to repo.or.cz - but I will register as described at > > http://orgmode.org/worg/worg-git.html > > If it should be up earlier, please feel free to do it. > > Cheers, > > Rainer > > >> >>> - Carsten >> >> >> Rainer >> >>>>> >>>>> - Carsten >>>>> >>>>> On 21 mrt. 2013, at 11:16, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com>> wrote: >>>>> >>>>>>> Good - May I suggest, that you write a step - by step howto and mail it here or even >>>>>>> add it to worg? This would be a useful addition. >>>>>> I adapted this thread the best I could. Feel free to do with it what you wish. >>>>>> >>>>>> QUESTION >>>>>> >>>>>> How do I restore the state of my buffer where I left it? >>>>>> >>>>>> ANSWER >>>>>> >>>>>> When Emacs first visits an Org file, the global state is set to OVERVIEW, i.e., only >>>>>> the top level headlines are visible. >>>>>> >>>>>> If you wish Emacs to restore the position of point where you left it in your previous >>>>>> session, add the following code to your .emacs: >>>>>> >>>>>> (require 'saveplace) (setq-default save-place t) >>>>>> >>>>>> If you wish Org-mode to restore the folded state of the buffer (not just the position >>>>>> of point), you can either use customize, or add the following to .emacs: >>>>>> >>>>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >>>>>> >>>>>> If you use customize, take look at the variable org-show-siblings and set a special >>>>>> context for bookmark-jump. This will work for both saveplace and bookmarks. >>>>>> >>>>>> Org-mode has very precise control for situations when a jump into invisible text >>>>>> happens, for example by isearch or by bookmark-jump or saveplace. There are companion >>>>>> variables, and they are all in the customization group org-reveal-context. >>>>>> >>>>>> 2013/3/21 Rainer M Krug <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> >>>>>> >>>>> On 21/03/13 10:28, Carsten Dominik wrote: >>>>> >>>>>> On 21 mrt. 2013, at 10:23, Rainer M Krug <r.m.krug@gmail.com >>>>>> <mailto:r.m.krug@gmail.com>> wrote: >>>>> >>>>>> On 21/03/13 10:05, 42 147 wrote: >>>>>>>>> Thanks David, but what Carsten suggested completely resolved my problem (it >>>>>>>>> applies not just to bookmarks; it fully preserves my buffer's folded state after >>>>>>>>> adding Christoph's code to my .emacs). >>>>> >>>>>> Good - May I suggest, that you write a step - by step howto and mail it here or even >>>>>> add it to worg? This would be a useful addition. >>>>> >>>>>>> I guess it would make a good FAQ entry. >>>>> >>>>> Haven't thought about these - they would even be better then worg. >>>>> >>>>> >>>>>>> I also think that maybe the current default is not good, show-siblings should >>>>>>> probably default to t for bookmark jump. >>>>> >>>>> Would make much sense - I assume that would then open the location when doing a search - >>>>> replace. >>>>> >>>>> Cheers, >>>>> >>>>> Rainer >>>>> >>>>> >>>>>>> - Carsten >>>>> >>>>> >>>>>>>>> But I should also thank you for finding the words I struggled to find ("folded >>>>>>>>> state"). >>>>> >>>>>> And we have to thank you for this useful question! >>>>> >>>>>> Cheers, >>>>> >>>>>> Rainer >>>>> >>>>>>>>> >>>>>>>>> I feel honored that royalty stepped into the discussion. >>>>>>>>> >>>>>>>>> Herzlichen Dank, >>>>>>>>> >>>>>>>>> 42 >>>>>>>>> >>>>>>>>> >>>>>>>>> 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com >>>>>>>>> <mailto:carsten.dominik@gmail.com> >>>>> <mailto:carsten.dominik@gmail.com <mailto:carsten.dominik@gmail.com>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com <mailto:aeuster@gmail.com> >>>>> <mailto:aeuster@gmail.com <mailto:aeuster@gmail.com>>> wrote: >>>>>>>>> >>>>>>>>>>> (require 'saveplace) (setq-default save-place t) >>>>>>>>>> >>>>>>>>>>> works for me. It just opens the place where I had the point, nothing more, >>>>>>>>>>> but that's what I need most. >>>>>>>>>> >>>>>>>>>> This is more convenient than Emacs bookmarks, but still breaks org-mode to a >>>>>>>>>> certain extent: all non top-level headlines below point are hidden. At least >>>>>>>>>> for me. >>>>>>>>>> >>>>>>>>> >>>>>>>>> Org-mode has very precise control for situations when a jump into invisible text >>>>>>>>> happens, for example by isearch or by bookmark-jump or saveplace. Take a look at >>>>>>>>> the variable org-show-siblings and set a special context for bookmark-jump, that >>>>>>>>> should do it. This will work for both saveplace and bookmarks. >>>>>>>>> >>>>>>>>> You can do this with customize, or just like this: >>>>>>>>> >>>>>>>>> (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) >>>>>>>>> >>>>>>>>> There are companion variables, they are all in the customization group >>>>>>>>> org-reveal-context. >>>>>>>>> >>>>>>>>> - Carsten >>>>>>>>> >>>>>>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> >>>>>> >>>>> >> >> > > - -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. > (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax : +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJRSvYUAAoJENvXNx4PUvmCDcIIANZf6cBZOJ1ydJap3hiHmXab > EeURoiwNxpyh8/vtuxn1VPKBQEPFPw52ybEKHGCby5Tsm0txtj4ySo9aZj1sYfPf > UmUekIM1u5iqhBBy8xaMnUda4VfrN1o7kyJGVKMDlnF27ED1+Oa99rbugaLhDvB9 > D+witVVPIOOXisgssGJiIpTSrOToUczVDjgcVsvKRCVXqXtwcwy/3r/gL2vmUb6g > GIhHpzQLKK/5qRCdMiSMmZ3sAhDDqndP+VCXF5g6keX6qQLj60OQ7yu1gW3Aw2fx > eQSjkXKZ0+8sZRRzhTT0WasBAzVYZqEMb9UtI0Y0stBZ+J2rl8sPbJ69Sq8ZVrQ= > =dJLC > -----END PGP SIGNATURE----- ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 13:50 ` Carsten Dominik @ 2013-04-06 1:03 ` Bastien 0 siblings, 0 replies; 24+ messages in thread From: Bastien @ 2013-04-06 1:03 UTC (permalink / raw) To: Carsten Dominik; +Cc: 42 147, Rainer, Org Mode Hi Carsten, Carsten Dominik <carsten.dominik@gmail.com> writes: > Here is a patch that would change the default values for bookmark-jump and saveplace. > Bastien, what do you think? I think it's good, I've applied this -- thanks! -- Bastien ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 10:16 ` 42 147 2013-03-21 11:02 ` Carsten Dominik @ 2013-03-21 16:10 ` Thomas S. Dye 2013-03-22 16:36 ` 42 147 1 sibling, 1 reply; 24+ messages in thread From: Thomas S. Dye @ 2013-03-21 16:10 UTC (permalink / raw) To: 42 147; +Cc: Rainer, Org Mode, Carsten Dominik 42 147 <aeuster@gmail.com> writes: >> Good - May I suggest, that you write a step - by step howto and mail >> it here or even add it to >> worg? This would be a useful addition. > > I adapted this thread the best I could. Feel free to do with it what you > wish. > > QUESTION > > How do I restore the state of my buffer where I left it? > > ANSWER > > When Emacs first visits an Org file, the global state is set to > OVERVIEW, i.e., only the top level headlines are visible. > > If you wish Emacs to restore the position of point where you left it in > your previous session, add the following code to your .emacs: > > (require 'saveplace) > (setq-default save-place t) > > If you wish Org-mode to restore the folded state of the buffer (not just > the position of point), you can either use customize, or add the following > to .emacs: > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) This doesn't work for me: Debugger entered--Lisp error: (wrong-type-argument listp t) mapcar(#[(f) "\bT \b\x1a\306\n!\204 ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 16:10 ` Thomas S. Dye @ 2013-03-22 16:36 ` 42 147 2013-03-22 21:30 ` Thomas S. Dye 0 siblings, 1 reply; 24+ messages in thread From: 42 147 @ 2013-03-22 16:36 UTC (permalink / raw) To: Thomas S. Dye, Org Mode [-- Attachment #1: Type: text/plain, Size: 4143 bytes --] Thomas, Could you provide a recipe? As a test, I ran Emacs with just the following code in my .emacs: (require 'saveplace) (setq-default save-place t) (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) Emacs ran without any errors, and I made a test.org file, created multiple headlines, and left point in the middle of a paragraph. Everything restored fine after closing and revisiting the file. I was hoping someone else would jump in and interpret those debugging messages, because I'm not proficient enough in Emacs Lisp yet, nor familiar enough with the org-mode code base. All I can do is try and reproduce your error. The code seems to be robust, though. Tried my best with what I have, 42 2013/3/21 Thomas S. Dye <tsd@tsdye.com> > 42 147 <aeuster@gmail.com> writes: > > >> Good - May I suggest, that you write a step - by step howto and mail > >> it here or even add it to > >> worg? This would be a useful addition. > > > > I adapted this thread the best I could. Feel free to do with it what you > > wish. > > > > QUESTION > > > > How do I restore the state of my buffer where I left it? > > > > ANSWER > > > > When Emacs first visits an Org file, the global state is set to > > OVERVIEW, i.e., only the top level headlines are visible. > > > > If you wish Emacs to restore the position of point where you left it in > > your previous session, add the following code to your .emacs: > > > > (require 'saveplace) > > (setq-default save-place t) > > > > If you wish Org-mode to restore the folded state of the buffer (not just > > the position of point), you can either use customize, or add the > following > > to .emacs: > > > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > This doesn't work for me: > > Debugger entered--Lisp error: (wrong-type-argument listp t) > mapcar(#[(f) " T \306\n!\204 \n:\203 \307\n \"\202 > \n*\211\203`\310\f > \"\203` \311\312 > \"\311\313 > \"D \306\n!\203B\314\n \"\202\\\n\203O\314\315\n #\202\\ \203Z @\202\\ > *\202a > \306\n!\204y\n:\203y\307\n \"\202z\n*\206\200 > C \306\n!\203\223\314\n \"\202\255\n\203\240\314\315\n #\202\255 \203\253 > @\202\255 ,\207" [i *orgtbl-efmt* fmt efmt orgtbl-exp-regexp f functionp > plist-get string-match match-string 1 2 apply format args *orgtbl-fmt* > *orgtbl-default-fmt*] 6] (bookmark-jump . t)) > orgtbl-format-line((bookmark-jump . t)) > orgtbl-format-section(nil) > orgtbl-to-generic(((default) (isearch t) (bookmark-jump . t)) > (:remove-newlines t :tstart nil :tend nil :hline "|---" :sep " | " :lstart > "| " :lend " |" :fmt (lambda (cell) (format "%s" cell)))) > orgtbl-to-orgtbl(((default) (isearch t) (bookmark-jump . t)) (:fmt > (lambda (cell) (format "%s" cell)))) > org-babel-insert-result(((default) (isearch t) (bookmark-jump . t)) > ("replace") ("emacs-lisp" "(require 'saveplace)\n(setq-default save-place > t)\n(setq org-show-siblings '((default) (isearch t) (bookmark-jump . t)))" > ((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . > "yes") (:tangle . "yes") (:exports . "code") (:results . "replace") > (:session . "none") (:padnewline . "yes") (:hlines . "yes") (:colnames . > "no") (:result-type . value) (:result-params "replace") (:rowname-names) > (:colname-names)) "" nil 0) nil 0 "emacs-lisp") > org-babel-execute-src-block(nil ("emacs-lisp" "(require > 'saveplace)\n(setq-default save-place t)\n(setq org-show-siblings > '((default) (isearch t) (bookmark-jump . t)))" ((:comments . "") (:shebang > . "") (:cache . "no") (:padline . "") (:noweb . "yes") (:tangle . "yes") > (:exports . "code") (:results . "replace") (:session . "none") (:padnewline > . "yes") (:hlines . "yes") (:colnames . "no") (:result-type . value) > (:result-params "replace") (:rowname-names) (:colname-names)) "" nil 0)) > org-babel-execute-src-block-maybe() > org-babel-execute-maybe() > org-babel-execute-safely-maybe() > run-hook-with-args-until-success(org-babel-execute-safely-maybe) > org-ctrl-c-ctrl-c(nil) > call-interactively(org-ctrl-c-ctrl-c nil nil) > > All the best, > Tom > > > -- > Thomas S. Dye > http://www.tsdye.com > [-- Attachment #2: Type: text/html, Size: 5379 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-22 16:36 ` 42 147 @ 2013-03-22 21:30 ` Thomas S. Dye 2013-03-22 22:24 ` 42 147 0 siblings, 1 reply; 24+ messages in thread From: Thomas S. Dye @ 2013-03-22 21:30 UTC (permalink / raw) To: 42 147; +Cc: Org Mode Aloha 42, 42 147 <aeuster@gmail.com> writes: > Thomas, > > Could you provide a recipe? As a test, I ran Emacs with just the following > code in my .emacs: > > (require 'saveplace) > (setq-default save-place t) > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > Emacs ran without any errors, and I made a test.org file, created multiple > headlines, and left point in the middle of a paragraph. Everything restored > fine after closing and revisiting the file. > > I was hoping someone else would jump in and interpret those debugging > messages, because I'm not proficient enough in Emacs Lisp yet, nor familiar > enough with the org-mode code base. All I can do is try and reproduce your > error. The code seems to be robust, though. > > Tried my best with what I have, > > 42 > Thanks for looking into this. I found some time to investigate and haven't been able to reproduce the problem. It all seems to work as advertised (and I like it). Sorry for the noise. Tom -- Thomas S. Dye http://www.tsdye.com ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-22 21:30 ` Thomas S. Dye @ 2013-03-22 22:24 ` 42 147 0 siblings, 0 replies; 24+ messages in thread From: 42 147 @ 2013-03-22 22:24 UTC (permalink / raw) To: Thomas S. Dye; +Cc: Org Mode [-- Attachment #1: Type: text/plain, Size: 1604 bytes --] Thomas, Glad to hear. I'm quite pleased with this functionality: given that I am always in the midst of some writing / analysis project, it has been a major improvement. Already got one of my friends to instantly adopt it. My only complaint is that I cannot momentarily enslave all my friends and relatives and ram Emacs down their throats. I wish I could be a totalitarian for just one day. Living the high life in org-mode, 42 2013/3/22 Thomas S. Dye <tsd@tsdye.com> > Aloha 42, > > 42 147 <aeuster@gmail.com> writes: > > > Thomas, > > > > Could you provide a recipe? As a test, I ran Emacs with just the > following > > code in my .emacs: > > > > (require 'saveplace) > > (setq-default save-place t) > > > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > > > Emacs ran without any errors, and I made a test.org file, created > multiple > > headlines, and left point in the middle of a paragraph. Everything > restored > > fine after closing and revisiting the file. > > > > I was hoping someone else would jump in and interpret those debugging > > messages, because I'm not proficient enough in Emacs Lisp yet, nor > familiar > > enough with the org-mode code base. All I can do is try and reproduce > your > > error. The code seems to be robust, though. > > > > Tried my best with what I have, > > > > 42 > > > > > Thanks for looking into this. I found some time to investigate and > haven't been able to reproduce the problem. It all seems to work as > advertised (and I like it). > > Sorry for the noise. > > Tom > > > -- > Thomas S. Dye > http://www.tsdye.com > [-- Attachment #2: Type: text/html, Size: 2306 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: saving state of buffer 2013-03-21 9:05 ` 42 147 2013-03-21 9:23 ` Rainer M Krug @ 2013-03-21 9:47 ` Carsten Dominik 1 sibling, 0 replies; 24+ messages in thread From: Carsten Dominik @ 2013-03-21 9:47 UTC (permalink / raw) To: 42 147; +Cc: Loyall, David, Org Mode [-- Attachment #1: Type: text/plain, Size: 1641 bytes --] On 21 mrt. 2013, at 10:05, 42 147 <aeuster@gmail.com> wrote: > Thanks David, but what Carsten suggested completely resolved my problem (it > applies not just to bookmarks; it fully preserves my buffer's folded state > after adding Christoph's code to my .emacs). I don't think it preserves a state. It constructs one, and you happen to like it. :) - Carsten > But I should also thank you > for finding the words I struggled to find ("folded state"). > > I feel honored that royalty stepped into the discussion. > > Herzlichen Dank, > > 42 > > > 2013/3/21 Carsten Dominik <carsten.dominik@gmail.com> > > On 20.3.2013, at 19:28, 42 147 <aeuster@gmail.com> wrote: > >> > (require 'saveplace) >> > (setq-default save-place t) >> >> > works for me. It just opens the place where I had the point, nothing >> > more, but that's what I need most. >> >> This is more convenient than Emacs bookmarks, but still breaks org-mode to >> a certain extent: all non top-level headlines below point are hidden. At >> least for me. >> > > Org-mode has very precise control for situations when a jump into invisible text happens, for example by isearch or by bookmark-jump or saveplace. Take a look at the variable org-show-siblings and set a special context for bookmark-jump, that should do it. This will work for both saveplace and bookmarks. > > You can do this with customize, or just like this: > > (setq org-show-siblings '((default) (isearch t) (bookmark-jump . t))) > > There are companion variables, they are all in the customization group org-reveal-context. > > - Carsten > [-- Attachment #2: Type: text/html, Size: 2685 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2013-04-06 1:03 UTC | newest] Thread overview: 24+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-20 11:19 saving state of buffer 42 147 2013-03-20 13:49 ` Bastien 2013-03-20 17:00 ` 42 147 2013-03-20 17:09 ` Christoph 2013-03-20 18:28 ` 42 147 2013-03-20 18:57 ` Loyall, David 2013-03-21 6:58 ` Carsten Dominik 2013-03-21 7:14 ` Marcin Borkowski 2013-03-21 9:05 ` 42 147 2013-03-21 9:23 ` Rainer M Krug 2013-03-21 9:28 ` Carsten Dominik 2013-03-21 9:42 ` Rainer M Krug 2013-03-21 10:16 ` 42 147 2013-03-21 11:02 ` Carsten Dominik 2013-03-21 11:25 ` Rainer M Krug 2013-03-21 11:38 ` Carsten Dominik 2013-03-21 11:59 ` Rainer M Krug 2013-03-21 13:50 ` Carsten Dominik 2013-04-06 1:03 ` Bastien 2013-03-21 16:10 ` Thomas S. Dye 2013-03-22 16:36 ` 42 147 2013-03-22 21:30 ` Thomas S. Dye 2013-03-22 22:24 ` 42 147 2013-03-21 9:47 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).