emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: David Maus <dmaus@ictsoc.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH 2/7] New macro: Evaluate FORM in ENVIRONMENT
Date: Tue, 02 Aug 2011 15:49:38 +0200	[thread overview]
Message-ID: <87ei13c499.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <1312277020-7888-3-git-send-email-dmaus@ictsoc.de>


[-- Attachment #1.1: Type: text/plain, Size: 47 bytes --]

Fix smashed up commits: these two replace 2/7


[-- Attachment #1.2: 0001-New-macro-Evaluate-FORM-in-ENVIRONMENT.patch --]
[-- Type: text/plain, Size: 919 bytes --]

From d55980b50dea594912b38bd7d9b96989c6a54129 Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@ictsoc.de>
Date: Tue, 2 Aug 2011 15:41:36 +0200
Subject: [PATCH] New macro: Evaluate FORM in ENVIRONMENT

* org-macs.el (org-eval-in-environment): New macro. Evaluate FORM in
ENVIRONMENT.
---
 lisp/org-macs.el |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 1d31744..4062f07 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -376,6 +376,10 @@ The number of levels is controlled by `org-inlinetask-min-level'"
       (format-seconds string seconds)
     (format-time-string string (seconds-to-time seconds))))
 
+(defmacro org-eval-in-environment (environment form)
+  `(eval '(let ,environment ,form)))
+(put 'org-eval-in-environment 'lisp-indent-function 1)
+
 (provide 'org-macs)
 
 ;; arch-tag: 7e6a73ce-aac9-4fc0-9b30-ce6f89dc6668
-- 
1.7.2.5


[-- Attachment #1.3: 0001-New-function-Return-alist-of-parameters-based-on-fla.patch --]
[-- Type: text/plain, Size: 1213 bytes --]

From 04a3f7c9c69faa59f1d9c6343dbb22b3faad3d52 Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@ictsoc.de>
Date: Tue, 2 Aug 2011 15:43:15 +0200
Subject: [PATCH] New function: Return alist of parameters based on flat list

* org-macs.el (org-make-parameter-alist): New function. Return alist
of parameters based on flat list.
---
 lisp/org-macs.el |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 4062f07..7a0cc60 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -376,6 +376,15 @@ The number of levels is controlled by `org-inlinetask-min-level'"
       (format-seconds string seconds)
     (format-time-string string (seconds-to-time seconds))))
 
+(defun org-make-parameter-alist (flat)
+  "Return alist based on FLAT.
+FLAT is a list with alternating symbol names and values. The
+returned alist is a list of lists with the symbol name in car and
+the value in cdr."
+  (when flat
+    (cons (list (car flat) (cadr flat))
+	  (org-make-parameter-alist (cddr flat)))))
+
 (defmacro org-eval-in-environment (environment form)
   `(eval '(let ,environment ,form)))
 (put 'org-eval-in-environment 'lisp-indent-function 1)
-- 
1.7.2.5


[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]

  parent reply	other threads:[~2011-08-02 13:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02  9:23 [PATCH 0/8] Org mode macros, refactored David Maus
2011-08-02  9:23 ` [PATCH 1/7] New macro: Execute BODY in enviroment with uninterned SYMBOLS David Maus
2011-08-02 13:48   ` David Maus
     [not found]   ` <CAJcAo8uv46JCx9cG0x_ip9DMQ-aN=buLRO_fONPoFuDkik6J1Q@mail.gmail.com>
2011-08-10  7:43     ` David Maus
2011-08-16 16:34       ` Bastien
2011-08-16 17:08         ` David Maus
2011-08-16 17:30           ` Bastien
2011-08-02  9:23 ` [PATCH 2/7] New macro: Evaluate FORM in ENVIRONMENT David Maus
2011-08-02 10:50   ` Štěpán Němec
2011-08-02 13:25     ` David Maus
2011-08-02 13:49   ` David Maus [this message]
2011-08-02  9:23 ` [PATCH 3/7] Use new macro org-with-uninterned David Maus
2011-08-02  9:23 ` [PATCH 4/7] New function: Substitute posix classes in regular expression David Maus
2011-08-02  9:23 ` [PATCH 5/7] Use macro org-with-uninterned David Maus
2011-08-02  9:23 ` [PATCH 6/7] Use org-eval-in-environment, make macros functions David Maus
2011-08-02  9:23 ` [PATCH 7/7] Make org-batch-store-agenda-views a fun, use org-eval-in-environment David Maus
2011-08-02  9:34 ` [PATCH 0/8] Org mode macros, refactored David Maus
2011-08-02 10:44 ` Štěpán Němec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ei13c499.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).