From: David Maus <dmaus@ictsoc.de>
To: rpgoldman@sift.info
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: PATCH: Fix for agenda problems
Date: Mon, 02 Aug 2010 18:53:41 +0200 [thread overview]
Message-ID: <87hbjdq7l6.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <4C562282.5090802@sift.info>
[-- Attachment #1.1: Type: text/plain, Size: 2475 bytes --]
Robert Goldman wrote:
>On 8/1/10 Aug 1 -1:28 PM, David Maus wrote:
>> Robert Goldman wrote:
>>> [1 <text/plain; ISO-8859-1 (7bit)>]
>>> As far as I can tell, the current version of org-write-agenda evaluates
>>> ps-print-buffer-with-faces too eagerly. I tripped over this because
>>> aquamacs 2.0, which I'm using, seems to have ps-printing code that
>>> conflicts with org-mode's expectation.
>>
>>> The attached patch tries to fix this, but does not do the job
>>> particularly elegantly. Instead of EVALUATING the flet form, it
>>> MACROEXPANDS that form, which I believe is correct in this context.
>>
>> Yes, the intension of backquoting the flet macro was macroexpansion,
>> not evaluation. And it should work to solve the issue with cl not
>> loaded on runtime when calling `org-agenda-write'[1].
>>
>> Best,
>> -- David
>>
>> [1] Cf. http://thread.gmane.org/gmane.emacs.orgmode/26132/focus=26698
>Are you sure that my patch will work properly? I was looking at it, and
>it seems like the use of org-let might cause the list (the code) to be
>evaluated at run-time, and not at compile time, right?
AFAIK this is the case: The list is passed to org-let and evaluated
there at run-time. The backquotes were introduced to solve this
issue: A user might run `org-write-agenda' at a point where cl hasn't
be loaded (run-time dependency on cl.el). Because the whole lisp
structure is passed as a quoted list to org-let, the byte compiler
does not touch it. If it is evaluated at run-time and cl.el is not
loaded, `flet' is not fbound and `org-write-agenda' fails.
Writing this I realize that the original patch (using backquotes) as
well as the proposed patch using `macroexpand' does /not/ solve this
issue completely: It solves it for running byte-compiled Org, but not
non-byte-compiled Org.
>It occurs in org-agenda. Question: does this mean that the backquoted
>expression will be evaluated at run-time, or is the compiler aggressive
>enough to do it at compile-time?
The backquoted expression will be evaluated at compile-time.
Backquoting `flet' removes the run-time dependency on cl.el for byte
compiled code
(http://thread.gmane.org/gmane.emacs.orgmode/26132/focus=26698).
IMO using backquoted `macroexpand' is the way to go. I'll see if it
works as advertised (e.g. not causing org-write-agenda to fail when
run from byte compiled Org).
Best,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2010-08-02 16:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 23:21 PATCH: Fix for agenda problems Robert Goldman
2010-08-01 18:28 ` David Maus
2010-08-02 1:42 ` Robert Goldman
2010-08-02 16:53 ` David Maus [this message]
2010-08-12 16:31 ` [PATCH] Remove dependency of flet in org-write-agenda David Maus
2010-08-12 16:31 ` [PATCH] Rename temporary buffer to remove dependency of `flet' macro David Maus
2010-08-18 8:43 ` Carsten Dominik
2010-08-01 18:28 ` PATCH: Fix for agenda problems David Maus
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=87hbjdq7l6.wl%dmaus@ictsoc.de \
--to=dmaus@ictsoc.de \
--cc=emacs-orgmode@gnu.org \
--cc=rpgoldman@sift.info \
/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).