From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [PATCH] Adding features to contrib/lisp/org-collector.el (propview) Date: Fri, 28 Oct 2011 08:37:29 -0600 Message-ID: <87bot1uqqe.fsf@gmail.com> References: <4EAA76DA.6070304@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJnYt-0001O7-K4 for emacs-orgmode@gnu.org; Fri, 28 Oct 2011 10:37:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJnYs-0006Gm-3Z for emacs-orgmode@gnu.org; Fri, 28 Oct 2011 10:37:35 -0400 Received: from mail-pz0-f47.google.com ([209.85.210.47]:51609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJnYr-0006Gc-VE for emacs-orgmode@gnu.org; Fri, 28 Oct 2011 10:37:34 -0400 Received: by pzd13 with SMTP id 13so10586063pzd.6 for ; Fri, 28 Oct 2011 07:37:33 -0700 (PDT) In-Reply-To: <4EAA76DA.6070304@gmail.com> (Jonathan BISSON's message of "Fri, 28 Oct 2011 11:33:14 +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: Jonathan BISSON Cc: emacs-orgmode@gnu.org Hi Jonathan, This does sound useful. Unfortunately your email client seems to have mangled the patch, could you resend with the patch attached rather than pasted inline? Thanks -- Eric Jonathan BISSON writes: > Hi there, > > > I did a small patch for org-collector. > > Here are the changes : > - Adding a :colnames property, allowing to give the column names > (instead of displaying the function used to populate the table) > - Adding a :noquote property, allowing to remove the double quotes > around strings > > I hope some of you would find it useful. > > 121a122,123 >> (noquote (plist-get params :noquote)) >> (colnames (plist-get params :colnames)) > 132a135 >> (setq stringformat (if noquote "%s" "%S")) > 134c137,138 > < (org-propview-collect cols conds match scope inherit))) > --- >> (org-propview-collect cols stringformat conds match scope > inherit >> (if colnames colnames cols)) stringformat)) > 170c174 > < (defun org-propview-collect (cols &optional conds match scope inherit) > --- >> (defun org-propview-collect (cols stringformat &optional conds match > scope inherit colnames) > 194,195c198,199 > < (mapcar (lambda (el) (format "%S" el)) cols) ;; output headers > < 'hline) ;; ------------------------------------------------ > --- >> (if colnames colnames (mapcar (lambda (el) (format stringformat > el)) cols)) >> 'hline) ;; ------------------------------------------------ > 214c218 > < (defun org-propview-to-table (results) > --- >> (defun org-propview-to-table (results stringformat) > 221c225 > < (mapcar (lambda (el) (format "%S" el)) row))) > --- >> (mapcar (lambda (el) (format stringformat el)) row))) > -- Eric Schulte http://cs.unm.edu/~eschulte/