From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: parsing options Date: Tue, 16 Aug 2011 22:03:30 +0200 Message-ID: <877h6di0od.fsf@gnu.org> References: <87d3gue017.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtPqe-0003DS-8u for emacs-orgmode@gnu.org; Tue, 16 Aug 2011 16:02:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QtPqc-0002Uw-RP for emacs-orgmode@gnu.org; Tue, 16 Aug 2011 16:02:52 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:57739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtPqc-0002Us-Iq for emacs-orgmode@gnu.org; Tue, 16 Aug 2011 16:02:50 -0400 Received: by wwj26 with SMTP id 26so2522241wwj.0 for ; Tue, 16 Aug 2011 13:02:49 -0700 (PDT) In-Reply-To: <87d3gue017.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Thu, 28 Jul 2011 11:24:20 -0700") 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: Eric Abrahamsen Cc: emacs-orgmode@gnu.org Hi Eric, Eric Abrahamsen writes: > Is there a generic function for parsing options lines at the top of a > file? See `org-infile-export-plist'. > 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). `org-set-regexps-and-options' is used to set options keywords and regexp, so depending on what you exactly want to do, you may have to add your own options keywords here... > 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)? Mhh.. hard to help you more without knowing more precisely what you want to achieve. Perhaps an example would help. Thanks! -- Bastien