emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* orgstruct-mode for Emacs Lisp files
@ 2008-10-15  9:02 Daniel Clemente
  2008-10-15 11:05 ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Clemente @ 2008-10-15  9:02 UTC (permalink / raw)
  To: emacs-orgmode


  This has been addressed many times. Given an .el file with comments like:

; section 1
;; subsection 1
aaa
;;; subsubsection 1
e
;;; subsubsection 2
iiiiiii
;; section 2
....


  Then it would be useful to use TAB to cycle the state of those headings. There's outline-mode, but orgstruct-mode is directly usable for org users, and thus easier.
 
  However, I find that this procedure didn't work on org-mode 6.09:

1. open that file
2. evaluate (setq org-outline-regexp ";+ ")
3. M-x orgstruct-minor-mode


  The TAB key still works only on headers matching "\\*+ ", so I think that I'm changing the wrong regexp, or that orgstruct-mode didn't detect the change.

  Could you please add a paragraph in the manual, in the section „The Orgstruct minor mode“, that tells about how could you change the outline regexp in case a mode needs it?


  I found no documentation for org-outline-regexp (less than 10 results on many search engines!).


  Thanks,

Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: orgstruct-mode for Emacs Lisp files
  2008-10-15  9:02 orgstruct-mode for Emacs Lisp files Daniel Clemente
@ 2008-10-15 11:05 ` Carsten Dominik
  2008-10-16 16:51   ` Daniel Clemente
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2008-10-15 11:05 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: emacs-orgmode

Hi Daniel,

you should use outline-minor-mode, and then just call org-cycle while  
that mode is active.  The FAQ covers this issue

http://orgmode.org/worg/org-faq.php

under the question 'Can I get the visibility-cycling features in  
outline-mode and outline-minor-mode?'

- Carsten

On Oct 15, 2008, at 11:02 AM, Daniel Clemente wrote:

>
>  This has been addressed many times. Given an .el file with comments  
> like:
>
> ; section 1
> ;; subsection 1
> aaa
> ;;; subsubsection 1
> e
> ;;; subsubsection 2
> iiiiiii
> ;; section 2
> ....
>
>
>  Then it would be useful to use TAB to cycle the state of those  
> headings. There's outline-mode, but orgstruct-mode is directly  
> usable for org users, and thus easier.
>
>  However, I find that this procedure didn't work on org-mode 6.09:
>
> 1. open that file
> 2. evaluate (setq org-outline-regexp ";+ ")
> 3. M-x orgstruct-minor-mode
>
>
>  The TAB key still works only on headers matching "\\*+ ", so I  
> think that I'm changing the wrong regexp, or that orgstruct-mode  
> didn't detect the change.
>
>  Could you please add a paragraph in the manual, in the section „The  
> Orgstruct minor mode“, that tells about how could you change the  
> outline regexp in case a mode needs it?
>
>
>  I found no documentation for org-outline-regexp (less than 10  
> results on many search engines!).
>
>
>  Thanks,
>
> Daniel
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: orgstruct-mode for Emacs Lisp files
  2008-10-15 11:05 ` Carsten Dominik
@ 2008-10-16 16:51   ` Daniel Clemente
  2008-10-16 19:58     ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Clemente @ 2008-10-16 16:51 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


Hi,
  thanks, outline-minor-mode works. And after I set outline-regexp, it felt more like org-mode.

  However, it's not based in org-mode; for instance I could not move trees with M-up M-down and do other operations I like from org's outline.
  I thought orgstruct-mode would be better. But can orgstruct-mode do what the FAQ explains? From the manual it seems as if it could; therefore I think that it would be useful to explain in the manual (section 2.10) more about orgstruct's shortcomings or alternatives.


  Thanks,
Daniel

PS: yes, there's also outline-magic.el (by the way, the link in the FAQ goes to a cyclic „HTTP: Found“ page), but I would still prefer „orgstruct-mode“ over „outline-mode with additions“, since what I want is Org.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: orgstruct-mode for Emacs Lisp files
  2008-10-16 16:51   ` Daniel Clemente
@ 2008-10-16 19:58     ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2008-10-16 19:58 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: emacs-orgmode


On Oct 16, 2008, at 6:51 PM, Daniel Clemente wrote:

>
> Hi,
>  thanks, outline-minor-mode works. And after I set outline-regexp,  
> it felt more like org-mode.
>
>  However, it's not based in org-mode; for instance I could not move  
> trees with M-up M-down and do other operations I like from org's  
> outline.

>
>  I thought orgstruct-mode would be better. But can orgstruct-mode do  
> what the FAQ explains? From the manual it seems as if it could;  
> therefore I think that it would be useful to explain in the manual  
> (section 2.10) more about orgstruct's shortcomings or alternatives.

Not really.  Orgstruct-mode is based on Org, and that really assumes  
in many places that outline headings start with stars.  So many of the  
commands will not simply work by changing the outline-regexp.

>
>
>
>  Thanks,
> Daniel
>
> PS: yes, there's also outline-magic.el (by the way, the link in the  
> FAQ goes to a cyclic „HTTP: Found“ page), but I would still prefer  
> „orgstruct-mode“ over „outline-mode with additions“, since what I  
> want is Org.


I don't thin this will work, outline-magic is your best bet.

- Carsten

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-16 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-15  9:02 orgstruct-mode for Emacs Lisp files Daniel Clemente
2008-10-15 11:05 ` Carsten Dominik
2008-10-16 16:51   ` Daniel Clemente
2008-10-16 19:58     ` 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).