* org-capture with org-contacts template causing problems
@ 2013-03-03 17:40 Frank Terbeck
2013-03-04 10:40 ` Frank Terbeck
0 siblings, 1 reply; 4+ messages in thread
From: Frank Terbeck @ 2013-03-03 17:40 UTC (permalink / raw)
To: emacs-orgmode
Good day!
So, I tried giving org-contacts another go.
For capturing new contacts, I have this template configured (based on
the example on org-contacts.el):
#+begin_src elisp
(add-to-list 'org-capture-templates
'("c" "Contacts" entry (file "~/org/contacts.org")
"
** %(org-contacts-template-name)
:PROPERTIES:
:EMAIL: %(org-contacts-template-email)
:END:"))
#+end_src
When using `org-capture' (and then selecting "c" in the menu window), I
get the following error message in the "CAPTURE-contacts.org" buffer:
* %![Error: (invalid-function gnus-with-article-headers)]
:PROPERTIES:
:EMAIL: %![Error: (invalid-function gnus-with-article-headers)]
:END:
The following however works from the `*scratch*' buffer:
#+begin_src elisp
(gnus-with-article-headers
(mail-fetch-field "From"))
#+end_src
This is with an emacs snapshot, M-x version:
GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of
2013-03-01 on jim, modified by Debian
M-x org-version:
Org-mode version 7.9.3e (7.9.3e-3-gb07a9b @ /usr/share/emacs/24.3.50/lisp/org/)
This is with `org-contacts.el' from org-mode's git HEAD.
I'm unsure about how to debug this. Any pointers welcome.
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-capture with org-contacts template causing problems
2013-03-03 17:40 org-capture with org-contacts template causing problems Frank Terbeck
@ 2013-03-04 10:40 ` Frank Terbeck
2013-03-04 13:12 ` Frank Terbeck
0 siblings, 1 reply; 4+ messages in thread
From: Frank Terbeck @ 2013-03-04 10:40 UTC (permalink / raw)
To: emacs-orgmode
Frank Terbeck wrote:
[...]
> When using `org-capture' (and then selecting "c" in the menu window), I
> get the following error message in the "CAPTURE-contacts.org" buffer:
>
> * %![Error: (invalid-function gnus-with-article-headers)]
> :PROPERTIES:
> :EMAIL: %![Error: (invalid-function gnus-with-article-headers)]
> :END:
[...]
Turns out, this problem is triggered when I byte-compile org-contacts.el
inside my .emacs.d directory. The compilation process yields the
following warnings:
Compiling /home/hawk/.emacs.d/vendor/org-contacts.el...
In org-contacts-db-need-update-p:
vendor/org-contacts.el:169:14:Warning: function `some' from cl package called
at runtime
In org-contacts-filter:
vendor/org-contacts.el:211:37:Warning: function `some' from cl package called
at runtime
In org-contacts-test-completion-prefix:
vendor/org-contacts.el:373:12:Warning: function `find-if' from cl package
called at runtime
In org-contacts-complete-name:
vendor/org-contacts.el:445:71:Warning: function `remove-duplicates' from cl
package called at runtime
In org-contacts-gnus-insinuate:
vendor/org-contacts.el:646:15:Warning: reference to free variable
`gnus-summary-mode-map'
In end of data:
vendor/org-contacts.el:870:1:Warning: the following functions might not be
defined at runtime: some, find-if, remove-duplicates
vendor/org-contacts.el:870:1:Warning: the following functions are not known to
be defined: org-reverse-string, mail-abbrev-in-expansion-header-p,
gnus-with-article-headers, diary-ordinal-suffix, gnus-with-article-buffer,
elmo-message-field, std11-narrow-to-header, std11-fetch-field,
erc-get-channel-user-list, org-install-letbind, google-maps-static-show
Wrote /home/hawk/.emacs.d/vendor/org-contacts.elc
`org-capture' with the `org-contacts' template works fine if I move the
corresponding .elc file out of the way.
My guess is, that there are a few `requires' missing in the
`eval-and-compile' form on top of `org-contacts.el'. Maybe someone with
more intimate knowledge of the involved code than myself has an idea as
to how to fix this?
Regards, Frank
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-capture with org-contacts template causing problems
2013-03-04 10:40 ` Frank Terbeck
@ 2013-03-04 13:12 ` Frank Terbeck
2013-03-04 19:42 ` Bastien
0 siblings, 1 reply; 4+ messages in thread
From: Frank Terbeck @ 2013-03-04 13:12 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Julien Danjou
Frank Terbeck wrote:
> Frank Terbeck wrote:
> [...]
>> When using `org-capture' (and then selecting "c" in the menu window), I
>> get the following error message in the "CAPTURE-contacts.org" buffer:
>>
>> * %![Error: (invalid-function gnus-with-article-headers)]
>> :PROPERTIES:
>> :EMAIL: %![Error: (invalid-function gnus-with-article-headers)]
>> :END:
> [...]
>
> Turns out, this problem is triggered when I byte-compile org-contacts.el
> inside my .emacs.d directory. The compilation process yields the
> following warnings:
>
> Compiling /home/hawk/.emacs.d/vendor/org-contacts.el...
[...]
> vendor/org-contacts.el:870:1:Warning: the following functions are not known to
> be defined: org-reverse-string, mail-abbrev-in-expansion-header-p,
> gnus-with-article-headers, diary-ordinal-suffix, gnus-with-article-buffer,
> elmo-message-field, std11-narrow-to-header, std11-fetch-field,
> erc-get-channel-user-list, org-install-letbind, google-maps-static-show
> Wrote /home/hawk/.emacs.d/vendor/org-contacts.elc
>
>
> `org-capture' with the `org-contacts' template works fine if I move the
> corresponding .elc file out of the way.
>
> My guess is, that there are a few `requires' missing in the
> `eval-and-compile' form on top of `org-contacts.el'. Maybe someone with
> more intimate knowledge of the involved code than myself has an idea as
> to how to fix this?
Here's a diff, that removes some of the warnings and in turn makes my
use-case work again, even with a byte-compiled `org-contacts.el':
diff --git a/vendor/org-contacts.el b/vendor/org-contacts.el
index 4ffe360..f6234b6 100644
--- a/vendor/org-contacts.el
+++ b/vendor/org-contacts.el
@@ -42,6 +42,8 @@
(eval-and-compile
(require 'org))
(require 'gnus-util)
+(require 'gnus-art)
+(require 'mail-utils)
(require 'org-agenda)
(require 'org-capture)
I guess, similar additions could fix the other warnings as well.
Regards, Frank
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: org-capture with org-contacts template causing problems
2013-03-04 13:12 ` Frank Terbeck
@ 2013-03-04 19:42 ` Bastien
0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2013-03-04 19:42 UTC (permalink / raw)
To: Frank Terbeck; +Cc: Julien Danjou, emacs-orgmode
Hi Frank,
Frank Terbeck <ft@bewatermyfriend.org> writes:
> Here's a diff, that removes some of the warnings and in turn makes my
> use-case work again, even with a byte-compiled `org-contacts.el':
Applied, thanks!
--
Bastien
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-04 19:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03 17:40 org-capture with org-contacts template causing problems Frank Terbeck
2013-03-04 10:40 ` Frank Terbeck
2013-03-04 13:12 ` Frank Terbeck
2013-03-04 19:42 ` Bastien
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).