Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the Stack Size available for Emacs?

Tags:

emacs

elisp

When I run anything-c-etags-select command with relatively big TAGS file, I always get the error message like Stack overflow in regexp matcher inside the mini buffer on Emacs. In *Messages* buffer, there appears the log message as follows:

File TAGS is large (9MB), really open? (y or n) 
Loading tag file...70%
and: Stack overflow in regexp matcher

It seems that Emacs doesn't have enough stack size to read whole tag data. Is there any way to increase stack size for Emacs?

I tried this with 2 versions of Emacs:

  • Emacs For Mac OS X 24.1 (Universal Binary)
  • Emacs For Mac OS X 23.4 (Universal Binary)

But, both of them showed the same error message.

Thanks in advance!

like image 895
mahata Avatar asked Jun 29 '12 21:06

mahata


1 Answers

Possibly easy workarounds for you:

  • http://www.emacswiki.org/emacs/MultilineRegexp

Better yet: [\0-\377[:nonascii:]]* avoids “Stack overflow in regexp matcher” for huge texts, e.g., > 34k.

... and/or ...

  • http://www.svi.nl/EmacsProgrammingTips

My tags tables are in different places, depending on the code I'm working with. I found it easy to have an environmental variable $DEVELOP pointing to the directory I'm working in, which has TAGS for Emacs and tags for vi.

like image 181
paulsm4 Avatar answered Nov 03 '22 01:11

paulsm4