emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: "info@bastianebeling.org" <info@bastianebeling.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-mobile-push problem
Date: Mon, 07 Nov 2011 02:31:17 +0530	[thread overview]
Message-ID: <81r51lc6ea.fsf@gmail.com> (raw)
In-Reply-To: <672A30FC-B88F-40CA-BD39-B5A10409C922@bastianebeling.org> (info@bastianebeling.org's message of "Sat, 5 Nov 2011 23:02:20 +0100")

"info@bastianebeling.org" <info@bastianebeling.org> writes:

> Hi Jambunathan,
>
>> 
>>> Sorry, I didn't get into too much detail here because I had the
>>> feeling that the problem might have been cause by me not being able
>>> to use the package manager correctly rather than the package manager
>>> itself. But if it could help others, of course, I'm sharing the
>>> details as far as I understand them.
>>> 
>>> I'm using Aquamacs (for Mac OS):
>>> 
>>> GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
>>> of 2011-10-25 on braeburn.aquamacs.org - Aquamacs Distribution 2.4
>>> Copyright (C) 2011 Free Software Foundation, Inc.
>>> 
>>> When I run "package-list-packages", I get the message "Failed to
>>> download `Org-mode' archive." (didn't note that before), but it still
>>> offered the latest version of Org nevertheless. 
>> 
>> Do 
>> M-x customize-variable RET package-archives RET
>> 
>> and delete the following "Org-mode" archive from the list:
>> 
>> --8<---------------cut here---------------start------------->8---
>> (add-to-list 'package-archives 
>>              '("Org-mode" . "http://orgmode.org/pkg/daily/"))
>> --8<---------------cut here---------------end--------------->8---
>> 
>
> Ok, deleted.
>
>> Additionally, you can also look at ~/.emacs.d/elpa/archives/ subdir and
>> recursively delete the directory corresponding to "Org-mode" archive.
>> 
>>> I could install it from there and Org appeared to be updated to
>>> version 7.7, but somehow the macro "org-eval-in-environment" was only
>>> found after reloading Org uncompiled after every restart of
>>> Emacs. 
>> 
>>> This could be repeated infinitely, i.e., I always got this error
>>> message when running "package-list-packages" and it always offered me
>>> to install Org. Now I downloaded the tar-file manually and installed
>>> it with "package-install-file". Now "org-eval-in-environment" is found
>>> normally. After "package-list-files" I still get the message "Failed
>>> to download `Org-mode' archive.", but it shows Org as installed and
>>> does no longer offer to install it.
>>> 
>>> I hope that was more helpful. If you need more information, I will be
>>> happy to try to provide it. 
>> 
>> I am trying to isolate the root cause of the issue here. Hope you can
>> help me locate the root cause.
>> 
>> Try the following procedure:
>> 
>> 1. Store the org-*.tar that you have downloaded in some safe place.
>
> Done.
>
>> 2. rm -rf ~/.emacs.d/elpa/org-* {BE CAREFUL HERE, YOU ARE DELETING
>>   STUFF}
>>   - In this step you are deleting your org installed through elpa.
>
> Done.
>
>> 3. Check your .emacs - Does it make have (require 'org-install)? If it
>>   has this entry remove that line or comment out that line.
>
> Commented out.
>
>> 4. Restart emacs
>> 5. M-x locate-library RET org RET
>> 6. Note the directory reported. 
>>   - If it looks like it is coming from your default Emacs installation
>>     directory then proceed to step 7. 
>
> Obviously the directory I just added.
>
>> 
>>   - If it looks like it is one of the directories added by you, delete
>>     that directory from either load-path or simply delete it from the
>>     disk. (To be safe, instead of deleting you can just rename or move
>>     the directory somewhere else). Goto step 4.
>> 7. Note the version of Org with M-x org-version RET.
>
> Renaming the folder didn't help because Emacs still found it. Moved
> the folder and now M-x locate-library RET org RET points to the
> original directory.
>
> M-x org-version RET -> Org-mode version 6.33x
>
>> Now do a M-x
>>   package-install-file RET
>
> Your procedure is exactly what I did eventually to get it running. It
> worked, when I installed org via package-install-file RET. Instead,
> now I am reporting in detail what happens when I do M-x
> package-list-packages:
>
> I get the message: 
>
> "Failed to download `Org-mode' archive."

After reconfiguring package-archives, you haven't saved it for future
sessions or you forgot to recompile your .emacs.

> It still lists the newest version of org-mode along the packages.

This is OK. Because org mode gets updated daily. You are actually seeing
the tar files from here.

http://elpa.gnu.org/packages/

> I hit "Install".
>
> I get a couple of error messages. Find attached the complete compile
> log.

> Emacs restart.
>
> org-version -> "Org-mode version 7.7"
>
> org-mobile-push -> "byte-code: Invalid function:
> org-eval-in-environment"

This is along the expected lines. I have done a quick look at the
compile log. 

--8<---------------cut here---------------start------------->8---
168: In end of data:
169: org-agenda.el:8546:1:Warning: the following functions are not known to be defined:
170:     calendar-day-name, calendar-day-of-week, calendar-month-name,
171:     calendar-absolute-from-gregorian, org-with-gensyms, marker,
172:     org-string-nw-p, org-eval-in-environment,
173:     org-make-parameter-alist, calendar-gregorian-from-absolute,
174:     calendar-date-string, org-face-from-face-or-color,
175:     org-entry-blocked-p, calendar-current-date, org-today,
176:     calendar-last-day-of-month, calendar-leap-year-p,
177:     org-order-calendar-date-args, org-string-match-p,
178:     org-duration-string-to-minutes, org-called-interactively-p,
179:     calendar-cursor-to-date, calendar-day-of-year-string
180: \f
526: Compiling file /Users/bastian/Library/Application Support/Aquamacs Emacs/elpa/org-20111105/org-macs.el at Sat Nov  5 22:20:04 2011
537: org-mobile.el:1103:1:Warning: the following functions are not known to be defined:
538:    org-string-nw-p, org-find-olp
--8<---------------cut here---------------end--------------->8---

Some notes:

1. The files are compiled in alphabetical order.
2. The only reference to org-eval-in-environment - of which you complain
   - is in compile log is in org-agenda.el.
3. Note that org-macs.el gets compiled after org-agenda.el
4. org-mobile.el has no references to org-eval-in-environment.

Needless to your "system-installed" org has no org-eval-in-environment
in it's org-macs.el.

The only way org-agenda.el can have org-eval-in-environment compiled in
as macro is by

1. compiling & loading org-macs.el from the package dir.
2. compiling org-agenda.el

strictly in that order.

Now the question is what is the reciped for accomplishing 1 & 2 in that
order.

I hope some of the observers will lend me a helping hand.

Relevant?
- http://lists.gnu.org/archive/html/emacs-orgmode/2011-11/msg00223.html

> C-u C-c C-x r (Org reload uncompiled)

This preciely load org-macs.el from the elpa dir.

> org-mobile-push -> "Files for mobile viewer staged"
>
> Works till next restart of emacs. 

So the problem is solved.



Now the exact order of org-reload and package-install-file is important.

It is not package-install-file *alone* that solves the problem. It is
package-install-file *after* org-reload/uncompiled that solves the
problem.

The sequence is important.

Now the question is can we get everything working *without* requiring
that the user do a org-reload explicitly?

> Then I downloaded the .tar-file manually and installed via M-x
> package-install-file RET
>
> Org-reload.
>
> org-version -> "Org-mode version 7.7"
>
> org-mobile-push -> "Files for mobile viewer staged" (i.e. everything works)
>
> I hope this helps to identify the problem with the package manager.
>
>> 8. Restart Emacs
>> 9. Now. Do you still run in to the original org-macs issue that you
>>   reported?
>> 
>> Extra information for me:
>> 10. What does C-h v package-enable-at-startup RET report?
>> 
>
> package-enable-at-startup is a variable defined in `package.el'.
> Its value is t
>
> Bastian

  reply	other threads:[~2011-11-06 21:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 11:43 org-mobile-push problem info
2011-11-03 12:15 ` Jambunathan K
2011-11-05 22:02   ` info
2011-11-06 21:01     ` Jambunathan K [this message]
2011-11-06 21:24       ` info
2011-11-06 21:35         ` Jambunathan K
  -- strict thread matches above, loose matches on Subject: below --
2011-11-02 16:16 Nicholas Putnam
2011-11-02 16:29 ` info
2011-11-02 23:28   ` Nick Dokos
2011-11-03  0:09     ` info
2011-11-03  0:36       ` Nick Dokos
2011-11-03 10:05         ` info
2011-11-03 11:03           ` Jambunathan K
2011-11-03  5:26     ` 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=81r51lc6ea.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=info@bastianebeling.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).