* Error "while: Stack overflow in regexp matcher" @ 2009-07-15 9:12 Sébastien Vauban 2009-07-15 10:54 ` Giovanni Ridolfi 2009-08-31 10:26 ` Carsten Dominik 0 siblings, 2 replies; 15+ messages in thread From: Sébastien Vauban @ 2009-07-15 9:12 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hello, I'm trying to publish my `.emacs' file onto the Web, for interested people to come and copy stuff they find valuable. My turn to do it. I did that in the past with Muse, no problem. But, now, I wanna do it with the real system... and I've always an error when trying to publish my config file: "while: Stack overflow in regexp matcher". Nothing gets published. Of course, my `.emacs' file is quite long, but that worked within similar technology (htmlize [¹]) with Muse. This is my simplified `dot-emacs.org' file: --8<---------------cut here---------------start------------->8--- #+TITLE: Emacs Init File #+LANGUAGE: en * Init File Here is my init file: #+INCLUDE: "~/.emacs" src emacs-lisp Rather long, no? --8<---------------cut here---------------end--------------->8--- Can anyone help me, please, suggesting me how to go one step further to the light? Best regards, Seb [¹] Yes, I'm using the version of Carsten, being Emacs 23 user. -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-07-15 9:12 Error "while: Stack overflow in regexp matcher" Sébastien Vauban @ 2009-07-15 10:54 ` Giovanni Ridolfi 2009-07-15 11:54 ` Sébastien Vauban 2009-08-31 10:26 ` Carsten Dominik 1 sibling, 1 reply; 15+ messages in thread From: Giovanni Ridolfi @ 2009-07-15 10:54 UTC (permalink / raw) To: emacs-orgmode, Sébastien Vauban --- Mer 15/7/09, Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> ha scritto: > I'm trying to publish my `.emacs' file onto the Web [...] > I've always an error when > trying to publish my config file: > > "while: Stack overflow in regexp matcher". > > Nothing gets published. Of course, my `.emacs' file is > quite long, but that > worked within similar technology (htmlize [¹]) with Muse. > > This is my simplified `dot-emacs.org' file: > > --8<---------------cut > here---------------start------------->8--- > #+TITLE: Emacs Init File > #+LANGUAGE: en > > > * Init File > > Here is my init file: > > #+INCLUDE: "~/.emacs" src emacs-lisp > > Rather long, no? > --8<---------------cut > here---------------end--------------->8--- > > [¹] Yes, I'm using the version of Carsten, being Emacs 23 > user. > here, with your file, htmlize.el 21 November 2008 : ;; Author: Hrvoje Niksic <hniksic@xemacs.org> ;; Modified by: Carsten Dominik <carsten at orgmode dot org> in my org\lisp directory that is in path GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600) of 2009-05-24 on SOFT-MJASON Org-mode version 6.28trans my .emacs is published ok. (15 kb) However a 791 kb org file (147443 lines) gives the error: org-export-select-backend-specific-text: Stack overflow in regexp matcher :-( cheers, Giovanni ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-07-15 10:54 ` Giovanni Ridolfi @ 2009-07-15 11:54 ` Sébastien Vauban 2009-07-29 9:28 ` Sébastien Vauban 0 siblings, 1 reply; 15+ messages in thread From: Sébastien Vauban @ 2009-07-15 11:54 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi, Giovanni Ridolfi wrote: > Sébastien Vauban ha scritto: >> I'm trying to publish my `.emacs' file onto the Web >> [...] >> I've always an error when trying to publish my config file: >> >> "while: Stack overflow in regexp matcher". >> >> Nothing gets published. Of course, my `.emacs' file is quite long, but that >> worked within similar technology (htmlize [¹]) with Muse. >> >> This is my simplified `dot-emacs.org' file: >> --8<---------------cut here---------------start------------->8--- #+TITLE: Emacs Init File #+LANGUAGE: en * Init File Here is my init file: #+INCLUDE: "~/.emacs" src emacs-lisp Rather long, no? --8<---------------cut here---------------end--------------->8--- >> >> [¹] Yes, I'm using the version of Carsten, being Emacs 23 user. > > here, with your file, > > htmlize.el 21 November 2008 : > ;; Author: Hrvoje Niksic <hniksic-Sn97VrDLz2sdnm+yROfE0A@public.gmane.org> > ;; Modified by: Carsten Dominik <carsten at orgmode dot org> > in my org\lisp directory that is in path ,----[ ~/Downloads/emacs/site-lisp/org-mode/contrib/lisp/htmlize.el ] | | ;; htmlize.el -- Convert buffer text and decorations to HTML. | | ;; Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005,2006,2009 Hrvoje Niksic `---- Weird. Though my htmlize file is coming from org-mode/contrib/lisp, there is no reference to Carsten, like in yours. > GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600) of 2009-05-24 on SOFT-MJASON FYI, I'm having `GNU Emacs 23.0.94.1 (i486-pc-linux-gnu, GTK+ Version 2.16.1) of 2009-06-18 on samarium, modified by Debian'. > Org-mode version 6.28trans FYI, I'm using `Org-mode version 6.28trans' as well. > my .emacs is published ok. (15 kb) > > However a 791 kb org file (147443 lines) My `.emacs' file is 7,844 lines long, for a total of 278 KBytes. > gives the error: > org-export-select-backend-specific-text: Stack overflow in regexp matcher > > :-( So, exactly the same problem when the file gets longer... Best regards, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-07-15 11:54 ` Sébastien Vauban @ 2009-07-29 9:28 ` Sébastien Vauban 2009-07-29 9:49 ` Bastien 2009-08-20 8:35 ` Sébastien Vauban 0 siblings, 2 replies; 15+ messages in thread From: Sébastien Vauban @ 2009-07-29 9:28 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi, Can I give this thread a bump? I still have the problem with not being able to share my `.emacs' file, and get to the last publishing step. Sébastien Vauban wrote: > Giovanni Ridolfi wrote: >> Sébastien Vauban ha scritto: >>> I'm trying to publish my `.emacs' file onto the Web [...]. I've always an >>> error when trying to publish my config file: "while: Stack overflow in >>> regexp matcher". >>> >>> Nothing gets published. Of course, my `.emacs' file is quite long, but that >>> [same file got published with Muse/htmlize]. >>> >>> This is my simplified `dot-emacs.org' file: >>> --8<---------------cut here---------------start------------->8--- #+TITLE: Emacs Init File #+LANGUAGE: en * Init File Here is my init file: #+INCLUDE: "~/.emacs" src emacs-lisp --8<---------------cut here---------------end--------------->8--- > > FYI, I'm having `GNU Emacs 23.0.94.1 (i486-pc-linux-gnu, GTK+ Version > 2.16.1) of 2009-06-18 on samarium, modified by Debian' and `Org-mode > version 6.28trans'. >> >> my .emacs is published ok. (15 kb) >> However a 791 kb org file (147443 lines) gives the error: >> org-export-select-backend-specific-text: Stack overflow in regexp matcher > > So, exactly the same problem when the file gets longer... Best regards, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Error "while: Stack overflow in regexp matcher" 2009-07-29 9:28 ` Sébastien Vauban @ 2009-07-29 9:49 ` Bastien 2009-07-29 11:13 ` Sébastien Vauban 2009-08-20 8:35 ` Sébastien Vauban 1 sibling, 1 reply; 15+ messages in thread From: Bastien @ 2009-07-29 9:49 UTC (permalink / raw) To: Sébastien Vauban; +Cc: emacs-orgmode Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes: > Can I give this thread a bump? I still have the problem with not being able > to share my `.emacs' file, and get to the last publishing step. Can you send me your .emacs file off-list? I will try to export this tonight or tomorrow. Thanks, -- Bastien ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-07-29 9:49 ` Bastien @ 2009-07-29 11:13 ` Sébastien Vauban 0 siblings, 0 replies; 15+ messages in thread From: Sébastien Vauban @ 2009-07-29 11:13 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Bastien, Bastien wrote: > Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes: > >> Can I give this thread a bump? I still have the problem with not being able >> to share my `.emacs' file, and get to the last publishing step. > > Can you send me your .emacs file off-list? Of course, I do that in a minute. > I will try to export this tonight or tomorrow. Thank you very much in advance, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-07-29 9:28 ` Sébastien Vauban 2009-07-29 9:49 ` Bastien @ 2009-08-20 8:35 ` Sébastien Vauban 2009-08-20 13:48 ` Bastien 1 sibling, 1 reply; 15+ messages in thread From: Sébastien Vauban @ 2009-08-20 8:35 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Bastien, > Can I give this thread a bump? I still have the problem with not being able > to share my `.emacs' file, and get to the last publishing step. > >> So, exactly the same problem when the file gets longer... Any news about the HTMLize problem with long files? Best regards, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Error "while: Stack overflow in regexp matcher" 2009-08-20 8:35 ` Sébastien Vauban @ 2009-08-20 13:48 ` Bastien 0 siblings, 0 replies; 15+ messages in thread From: Bastien @ 2009-08-20 13:48 UTC (permalink / raw) To: Sébastien Vauban; +Cc: emacs-orgmode Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes: >> Can I give this thread a bump? I still have the problem with not being able >> to share my `.emacs' file, and get to the last publishing step. >> >>> So, exactly the same problem when the file gets longer... > > Any news about the HTMLize problem with long files? Sorry no - some unexpected job constraints make me travel again, I have to prepare this. Maybe someone else can take this challenge? Best, -- Bastien ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-07-15 9:12 Error "while: Stack overflow in regexp matcher" Sébastien Vauban 2009-07-15 10:54 ` Giovanni Ridolfi @ 2009-08-31 10:26 ` Carsten Dominik 2009-09-01 0:28 ` Bernt Hansen 2009-09-02 16:05 ` Sébastien Vauban 1 sibling, 2 replies; 15+ messages in thread From: Carsten Dominik @ 2009-08-31 10:26 UTC (permalink / raw) To: Sébastien Vauban; +Cc: emacs-orgmode Hi, Sebastien has now (off-list) made it possible for me to reproduce this bug. Which is why it finally has been fixed. - Carsten On Jul 15, 2009, at 11:12 AM, Sébastien Vauban wrote: > Hello, > > I'm trying to publish my `.emacs' file onto the Web, for interested > people to > come and copy stuff they find valuable. My turn to do it. > > I did that in the past with Muse, no problem. > > But, now, I wanna do it with the real system... and I've always an > error when > trying to publish my config file: > > "while: Stack overflow in regexp matcher". > > Nothing gets published. Of course, my `.emacs' file is quite long, > but that > worked within similar technology (htmlize [¹]) with Muse. > > This is my simplified `dot-emacs.org' file: > > --8<---------------cut here---------------start------------->8--- > #+TITLE: Emacs Init File > #+LANGUAGE: en > > > * Init File > > Here is my init file: > > #+INCLUDE: "~/.emacs" src emacs-lisp > > Rather long, no? > --8<---------------cut here---------------end--------------->8--- > > Can anyone help me, please, suggesting me how to go one step further > to the > light? > > Best regards, > Seb > > [¹] Yes, I'm using the version of Carsten, being Emacs 23 user. > > -- > Sébastien Vauban > > > > _______________________________________________ > 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 ======================= PLEASE NOTE NEW ADDRESS ======================= prof.dr. Carsten Dominik dominik@uva.nl Astronomical Institute 'Anton Pannekoek' www.astro.uva.nl/~dominik Faculty of Science, University of Amsterdam phone +31-20-5257477/7491 SCIENCE PARK 904, ROOM C4-106 fax +31-20-5257484 1098 XH Amsterdam, The Netherlands mail: PO BOX 94249, 1090GE, Amsterdam ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-08-31 10:26 ` Carsten Dominik @ 2009-09-01 0:28 ` Bernt Hansen 2009-09-02 16:05 ` Sébastien Vauban 1 sibling, 0 replies; 15+ messages in thread From: Bernt Hansen @ 2009-09-01 0:28 UTC (permalink / raw) To: Carsten Dominik; +Cc: Sébastien Vauban, emacs-orgmode Carsten Dominik <dominik@uva.nl> writes: > Sebastien has now (off-list) made it possible for me to > reproduce this bug. Which is why it finally has been fixed. Cool! I actually ran into this bug a couple of days ago. My solution at the time was to rip out half of the stuff in my #+begin_example...#+end_example and put the entire thing in a :noexport: task so I still had the original. It works great now! Thanks for fixing it. -Bernt ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-08-31 10:26 ` Carsten Dominik 2009-09-01 0:28 ` Bernt Hansen @ 2009-09-02 16:05 ` Sébastien Vauban 2009-09-03 6:51 ` Carsten Dominik 1 sibling, 1 reply; 15+ messages in thread From: Sébastien Vauban @ 2009-09-02 16:05 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Carsten, Carsten Dominik wrote: > On Jul 15, 2009, at 11:12 AM, Sébastien Vauban wrote: >> >> I'm trying to publish my `.emacs' file onto the Web, for interested people >> to come and copy stuff they find valuable. My turn to do it. >> >> I did that in the past with Muse, no problem. >> >> But, now, I wanna do it with the real system... and I've always an error >> when trying to publish my config file: >> >> "while: Stack overflow in regexp matcher". >> >> Nothing gets published. Of course, my `.emacs' file is quite long, but that >> worked within similar technology (htmlize [¹]) with Muse. >> >> [¹] Yes, I'm using the version of Carsten, being Emacs 23 user. > > Sebastien has now (off-list) made it possible for me to reproduce this bug. > Which is why it finally has been fixed. Thank you very much. This works as expected [²]. Fan-tas-tic! Thanks for all, Seb [²] The only minor thing -- this is a small detail! -- is that my buffer uses `outline-minor-mode' and Org-level-* titles in comments (based on the code of Tassilo) for enhancing the readability of any long file (here, my `.emacs'). While these titles are properly highlighted (other color, bigger font) when read under Emacs, they are not in the HTMLized version of the buffer. --8<---------------cut here---------------start------------->8--- ;;** --[ Environment ]--------------------- --8<---------------cut here---------------end--------------->8--- simply becomes: --8<---------------cut here---------------start------------->8--- <span style="color: #ff0000;">;;</span> <span style="color: #ff0000;">** --[ Environment ]---------------------</span> --8<---------------cut here---------------end--------------->8--- in HTML, while it should be fontified as the Org-level-1 face: --8<---------------cut here---------------start------------->8--- (org-level-1 ((t (:foreground "cornflower blue" :weight bold :height 1.8 :family "Arial")))) --8<---------------cut here---------------end--------------->8--- -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Error "while: Stack overflow in regexp matcher" 2009-09-02 16:05 ` Sébastien Vauban @ 2009-09-03 6:51 ` Carsten Dominik 2009-09-03 7:54 ` Sébastien Vauban 0 siblings, 1 reply; 15+ messages in thread From: Carsten Dominik @ 2009-09-03 6:51 UTC (permalink / raw) To: Sébastien Vauban; +Cc: emacs-orgmode On Sep 2, 2009, at 6:05 PM, Sébastien Vauban wrote: > Hi Carsten, > > Carsten Dominik wrote: >> On Jul 15, 2009, at 11:12 AM, Sébastien Vauban wrote: >>> >>> I'm trying to publish my `.emacs' file onto the Web, for >>> interested people >>> to come and copy stuff they find valuable. My turn to do it. >>> >>> I did that in the past with Muse, no problem. >>> >>> But, now, I wanna do it with the real system... and I've always an >>> error >>> when trying to publish my config file: >>> >>> "while: Stack overflow in regexp matcher". >>> >>> Nothing gets published. Of course, my `.emacs' file is quite long, >>> but that >>> worked within similar technology (htmlize [¹]) with Muse. >>> >>> [¹] Yes, I'm using the version of Carsten, being Emacs 23 user. >> >> Sebastien has now (off-list) made it possible for me to reproduce >> this bug. >> Which is why it finally has been fixed. > > Thank you very much. This works as expected [²]. > > Fan-tas-tic! > > Thanks for all, > Seb > > [²] The only minor thing -- this is a small detail! -- is that my > buffer uses > `outline-minor-mode' and Org-level-* titles in comments (based on > the code > of Tassilo) for enhancing the readability of any long file (here, > my > `.emacs'). > > While these titles are properly highlighted (other color, bigger > font) > when read under Emacs, they are not in the HTMLized version of > the buffer. What is the setup for getting this special fontification? How do you activate it? In a mode hook? Org just sets the proper mode to get the fontification, so I do not understand why this would not work. - Carsten > > --8<---------------cut here---------------start------------->8--- > ;;** --[ Environment ]--------------------- > --8<---------------cut here---------------end--------------->8--- > > simply becomes: > > --8<---------------cut here---------------start------------->8--- > <span style="color: #ff0000;">;;</span> > <span style="color: #ff0000;">** -- > [ Environment ]---------------------</span> > --8<---------------cut here---------------end--------------->8--- > > in HTML, while it should be fontified as the Org-level-1 face: > > --8<---------------cut here---------------start------------->8--- > (org-level-1 ((t (:foreground "cornflower blue" :weight bold > :height 1.8 :family "Arial")))) > --8<---------------cut here---------------end--------------->8--- > > -- > Sébastien Vauban > > > > _______________________________________________ > 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] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-09-03 6:51 ` Carsten Dominik @ 2009-09-03 7:54 ` Sébastien Vauban 2009-09-03 8:02 ` Carsten Dominik 0 siblings, 1 reply; 15+ messages in thread From: Sébastien Vauban @ 2009-09-03 7:54 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Carsten, Carsten Dominik wrote: > On Sep 2, 2009, at 6:05 PM, Sébastien Vauban wrote: >> Carsten Dominik wrote: >>> On Jul 15, 2009, at 11:12 AM, Sébastien Vauban wrote: >>>> >>>> I'm trying to publish my `.emacs' file onto the Web, for interested people >>>> to come and copy stuff they find valuable. My turn to do it. >>>> >>>> But, now, I wanna do it... and I've always an error when trying to >>>> publish my config file: "while: Stack overflow in regexp matcher". >>> >>> Sebastien has now (off-list) made it possible for me to reproduce this >>> bug. Which is why it finally has been fixed. >> >> Thank you very much. This works as expected [²]. Fan-tas-tic! >> >> Thanks for all, >> Seb >> >> [²] The only minor thing -- this is a small detail! -- is that my buffer >> uses `outline-minor-mode' and Org-level-* titles in comments (based on >> the code of Tassilo) for enhancing the readability of any long file >> (here, my `.emacs'). >> >> While these titles are properly highlighted (other color, bigger font) >> when read under Emacs, they are not in the HTMLized version of the >> buffer. >> >> --8<---------------cut here---------------start------------->8--- >> ;;** --[ Environment ]--------------------- >> --8<---------------cut here---------------end--------------->8--- >> >> simply becomes: >> >> --8<---------------cut here---------------start------------->8--- >> <span style="color: #ff0000;">;;</span> >> <span style="color: #ff0000;">** -- >> [ Environment ]---------------------</span> >> --8<---------------cut here---------------end--------------->8--- >> >> in HTML, while it should be fontified as the Org-level-1 face: >> >> --8<---------------cut here---------------start------------->8--- >> (org-level-1 ((t (:foreground "cornflower blue" :weight bold >> :height 1.8 :family "Arial")))) >> --8<---------------cut here---------------end--------------->8--- > > What is the setup for getting this special fontification? Having such a code in your `.emacs' file: --8<---------------cut here---------------start------------->8--- ;; Org-style folding for a `.emacs' (and much more) (defun my-outline-regexp () "Calculate the outline regexp for the current mode." (let ((comment-starter (replace-regexp-in-string "[[:space:]]+" "" comment-start))) (when (string= comment-start ";") (setq comment-starter ";;")) (concat comment-starter "[*]+ "))) (defun my-outline-minor-mode-hook () (interactive) (setq outline-regexp (my-outline-regexp)) ;; highlight the headings (let ((heading-1-regexp (concat (substring outline-regexp 0 -1) "\\{1\\} \\(.*\\)")) (heading-2-regexp (concat (substring outline-regexp 0 -1) "\\{2\\} \\(.*\\)")) (heading-3-regexp (concat (substring outline-regexp 0 -1) "\\{3\\} \\(.*\\)")) (heading-4-regexp (concat (substring outline-regexp 0 -1) "\\{4,\\} \\(.*\\)"))) (font-lock-add-keywords nil `((,heading-1-regexp 1 'org-level-1 t) (,heading-2-regexp 1 'org-level-2 t) (,heading-3-regexp 1 'org-level-3 t) (,heading-4-regexp 1 'org-level-4 t))))) (add-hook 'outline-minor-mode-hook 'my-outline-minor-mode-hook) --8<---------------cut here---------------end--------------->8--- > How do you activate it? In a mode hook? ... and adding "outline-minor" as a cookie or local variable in the file where you want to use the `org-level-*' titles. In my case, I have this at the bottom of my `.emacs' file: --8<---------------cut here---------------start------------->8--- ;; This is for the sake of Emacs. ;; Local Variables: ;; coding: utf-8 ;; mode: emacs-lisp ;; mode: outline-minor ;; ispell-local-dictionary: "american" ;; End: ;;; .emacs ends here --8<---------------cut here---------------end--------------->8--- Now, you can add `;;*' and `;;**', etc. as headings in your `.emacs' and cycle using `M-tab', `M-left' and `M-right' will collapse or expand all headings respectively. See the thread "Org-style folding for a .emacs" discussed here in mid-July: http://www.mail-archive.com/emacs-orgmode-mXXj517/zsQ@public.gmane.org/msg15439.html > Org just sets the proper mode to get the fontification, so > I do not understand why this would not work. Best regards, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Error "while: Stack overflow in regexp matcher" 2009-09-03 7:54 ` Sébastien Vauban @ 2009-09-03 8:02 ` Carsten Dominik 2009-09-03 12:17 ` Sébastien Vauban 0 siblings, 1 reply; 15+ messages in thread From: Carsten Dominik @ 2009-09-03 8:02 UTC (permalink / raw) To: Sébastien Vauban; +Cc: emacs-orgmode Hi Sebastien, I see. Well, Org does not *visit* the file, so these variables are not evaluated. Also, the argument of the #+include line determines the major mode, not the local variable setting. You can hack your way through this by adding a function to org-src-mode-hook that will scan for mode: outline-minor and turn it on if found. I guess I could also consider to fully *visit* an include file, to work around these restrictions. The main reason why I am not doing this right now is because the exact same mechanism is used for inline examples and include files, and it would be significant work to change this..... - Carsten On Sep 3, 2009, at 9:54 AM, Sébastien Vauban wrote: > Hi Carsten, > > Carsten Dominik wrote: >> On Sep 2, 2009, at 6:05 PM, Sébastien Vauban wrote: >>> Carsten Dominik wrote: >>>> On Jul 15, 2009, at 11:12 AM, Sébastien Vauban wrote: >>>>> >>>>> I'm trying to publish my `.emacs' file onto the Web, for >>>>> interested people >>>>> to come and copy stuff they find valuable. My turn to do it. >>>>> >>>>> But, now, I wanna do it... and I've always an error when trying to >>>>> publish my config file: "while: Stack overflow in regexp matcher". >>>> >>>> Sebastien has now (off-list) made it possible for me to reproduce >>>> this >>>> bug. Which is why it finally has been fixed. >>> >>> Thank you very much. This works as expected [²]. Fan-tas-tic! >>> >>> Thanks for all, >>> Seb >>> >>> [²] The only minor thing -- this is a small detail! -- is that my >>> buffer >>> uses `outline-minor-mode' and Org-level-* titles in comments >>> (based on >>> the code of Tassilo) for enhancing the readability of any long >>> file >>> (here, my `.emacs'). >>> >>> While these titles are properly highlighted (other color, >>> bigger font) >>> when read under Emacs, they are not in the HTMLized version of >>> the >>> buffer. >>> >>> --8<---------------cut here---------------start------------->8--- >>> ;;** --[ Environment ]--------------------- >>> --8<---------------cut here---------------end--------------->8--- >>> >>> simply becomes: >>> >>> --8<---------------cut here---------------start------------->8--- >>> <span style="color: #ff0000;">;;</span> >>> <span style="color: #ff0000;">** -- >>> [ Environment ]---------------------</span> >>> --8<---------------cut here---------------end--------------->8--- >>> >>> in HTML, while it should be fontified as the Org-level-1 face: >>> >>> --8<---------------cut here---------------start------------->8--- >>> (org-level-1 ((t (:foreground "cornflower blue" :weight bold >>> :height 1.8 :family "Arial")))) >>> --8<---------------cut here---------------end--------------->8--- >> >> What is the setup for getting this special fontification? > > Having such a code in your `.emacs' file: > > --8<---------------cut here---------------start------------->8--- > ;; Org-style folding for a `.emacs' (and much more) > > (defun my-outline-regexp () > "Calculate the outline regexp for the current mode." > (let ((comment-starter (replace-regexp-in-string > "[[:space:]]+" "" comment-start))) > (when (string= comment-start ";") > (setq comment-starter ";;")) > (concat comment-starter "[*]+ "))) > > (defun my-outline-minor-mode-hook () > (interactive) > (setq outline-regexp (my-outline-regexp)) > > ;; highlight the headings > (let ((heading-1-regexp > (concat (substring outline-regexp 0 -1) "\\{1\\} \\(.*\\)")) > (heading-2-regexp > (concat (substring outline-regexp 0 -1) "\\{2\\} \\(.*\\)")) > (heading-3-regexp > (concat (substring outline-regexp 0 -1) "\\{3\\} \\(.*\\)")) > (heading-4-regexp > (concat (substring outline-regexp 0 -1) "\\{4,\\} \\(.*\ > \)"))) > (font-lock-add-keywords > nil > `((,heading-1-regexp 1 'org-level-1 t) > (,heading-2-regexp 1 'org-level-2 t) > (,heading-3-regexp 1 'org-level-3 t) > (,heading-4-regexp 1 'org-level-4 t))))) > > (add-hook 'outline-minor-mode-hook > 'my-outline-minor-mode-hook) > --8<---------------cut here---------------end--------------->8--- > > >> How do you activate it? In a mode hook? > > ... and adding "outline-minor" as a cookie or local variable in the > file where > you want to use the `org-level-*' titles. > > In my case, I have this at the bottom of my `.emacs' file: > > --8<---------------cut here---------------start------------->8--- > ;; This is for the sake of Emacs. > ;; Local Variables: > ;; coding: utf-8 > ;; mode: emacs-lisp > ;; mode: outline-minor > ;; ispell-local-dictionary: "american" > ;; End: > > ;;; .emacs ends here > --8<---------------cut here---------------end--------------->8--- > > Now, you can add `;;*' and `;;**', etc. as headings in your `.emacs' > and cycle > using `M-tab', `M-left' and `M-right' will collapse or expand all > headings > respectively. > > See the thread "Org-style folding for a .emacs" discussed here in > mid-July: > > http://www.mail-archive.com/emacs-orgmode@gnu.org/msg15439.html > > >> Org just sets the proper mode to get the fontification, so >> I do not understand why this would not work. > > Best regards, > Seb > > -- > Sébastien Vauban > > > > _______________________________________________ > 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] 15+ messages in thread
* Re: Error "while: Stack overflow in regexp matcher" 2009-09-03 8:02 ` Carsten Dominik @ 2009-09-03 12:17 ` Sébastien Vauban 0 siblings, 0 replies; 15+ messages in thread From: Sébastien Vauban @ 2009-09-03 12:17 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Carsten, Carsten Dominik wrote: > I see. > > Well, Org does not *visit* the file, so these variables are > not evaluated. Also, the argument of the #+include line determines > the major mode, not the local variable setting. > > You can hack your way through this by adding a function > to org-src-mode-hook that will scan for > > mode: outline-minor > > and turn it on if found. > > I guess I could also consider to fully *visit* an include file, > to work around these restrictions. The main reason why I am not > doing this right now is because the exact same mechanism is used for > inline examples and include files, and it would be significant > work to change this..... I understand the problem. I'll follow your guideline if I wanna fix it. Best regards, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-09-03 12:17 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-15 9:12 Error "while: Stack overflow in regexp matcher" Sébastien Vauban 2009-07-15 10:54 ` Giovanni Ridolfi 2009-07-15 11:54 ` Sébastien Vauban 2009-07-29 9:28 ` Sébastien Vauban 2009-07-29 9:49 ` Bastien 2009-07-29 11:13 ` Sébastien Vauban 2009-08-20 8:35 ` Sébastien Vauban 2009-08-20 13:48 ` Bastien 2009-08-31 10:26 ` Carsten Dominik 2009-09-01 0:28 ` Bernt Hansen 2009-09-02 16:05 ` Sébastien Vauban 2009-09-03 6:51 ` Carsten Dominik 2009-09-03 7:54 ` Sébastien Vauban 2009-09-03 8:02 ` Carsten Dominik 2009-09-03 12:17 ` Sébastien Vauban
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).