From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: parsing options Date: Thu, 28 Jul 2011 11:24:20 -0700 Message-ID: <87d3gue017.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmVG8-0002dn-PC for emacs-orgmode@gnu.org; Thu, 28 Jul 2011 14:24:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmVG7-0007iX-QO for emacs-orgmode@gnu.org; Thu, 28 Jul 2011 14:24:36 -0400 Received: from lo.gmane.org ([80.91.229.12]:41317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmVG7-0007iN-KF for emacs-orgmode@gnu.org; Thu, 28 Jul 2011 14:24:35 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QmVG6-0004ld-Jf for emacs-orgmode@gnu.org; Thu, 28 Jul 2011 20:24:34 +0200 Received: from 63.226.249.211 ([63.226.249.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jul 2011 20:24:34 +0200 Received: from eric by 63.226.249.211 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jul 2011 20:24:34 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Is there a generic function for parsing options lines at the top of a file? I'd like to use some custom lines to set certain file-specific variables, and haven't quite figured out the best way to do that. It looks like org-set-regexps-and-options does that when you open a new file, but that's a bear of a function, and doesn't provide for setting your own options (or at least doesn't appear to, my eyes crossed while reading it). Is there any smaller function available for our own minor modes or use cases? Should I just use regexp search? If there isn't anything like this, would one be useful (something that either found an option value or returned a default, or found an alist of option values, or found an alist of values for options matching a regexp, etc)? Thanks, Eric