From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan BISSON Subject: [PATCH] Adding features to contrib/lisp/org-collector.el (propview) Date: Fri, 28 Oct 2011 11:33:14 +0200 Message-ID: <4EAA76DA.6070304@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE58528FCBB36C646F72E025C" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJind-0007HP-UE for emacs-orgmode@gnu.org; Fri, 28 Oct 2011 05:32:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJinc-0001EQ-Us for emacs-orgmode@gnu.org; Fri, 28 Oct 2011 05:32:29 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:51738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJinc-0001EK-PV for emacs-orgmode@gnu.org; Fri, 28 Oct 2011 05:32:28 -0400 Received: by wyg34 with SMTP id 34so4488687wyg.0 for ; Fri, 28 Oct 2011 02:32:28 -0700 (PDT) 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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE58528FCBB36C646F72E025C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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))) --------------enigE58528FCBB36C646F72E025C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EAREIAAYFAk6qdt0ACgkQC2YP/JcnKf0H3gEArYzPNYkQq0EN5DDN0+8xEFIM xiMNrSIivxUOtkaHCv0BALBu3WLPcmMBI2HSQbGJGWRUBjyr5YMgsOnC7w8jzDo/ =FIej -----END PGP SIGNATURE----- --------------enigE58528FCBB36C646F72E025C--