emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel]  (wrong-type-argument number-or-marker-p nil)
@ 2010-02-07 22:35 Thomas S. Dye
  2010-02-07 22:53 ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2010-02-07 22:35 UTC (permalink / raw)
  To: org-mode mailing list


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

Aloha all,

I pulled the latest org-mode this morning and got an error starting  
emacs afterwards that appears to be tied to org-babel-load-file.

I ran git bisect and ended up here:

131441dbd2d16e92f863864ed536f37fcd4a85fc is first bad commit
commit 131441dbd2d16e92f863864ed536f37fcd4a85fc
Author: Eric Schulte <schulte.eric@gmail.com>
Date:   Thu Feb 4 09:43:11 2010 -0700

     babel: load-file works for symlinks -- Thanks to Martin Kühl

:040000 040000 b4e1b1d95a9c1bfd182ad3a834830c4494566679  
7ae93fe06479799b0d7dc233caa00ddfd6daec3a M      contrib

The backtrace from starting emacs with --debug-init follows:

> Debugger entered--Lisp error: (wrong-type-argument number-or-marker- 
> p nil)
>   time-subtract((19311 14612 450479) nil)
>   (time-to-seconds (time-subtract (current-time) (sixth ...)))
>   (catch (quote --cl-block-age--) (time-to-seconds (time- 
> subtract ... ...)))
>   (cl-block-wrapper (catch (quote --cl-block-age--) (time-to- 
> seconds ...)))
>   (block age (time-to-seconds (time-subtract ... ...)))
>   age("td.org")
>   (> (age file) (age exported-file))
>   (and (file-exists-p exported-file) (> (age file) (age exported- 
> file)))
>   (if (and (file-exists-p exported-file) (> ... ...)) nil (org-babel- 
> tangle-file file base-name "emacs-lisp"))
>   (unless (and (file-exists-p exported-file) (> ... ...)) (org-babel- 
> tangle-file file base-name "emacs-lisp"))
>   (let* ((base-name ...) (exported-file ...)) (unless (and ... ...)  
> (org-babel-tangle-file file base-name "emacs-lisp")) (load-file  
> exported-file) (message "loaded %s" exported-file))
>   (progn (fset (quote age) (function* ...)) (let* (... ...)  
> (unless ... ...) (load-file exported-file) (message "loaded %s"  
> exported-file)))
>   (unwind-protect (progn (fset ... ...) (let* ... ... ... ...)) (if  
> --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound ...)))
>   (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind- 
> protect (progn ... ...) (if --cl-letf-bound-- ... ...)))
>   (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file  
> exported-file) (message "loaded %s" exported-file)))
>   (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file  
> exported-file) (message "loaded %s" exported-file)))
>   (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load-file  
> exported-file) (message "loaded %s" exported-file)))
>   org-babel-load-file("td.org")
>   mapc(org-babel-load-file ("td.org"))
>   (let ((default-directory user-specific-dir)) (mapc (function load)  
> (directory-files user-specific-dir nil ".*el$")) (mapc (function org- 
> babel-load-file) (directory-files user-specific-dir nil ".*org$")))
>   (progn (let (...) (mapc ... ...) (mapc ... ...)))
>   (if (file-exists-p user-specific-dir) (progn (let ... ... ...)))
>   (when (file-exists-p user-specific-dir) (let (...) (mapc ... ...)  
> (mapc ... ...)))
>   eval-buffer(#<buffer  *load*<2>> nil "/Users/dk/.emacs.d/starter- 
> kit.el" nil t)  ; Reading at buffer position 6504
>   load-with-code-conversion("/Users/dk/.emacs.d/starter-kit.el" "/ 
> Users/dk/.emacs.d/starter-kit.el" nil nil)
>   load("/Users/dk/.emacs.d/starter-kit.el" nil nil t)
>   load-file("/Users/dk/.emacs.d/starter-kit.el")
>   (let* ((base-name ...) (exported-file ...)) (unless (and ... ...)  
> (org-babel-tangle-file file base-name "emacs-lisp")) (load-file  
> exported-file) (message "loaded %s" exported-file))
>   (progn (fset (quote age) (function* ...)) (let* (... ...)  
> (unless ... ...) (load-file exported-file) (message "loaded %s"  
> exported-file)))
>   (unwind-protect (progn (fset ... ...) (let* ... ... ... ...)) (if  
> --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound ...)))
>   (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind- 
> protect (progn ... ...) (if --cl-letf-bound-- ... ...)))
>   (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file  
> exported-file) (message "loaded %s" exported-file)))
>   (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file  
> exported-file) (message "loaded %s" exported-file)))
>   (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load-file  
> exported-file) (message "loaded %s" exported-file)))
>   org-babel-load-file("/Users/dk/.emacs.d/starter-kit.org")
>   eval-buffer(#<buffer  *load*> nil "/Users/dk/.emacs.d/init.el" nil  
> t)  ; Reading at buffer position 884
>   load-with-code-conversion("/Users/dk/.emacs.d/init.el" "/Users/ 
> dk/.emacs.d/init.el" t t)
>   load("/Users/dk/.emacs.d/init" t t)
>   #[nil "\b\205\264\0	\306=\203\x11\0\307\b\310Q\2027\0	\311= 
> \2033\0\312\307\313\314#\203#\0\315\2027\0\312\307\313\316# 
> \203/\0\317\2027\0\315\2027\0\307\b\320Q\x1a\321\x13\322\n\321\211#\210\v\321= 
> \203_\0\323\324\325\307\b\326Q!\"\x1c\322\f\321\211#\210\v\321=\203^\0\n\x13)\v 
> \203\244\0\327\v!\330\232\203\244\0\331\v!\211\x1d\332P\x1e\"\333\x0e\"! 
> \203\200\0\x0e\"\202\213\0\333
> !\203\212\0
> \202\213\0\313\211\x15\203\243\0\334
> \v\"\203\241\0\335\336
> \v#\210\337\340!\210
> \x13*\x0e#?\205\263\0\313\x1e$\322\341\321\211#))\207" [init-file-user system- 
> type user-init-file-1 user-init-file otherfile source ms-dos "~" "/ 
> _emacs" windows-nt directory-files nil "^\\.emacs\\(\\.elc?\\)?$"  
> "~/.emacs" "^_emacs\\(\\.elc?\\)?$" "~/_emacs" "/.emacs" t load  
> expand-file-name "init" file-name-as-directory "/.emacs.d" file-name- 
> extension "elc" file-name-sans-extension ".el" file-exists-p file- 
> newer-than-file-p message "Warning: %s is newer than %s" sit-for 1  
> "default" alt inhibit-default-init inhibit-startup-screen] 7]()
>   command-line()
>   normal-top-level()

hth,
Tom

[-- Attachment #1.2: Type: text/html, Size: 9791 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [babel]  (wrong-type-argument number-or-marker-p nil)
  2010-02-07 22:35 [babel] (wrong-type-argument number-or-marker-p nil) Thomas S. Dye
@ 2010-02-07 22:53 ` Eric Schulte
  2010-02-08  4:44   ` Thomas S. Dye
  2010-02-08 19:21   ` Thomas S. Dye
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Schulte @ 2010-02-07 22:53 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

Hi Tom,

Could you try the attached patch and let me know if it fixes the
problem?

If so I'll apply it to the main repo.

Thanks -- Eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: quick-fix.patch --]
[-- Type: text/x-diff, Size: 806 bytes --]

diff --git a/contrib/babel/lisp/org-babel-tangle.el b/contrib/babel/lisp/org-babel-tangle.el
index cad8cec..dd76195 100644
--- a/contrib/babel/lisp/org-babel-tangle.el
+++ b/contrib/babel/lisp/org-babel-tangle.el
@@ -48,8 +48,8 @@ file using `load-file'."
   (flet ((age (file)
               (time-to-seconds
                (time-subtract (current-time)
-                              (sixth (file-attributes
-                                      (file-truename file)))))))
+                              (sixth (or (file-attributes (file-truename file))
+                                         (file-attributes file)))))))
     (let* ((base-name (file-name-sans-extension file))
            (exported-file (concat base-name ".el")))
       ;; tangle if the org-mode file is newer than the elisp file

[-- Attachment #3: Type: text/plain, Size: 6186 bytes --]


"Thomas S. Dye" <tsd@tsdye.com> writes:

> Aloha all,
>
> I pulled the latest org-mode this morning and got an error starting emacs afterwards that appears to
> be tied to org-babel-load-file.  
>
> I ran git bisect and ended up here:
>
> 131441dbd2d16e92f863864ed536f37fcd4a85fc is first bad commit
> commit 131441dbd2d16e92f863864ed536f37fcd4a85fc
> Author: Eric Schulte <schulte.eric@gmail.com>
> Date:   Thu Feb 4 09:43:11 2010 -0700
>
>     babel: load-file works for symlinks -- Thanks to Martin Kühl
>
> :040000 040000 b4e1b1d95a9c1bfd182ad3a834830c4494566679 7ae93fe06479799b0d7dc233caa00ddfd6daec3a M  
>    contrib
>
> The backtrace from starting emacs with --debug-init follows:
>
>     Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>       time-subtract((19311 14612 450479) nil)
>       (time-to-seconds (time-subtract (current-time) (sixth ...)))
>       (catch (quote --cl-block-age--) (time-to-seconds (time-subtract ... ...)))
>       (cl-block-wrapper (catch (quote --cl-block-age--) (time-to-seconds ...)))
>       (block age (time-to-seconds (time-subtract ... ...)))
>       age("td.org")
>       (> (age file) (age exported-file))
>       (and (file-exists-p exported-file) (> (age file) (age exported-file)))
>       (if (and (file-exists-p exported-file) (> ... ...)) nil (org-babel-tangle-file file base-name
>     "emacs-lisp"))
>       (unless (and (file-exists-p exported-file) (> ... ...)) (org-babel-tangle-file file base-name
>     "emacs-lisp"))
>       (let* ((base-name ...) (exported-file ...)) (unless (and ... ...) (org-babel-tangle-file file
>     base-name "emacs-lisp")) (load-file exported-file) (message "loaded %s" exported-file))
>       (progn (fset (quote age) (function* ...)) (let* (... ...) (unless ... ...) (load-file
>     exported-file) (message "loaded %s" exported-file)))
>       (unwind-protect (progn (fset ... ...) (let* ... ... ... ...)) (if --cl-letf-bound-- (fset ...
>     --cl-letf-save--) (fmakunbound ...)))
>       (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect (progn ... ...) (if
>     --cl-letf-bound-- ... ...)))
>       (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file exported-file) (message "loaded
>     %s" exported-file)))
>       (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file exported-file) (message "loaded
>     %s" exported-file)))
>       (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load-file exported-file) (message
>     "loaded %s" exported-file)))
>       org-babel-load-file("td.org")
>       mapc(org-babel-load-file ("td.org"))
>       (let ((default-directory user-specific-dir)) (mapc (function load) (directory-files
>     user-specific-dir nil ".*el$")) (mapc (function org-babel-load-file) (directory-files
>     user-specific-dir nil ".*org$")))
>       (progn (let (...) (mapc ... ...) (mapc ... ...)))
>       (if (file-exists-p user-specific-dir) (progn (let ... ... ...)))
>       (when (file-exists-p user-specific-dir) (let (...) (mapc ... ...) (mapc ... ...)))
>       eval-buffer(#<buffer  *load*<2>> nil "/Users/dk/.emacs.d/starter-kit.el" nil t)  ; Reading at
>     buffer position 6504
>       load-with-code-conversion("/Users/dk/.emacs.d/starter-kit.el" "/Users/dk/.emacs.d/
>     starter-kit.el" nil nil)
>       load("/Users/dk/.emacs.d/starter-kit.el" nil nil t)
>       load-file("/Users/dk/.emacs.d/starter-kit.el")
>       (let* ((base-name ...) (exported-file ...)) (unless (and ... ...) (org-babel-tangle-file file
>     base-name "emacs-lisp")) (load-file exported-file) (message "loaded %s" exported-file))
>       (progn (fset (quote age) (function* ...)) (let* (... ...) (unless ... ...) (load-file
>     exported-file) (message "loaded %s" exported-file)))
>       (unwind-protect (progn (fset ... ...) (let* ... ... ... ...)) (if --cl-letf-bound-- (fset ...
>     --cl-letf-save--) (fmakunbound ...)))
>       (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect (progn ... ...) (if
>     --cl-letf-bound-- ... ...)))
>       (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file exported-file) (message "loaded
>     %s" exported-file)))
>       (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file exported-file) (message "loaded
>     %s" exported-file)))
>       (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load-file exported-file) (message
>     "loaded %s" exported-file)))
>       org-babel-load-file("/Users/dk/.emacs.d/starter-kit.org")
>       eval-buffer(#<buffer  *load*> nil "/Users/dk/.emacs.d/init.el" nil t)  ; Reading at buffer
>     position 884
>       load-with-code-conversion("/Users/dk/.emacs.d/init.el" "/Users/dk/.emacs.d/init.el" t t)
>       load("/Users/dk/.emacs.d/init" t t)
>       #[nil "\b\205\264 \306=\203. \307\b\310Q\2027 \311=\2033 \312\307\313\314#\203# \315\2027 \312\
>     307\313\316#\203/ \317\2027 \315\2027 \307\b\320Q.\321.\322\n\321\211#\210 \321=\203_ \323\324\
>     325\307\b\326Q!\".\322\f\321\211#\210 \321=\203^ \n.) \203\244 \327 !\330\232\203\244 \331 !\211.
>     \332P.\"\333.\"!\203\200 .\"\202\213 \333
>     !\203\212
>     \202\213 \313\211.\203\243 \334
>     \"\203\241 \335\336
>     #\210\337\340!\210
>     .*.#?\205\263 \313.$\322\341\321\211#))\207" [init-file-user system-type user-init-file-1
>     user-init-file otherfile source ms-dos "~" "/_emacs" windows-nt directory-files nil "^\\.emacs\\
>     (\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" "~/_emacs" "/.emacs" t load expand-file-name
>     "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension
>     ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1
>     "default" alt inhibit-default-init inhibit-startup-screen] 7]()
>       command-line()
>       normal-top-level()
>
> hth,
> Tom
>
> _______________________________________________
> 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

[-- Attachment #4: 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [babel]  (wrong-type-argument number-or-marker-p nil)
  2010-02-07 22:53 ` Eric Schulte
@ 2010-02-08  4:44   ` Thomas S. Dye
  2010-02-08 12:50     ` Dan Davison
  2010-02-08 19:21   ` Thomas S. Dye
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2010-02-08  4:44 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list

Hi Eric,

Thanks for looking at this so quickly.

Patching from email is a skill still on my horizon.  I tried several  
times without success and without gaining any idea how to resolve the  
problem(s).  You might not want to wait for me to figure out how to  
patch.  It took longer than I'm willing to admit on this list for me  
to get to the point where I could make an emacs backtrace and longer  
still to understand git sufficiently to make sense out of git bisect.   
git am looks very mysterious to me right now.

All the best,
Tom

On Feb 7, 2010, at 12:53 PM, Eric Schulte wrote:

> Hi Tom,
>
> Could you try the attached patch and let me know if it fixes the
> problem?
>
> If so I'll apply it to the main repo.
>
> Thanks -- Eric
>
> diff --git a/contrib/babel/lisp/org-babel-tangle.el b/contrib/babel/ 
> lisp/org-babel-tangle.el
> index cad8cec..dd76195 100644
> --- a/contrib/babel/lisp/org-babel-tangle.el
> +++ b/contrib/babel/lisp/org-babel-tangle.el
> @@ -48,8 +48,8 @@ file using `load-file'."
>   (flet ((age (file)
>               (time-to-seconds
>                (time-subtract (current-time)
> -                              (sixth (file-attributes
> -                                      (file-truename file)))))))
> +                              (sixth (or (file-attributes (file- 
> truename file))
> +                                         (file-attributes file)))))))
>     (let* ((base-name (file-name-sans-extension file))
>            (exported-file (concat base-name ".el")))
>       ;; tangle if the org-mode file is newer than the elisp file
>
> "Thomas S. Dye" <tsd@tsdye.com> writes:
>
>> Aloha all,
>>
>> I pulled the latest org-mode this morning and got an error starting  
>> emacs afterwards that appears to
>> be tied to org-babel-load-file.
>>
>> I ran git bisect and ended up here:
>>
>> 131441dbd2d16e92f863864ed536f37fcd4a85fc is first bad commit
>> commit 131441dbd2d16e92f863864ed536f37fcd4a85fc
>> Author: Eric Schulte <schulte.eric@gmail.com>
>> Date:   Thu Feb 4 09:43:11 2010 -0700
>>
>>    babel: load-file works for symlinks -- Thanks to Martin Kühl
>>
>> :040000 040000 b4e1b1d95a9c1bfd182ad3a834830c4494566679  
>> 7ae93fe06479799b0d7dc233caa00ddfd6daec3a M
>>   contrib
>>
>> The backtrace from starting emacs with --debug-init follows:
>>
>>    Debugger entered--Lisp error: (wrong-type-argument number-or- 
>> marker-p nil)
>>      time-subtract((19311 14612 450479) nil)
>>      (time-to-seconds (time-subtract (current-time) (sixth ...)))
>>      (catch (quote --cl-block-age--) (time-to-seconds (time- 
>> subtract ... ...)))
>>      (cl-block-wrapper (catch (quote --cl-block-age--) (time-to- 
>> seconds ...)))
>>      (block age (time-to-seconds (time-subtract ... ...)))
>>      age("td.org")
>>      (> (age file) (age exported-file))
>>      (and (file-exists-p exported-file) (> (age file) (age exported- 
>> file)))
>>      (if (and (file-exists-p exported-file) (> ... ...)) nil (org- 
>> babel-tangle-file file base-name
>>    "emacs-lisp"))
>>      (unless (and (file-exists-p exported-file) (> ... ...)) (org- 
>> babel-tangle-file file base-name
>>    "emacs-lisp"))
>>      (let* ((base-name ...) (exported-file ...)) (unless  
>> (and ... ...) (org-babel-tangle-file file
>>    base-name "emacs-lisp")) (load-file exported-file) (message  
>> "loaded %s" exported-file))
>>      (progn (fset (quote age) (function* ...)) (let* (... ...)  
>> (unless ... ...) (load-file
>>    exported-file) (message "loaded %s" exported-file)))
>>      (unwind-protect (progn (fset ... ...) (let* ... ... ... ...))  
>> (if --cl-letf-bound-- (fset ...
>>    --cl-letf-save--) (fmakunbound ...)))
>>      (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind- 
>> protect (progn ... ...) (if
>>    --cl-letf-bound-- ... ...)))
>>      (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file  
>> exported-file) (message "loaded
>>    %s" exported-file)))
>>      (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file  
>> exported-file) (message "loaded
>>    %s" exported-file)))
>>      (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load- 
>> file exported-file) (message
>>    "loaded %s" exported-file)))
>>      org-babel-load-file("td.org")
>>      mapc(org-babel-load-file ("td.org"))
>>      (let ((default-directory user-specific-dir)) (mapc (function  
>> load) (directory-files
>>    user-specific-dir nil ".*el$")) (mapc (function org-babel-load- 
>> file) (directory-files
>>    user-specific-dir nil ".*org$")))
>>      (progn (let (...) (mapc ... ...) (mapc ... ...)))
>>      (if (file-exists-p user-specific-dir) (progn (let ... ... ...)))
>>      (when (file-exists-p user-specific-dir) (let (...)  
>> (mapc ... ...) (mapc ... ...)))
>>      eval-buffer(#<buffer  *load*<2>> nil "/Users/dk/.emacs.d/ 
>> starter-kit.el" nil t)  ; Reading at
>>    buffer position 6504
>>      load-with-code-conversion("/Users/dk/.emacs.d/starter-kit.el"  
>> "/Users/dk/.emacs.d/
>>    starter-kit.el" nil nil)
>>      load("/Users/dk/.emacs.d/starter-kit.el" nil nil t)
>>      load-file("/Users/dk/.emacs.d/starter-kit.el")
>>      (let* ((base-name ...) (exported-file ...)) (unless  
>> (and ... ...) (org-babel-tangle-file file
>>    base-name "emacs-lisp")) (load-file exported-file) (message  
>> "loaded %s" exported-file))
>>      (progn (fset (quote age) (function* ...)) (let* (... ...)  
>> (unless ... ...) (load-file
>>    exported-file) (message "loaded %s" exported-file)))
>>      (unwind-protect (progn (fset ... ...) (let* ... ... ... ...))  
>> (if --cl-letf-bound-- (fset ...
>>    --cl-letf-save--) (fmakunbound ...)))
>>      (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind- 
>> protect (progn ... ...) (if
>>    --cl-letf-bound-- ... ...)))
>>      (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file  
>> exported-file) (message "loaded
>>    %s" exported-file)))
>>      (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file  
>> exported-file) (message "loaded
>>    %s" exported-file)))
>>      (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load- 
>> file exported-file) (message
>>    "loaded %s" exported-file)))
>>      org-babel-load-file("/Users/dk/.emacs.d/starter-kit.org")
>>      eval-buffer(#<buffer  *load*> nil "/Users/dk/.emacs.d/init.el"  
>> nil t)  ; Reading at buffer
>>    position 884
>>      load-with-code-conversion("/Users/dk/.emacs.d/init.el" "/Users/ 
>> dk/.emacs.d/init.el" t t)
>>      load("/Users/dk/.emacs.d/init" t t)
>>      #[nil "\b\205\264 \306=\203. \307\b\310Q\2027 \311=\2033  
>> \312\307\313\314#\203# \315\2027 \312\
>>    307\313\316#\203/ \317\2027 \315\2027 \307\b\320Q.\321.\322\n 
>> \321\211#\210 \321=\203_ \323\324\
>>    325\307\b\326Q!\".\322\f\321\211#\210 \321=\203^ \n.) \203\244  
>> \327 !\330\232\203\244 \331 !\211.
>>    \332P.\"\333.\"!\203\200 .\"\202\213 \333
>>    !\203\212
>>    \202\213 \313\211.\203\243 \334
>>    \"\203\241 \335\336
>>    #\210\337\340!\210
>>    .*.#?\205\263 \313.$\322\341\321\211#))\207" [init-file-user  
>> system-type user-init-file-1
>>    user-init-file otherfile source ms-dos "~" "/_emacs" windows-nt  
>> directory-files nil "^\\.emacs\\
>>    (\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" "~/_emacs"  
>> "/.emacs" t load expand-file-name
>>    "init" file-name-as-directory "/.emacs.d" file-name-extension  
>> "elc" file-name-sans-extension
>>    ".el" file-exists-p file-newer-than-file-p message "Warning: %s  
>> is newer than %s" sit-for 1
>>    "default" alt inhibit-default-init inhibit-startup-screen] 7]()
>>      command-line()
>>      normal-top-level()
>>
>> hth,
>> Tom
>>
>> _______________________________________________
>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [babel]  (wrong-type-argument number-or-marker-p nil)
  2010-02-08  4:44   ` Thomas S. Dye
@ 2010-02-08 12:50     ` Dan Davison
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Davison @ 2010-02-08 12:50 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: org-mode mailing list

"Thomas S. Dye" <tsd@tsdye.com> writes:

> Hi Eric,
>
> Thanks for looking at this so quickly.
>
> Patching from email is a skill still on my horizon.  I tried several
> times without success and without gaining any idea how to resolve the
> problem(s).  You might not want to wait for me to figure out how to
> patch.  It took longer than I'm willing to admit on this list for me
> to get to the point where I could make an emacs backtrace 

I have a question: would someone tell me how to interpret or use an
emacs backtrace or point me to reading material?

> and longer
> still to understand git sufficiently to make sense out of git bisect.
> git am looks very mysterious to me right now.

1. Extract the patch from the email and save it to a file "thepatch"
2. cd into the repo and make sure you are on master using
   git status.
3. Hopefully git status will say 'working directory clean'. But if it
   shows that there are modified files, and *if* these modifications are
   junk resulting from your previous attempt to apply the patch then you
   can blow all outstanding changes away and revert to the last 'proper'
   commit with
   git reset --hard HEAD
4. At this point 'git status' should report that you are on master and
   working dir is clean.
5. Create a temp branch with
   git checkout -b branch-with-patch
6. Check that you are on the new branch with
   git status
7. Apply the patch with
   git apply < thepatch
8. Commit the change in the temp branch with
   git commit -am "the commit message"

Now you can restart emacs and org will pick up the modified files. To go
back to the master branch without the patch that would be

git checkout master

Make sure you don't apply the patch in the master branch.

Dan


>
> All the best,
> Tom
>
> On Feb 7, 2010, at 12:53 PM, Eric Schulte wrote:
>
>> Hi Tom,
>>
>> Could you try the attached patch and let me know if it fixes the
>> problem?
>>
>> If so I'll apply it to the main repo.
>>
>> Thanks -- Eric
>>
>> diff --git a/contrib/babel/lisp/org-babel-tangle.el b/contrib/babel/
>> lisp/org-babel-tangle.el
>> index cad8cec..dd76195 100644
>> --- a/contrib/babel/lisp/org-babel-tangle.el
>> +++ b/contrib/babel/lisp/org-babel-tangle.el
>> @@ -48,8 +48,8 @@ file using `load-file'."
>>   (flet ((age (file)
>>               (time-to-seconds
>>                (time-subtract (current-time)
>> -                              (sixth (file-attributes
>> -                                      (file-truename file)))))))
>> +                              (sixth (or (file-attributes (file-
>> truename file))
>> +                                         (file-attributes file)))))))
>>     (let* ((base-name (file-name-sans-extension file))
>>            (exported-file (concat base-name ".el")))
>>       ;; tangle if the org-mode file is newer than the elisp file
>>
>> "Thomas S. Dye" <tsd@tsdye.com> writes:
>>
>>> Aloha all,
>>>
>>> I pulled the latest org-mode this morning and got an error starting
>>> emacs afterwards that appears to
>>> be tied to org-babel-load-file.
>>>
>>> I ran git bisect and ended up here:
>>>
>>> 131441dbd2d16e92f863864ed536f37fcd4a85fc is first bad commit
>>> commit 131441dbd2d16e92f863864ed536f37fcd4a85fc
>>> Author: Eric Schulte <schulte.eric@gmail.com>
>>> Date:   Thu Feb 4 09:43:11 2010 -0700
>>>
>>>    babel: load-file works for symlinks -- Thanks to Martin Kühl
>>>
>>> :040000 040000 b4e1b1d95a9c1bfd182ad3a834830c4494566679
>>> 7ae93fe06479799b0d7dc233caa00ddfd6daec3a M
>>>   contrib
>>>
>>> The backtrace from starting emacs with --debug-init follows:
>>>
>>>    Debugger entered--Lisp error: (wrong-type-argument number-or-
>>> marker-p nil)
>>>      time-subtract((19311 14612 450479) nil)
>>>      (time-to-seconds (time-subtract (current-time) (sixth ...)))
>>>      (catch (quote --cl-block-age--) (time-to-seconds (time-
>>> subtract ... ...)))
>>>      (cl-block-wrapper (catch (quote --cl-block-age--) (time-to-
>>> seconds ...)))
>>>      (block age (time-to-seconds (time-subtract ... ...)))
>>>      age("td.org")
>>>      (> (age file) (age exported-file))
>>>      (and (file-exists-p exported-file) (> (age file) (age
>>> exported-
>>> file)))
>>>      (if (and (file-exists-p exported-file) (> ... ...)) nil (org-
>>> babel-tangle-file file base-name
>>>    "emacs-lisp"))
>>>      (unless (and (file-exists-p exported-file) (> ... ...)) (org-
>>> babel-tangle-file file base-name
>>>    "emacs-lisp"))
>>>      (let* ((base-name ...) (exported-file ...)) (unless (and
>>> ... ...) (org-babel-tangle-file file
>>>    base-name "emacs-lisp")) (load-file exported-file) (message
>>> "loaded %s" exported-file))
>>>      (progn (fset (quote age) (function* ...)) (let* (... ...)
>>> (unless ... ...) (load-file
>>>    exported-file) (message "loaded %s" exported-file)))
>>>      (unwind-protect (progn (fset ... ...) (let* ... ... ... ...))
>>> (if --cl-letf-bound-- (fset ...
>>>    --cl-letf-save--) (fmakunbound ...)))
>>>      (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...))
>>> (unwind-
>>> protect (progn ... ...) (if
>>>    --cl-letf-bound-- ... ...)))
>>>      (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file
>>> exported-file) (message "loaded
>>>    %s" exported-file)))
>>>      (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file
>>> exported-file) (message "loaded
>>>    %s" exported-file)))
>>>      (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load-
>>> file exported-file) (message
>>>    "loaded %s" exported-file)))
>>>      org-babel-load-file("td.org")
>>>      mapc(org-babel-load-file ("td.org"))
>>>      (let ((default-directory user-specific-dir)) (mapc (function
>>> load) (directory-files
>>>    user-specific-dir nil ".*el$")) (mapc (function org-babel-load-
>>> file) (directory-files
>>>    user-specific-dir nil ".*org$")))
>>>      (progn (let (...) (mapc ... ...) (mapc ... ...)))
>>>      (if (file-exists-p user-specific-dir) (progn (let ... ... ...)))
>>>      (when (file-exists-p user-specific-dir) (let (...) (mapc
>>> ... ...) (mapc ... ...)))
>>>      eval-buffer(#<buffer  *load*<2>> nil "/Users/dk/.emacs.d/
>>> starter-kit.el" nil t)  ; Reading at
>>>    buffer position 6504
>>>      load-with-code-conversion("/Users/dk/.emacs.d/starter-kit.el"
>>> "/Users/dk/.emacs.d/
>>>    starter-kit.el" nil nil)
>>>      load("/Users/dk/.emacs.d/starter-kit.el" nil nil t)
>>>      load-file("/Users/dk/.emacs.d/starter-kit.el")
>>>      (let* ((base-name ...) (exported-file ...)) (unless (and
>>> ... ...) (org-babel-tangle-file file
>>>    base-name "emacs-lisp")) (load-file exported-file) (message
>>> "loaded %s" exported-file))
>>>      (progn (fset (quote age) (function* ...)) (let* (... ...)
>>> (unless ... ...) (load-file
>>>    exported-file) (message "loaded %s" exported-file)))
>>>      (unwind-protect (progn (fset ... ...) (let* ... ... ... ...))
>>> (if --cl-letf-bound-- (fset ...
>>>    --cl-letf-save--) (fmakunbound ...)))
>>>      (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...))
>>> (unwind-
>>> protect (progn ... ...) (if
>>>    --cl-letf-bound-- ... ...)))
>>>      (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file
>>> exported-file) (message "loaded
>>>    %s" exported-file)))
>>>      (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file
>>> exported-file) (message "loaded
>>>    %s" exported-file)))
>>>      (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load-
>>> file exported-file) (message
>>>    "loaded %s" exported-file)))
>>>      org-babel-load-file("/Users/dk/.emacs.d/starter-kit.org")
>>>      eval-buffer(#<buffer  *load*> nil "/Users/dk/.emacs.d/init.el"
>>> nil t)  ; Reading at buffer
>>>    position 884
>>>      load-with-code-conversion("/Users/dk/.emacs.d/init.el"
>>> "/Users/
>>> dk/.emacs.d/init.el" t t)
>>>      load("/Users/dk/.emacs.d/init" t t)
>>>      #[nil "\b\205\264 \306=\203. \307\b\310Q\2027 \311=\2033
>>> \312\307\313\314#\203# \315\2027 \312\
>>>    307\313\316#\203/ \317\2027 \315\2027 \307\b\320Q.\321.\322\n
>>> \321\211#\210 \321=\203_ \323\324\
>>>    325\307\b\326Q!\".\322\f\321\211#\210 \321=\203^ \n.) \203\244
>>> \327 !\330\232\203\244 \331 !\211.
>>>    \332P.\"\333.\"!\203\200 .\"\202\213 \333
>>>    !\203\212
>>>    \202\213 \313\211.\203\243 \334
>>>    \"\203\241 \335\336
>>>    #\210\337\340!\210
>>>    .*.#?\205\263 \313.$\322\341\321\211#))\207" [init-file-user
>>> system-type user-init-file-1
>>>    user-init-file otherfile source ms-dos "~" "/_emacs" windows-nt
>>> directory-files nil "^\\.emacs\\
>>>    (\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" "~/_emacs"
>>> "/.emacs" t load expand-file-name
>>>    "init" file-name-as-directory "/.emacs.d" file-name-extension
>>> "elc" file-name-sans-extension
>>>    ".el" file-exists-p file-newer-than-file-p message "Warning: %s
>>> is newer than %s" sit-for 1
>>>    "default" alt inhibit-default-init inhibit-startup-screen] 7]()
>>>      command-line()
>>>      normal-top-level()
>>>
>>> hth,
>>> Tom
>>>
>>> _______________________________________________
>>> 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
>
>
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [babel]  (wrong-type-argument number-or-marker-p nil)
  2010-02-07 22:53 ` Eric Schulte
  2010-02-08  4:44   ` Thomas S. Dye
@ 2010-02-08 19:21   ` Thomas S. Dye
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas S. Dye @ 2010-02-08 19:21 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list

Hi Eric,

Many thanks to Nick and Dan for showing me how to workaround git am.   
It worked!  The patch program appears to be a bit more forgiving than  
git apply and its relatives.

Eric, the patch to org-babel-tangle.el solves the startup problem I  
had.  Thanks for the quick fix in time for Monday work day.  Org-mode  
and Org-babel are everywhere in my workflow now.

All the best,
Tom

On Feb 7, 2010, at 12:53 PM, Eric Schulte wrote:

> Hi Tom,
>
> Could you try the attached patch and let me know if it fixes the
> problem?
>
> If so I'll apply it to the main repo.
>
> Thanks -- Eric
>
> diff --git a/contrib/babel/lisp/org-babel-tangle.el b/contrib/babel/ 
> lisp/org-babel-tangle.el
> index cad8cec..dd76195 100644
> --- a/contrib/babel/lisp/org-babel-tangle.el
> +++ b/contrib/babel/lisp/org-babel-tangle.el
> @@ -48,8 +48,8 @@ file using `load-file'."
>   (flet ((age (file)
>               (time-to-seconds
>                (time-subtract (current-time)
> -                              (sixth (file-attributes
> -                                      (file-truename file)))))))
> +                              (sixth (or (file-attributes (file- 
> truename file))
> +                                         (file-attributes file)))))))
>     (let* ((base-name (file-name-sans-extension file))
>            (exported-file (concat base-name ".el")))
>       ;; tangle if the org-mode file is newer than the elisp file
>
> "Thomas S. Dye" <tsd@tsdye.com> writes:
>
>> Aloha all,
>>
>> I pulled the latest org-mode this morning and got an error starting  
>> emacs afterwards that appears to
>> be tied to org-babel-load-file.
>>
>> I ran git bisect and ended up here:
>>
>> 131441dbd2d16e92f863864ed536f37fcd4a85fc is first bad commit
>> commit 131441dbd2d16e92f863864ed536f37fcd4a85fc
>> Author: Eric Schulte <schulte.eric@gmail.com>
>> Date:   Thu Feb 4 09:43:11 2010 -0700
>>
>>    babel: load-file works for symlinks -- Thanks to Martin Kühl
>>
>> :040000 040000 b4e1b1d95a9c1bfd182ad3a834830c4494566679  
>> 7ae93fe06479799b0d7dc233caa00ddfd6daec3a M
>>   contrib
>>
>> The backtrace from starting emacs with --debug-init follows:
>>
>>    Debugger entered--Lisp error: (wrong-type-argument number-or- 
>> marker-p nil)
>>      time-subtract((19311 14612 450479) nil)
>>      (time-to-seconds (time-subtract (current-time) (sixth ...)))
>>      (catch (quote --cl-block-age--) (time-to-seconds (time- 
>> subtract ... ...)))
>>      (cl-block-wrapper (catch (quote --cl-block-age--) (time-to- 
>> seconds ...)))
>>      (block age (time-to-seconds (time-subtract ... ...)))
>>      age("td.org")
>>      (> (age file) (age exported-file))
>>      (and (file-exists-p exported-file) (> (age file) (age exported- 
>> file)))
>>      (if (and (file-exists-p exported-file) (> ... ...)) nil (org- 
>> babel-tangle-file file base-name
>>    "emacs-lisp"))
>>      (unless (and (file-exists-p exported-file) (> ... ...)) (org- 
>> babel-tangle-file file base-name
>>    "emacs-lisp"))
>>      (let* ((base-name ...) (exported-file ...)) (unless  
>> (and ... ...) (org-babel-tangle-file file
>>    base-name "emacs-lisp")) (load-file exported-file) (message  
>> "loaded %s" exported-file))
>>      (progn (fset (quote age) (function* ...)) (let* (... ...)  
>> (unless ... ...) (load-file
>>    exported-file) (message "loaded %s" exported-file)))
>>      (unwind-protect (progn (fset ... ...) (let* ... ... ... ...))  
>> (if --cl-letf-bound-- (fset ...
>>    --cl-letf-save--) (fmakunbound ...)))
>>      (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind- 
>> protect (progn ... ...) (if
>>    --cl-letf-bound-- ... ...)))
>>      (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file  
>> exported-file) (message "loaded
>>    %s" exported-file)))
>>      (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file  
>> exported-file) (message "loaded
>>    %s" exported-file)))
>>      (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load- 
>> file exported-file) (message
>>    "loaded %s" exported-file)))
>>      org-babel-load-file("td.org")
>>      mapc(org-babel-load-file ("td.org"))
>>      (let ((default-directory user-specific-dir)) (mapc (function  
>> load) (directory-files
>>    user-specific-dir nil ".*el$")) (mapc (function org-babel-load- 
>> file) (directory-files
>>    user-specific-dir nil ".*org$")))
>>      (progn (let (...) (mapc ... ...) (mapc ... ...)))
>>      (if (file-exists-p user-specific-dir) (progn (let ... ... ...)))
>>      (when (file-exists-p user-specific-dir) (let (...)  
>> (mapc ... ...) (mapc ... ...)))
>>      eval-buffer(#<buffer  *load*<2>> nil "/Users/dk/.emacs.d/ 
>> starter-kit.el" nil t)  ; Reading at
>>    buffer position 6504
>>      load-with-code-conversion("/Users/dk/.emacs.d/starter-kit.el"  
>> "/Users/dk/.emacs.d/
>>    starter-kit.el" nil nil)
>>      load("/Users/dk/.emacs.d/starter-kit.el" nil nil t)
>>      load-file("/Users/dk/.emacs.d/starter-kit.el")
>>      (let* ((base-name ...) (exported-file ...)) (unless  
>> (and ... ...) (org-babel-tangle-file file
>>    base-name "emacs-lisp")) (load-file exported-file) (message  
>> "loaded %s" exported-file))
>>      (progn (fset (quote age) (function* ...)) (let* (... ...)  
>> (unless ... ...) (load-file
>>    exported-file) (message "loaded %s" exported-file)))
>>      (unwind-protect (progn (fset ... ...) (let* ... ... ... ...))  
>> (if --cl-letf-bound-- (fset ...
>>    --cl-letf-save--) (fmakunbound ...)))
>>      (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind- 
>> protect (progn ... ...) (if
>>    --cl-letf-bound-- ... ...)))
>>      (letf ((... ...)) (let* (... ...) (unless ... ...) (load-file  
>> exported-file) (message "loaded
>>    %s" exported-file)))
>>      (letf* ((... ...)) (let* (... ...) (unless ... ...) (load-file  
>> exported-file) (message "loaded
>>    %s" exported-file)))
>>      (flet ((age ... ...)) (let* (... ...) (unless ... ...) (load- 
>> file exported-file) (message
>>    "loaded %s" exported-file)))
>>      org-babel-load-file("/Users/dk/.emacs.d/starter-kit.org")
>>      eval-buffer(#<buffer  *load*> nil "/Users/dk/.emacs.d/init.el"  
>> nil t)  ; Reading at buffer
>>    position 884
>>      load-with-code-conversion("/Users/dk/.emacs.d/init.el" "/Users/ 
>> dk/.emacs.d/init.el" t t)
>>      load("/Users/dk/.emacs.d/init" t t)
>>      #[nil "\b\205\264 \306=\203. \307\b\310Q\2027 \311=\2033  
>> \312\307\313\314#\203# \315\2027 \312\
>>    307\313\316#\203/ \317\2027 \315\2027 \307\b\320Q.\321.\322\n 
>> \321\211#\210 \321=\203_ \323\324\
>>    325\307\b\326Q!\".\322\f\321\211#\210 \321=\203^ \n.) \203\244  
>> \327 !\330\232\203\244 \331 !\211.
>>    \332P.\"\333.\"!\203\200 .\"\202\213 \333
>>    !\203\212
>>    \202\213 \313\211.\203\243 \334
>>    \"\203\241 \335\336
>>    #\210\337\340!\210
>>    .*.#?\205\263 \313.$\322\341\321\211#))\207" [init-file-user  
>> system-type user-init-file-1
>>    user-init-file otherfile source ms-dos "~" "/_emacs" windows-nt  
>> directory-files nil "^\\.emacs\\
>>    (\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" "~/_emacs"  
>> "/.emacs" t load expand-file-name
>>    "init" file-name-as-directory "/.emacs.d" file-name-extension  
>> "elc" file-name-sans-extension
>>    ".el" file-exists-p file-newer-than-file-p message "Warning: %s  
>> is newer than %s" sit-for 1
>>    "default" alt inhibit-default-init inhibit-startup-screen] 7]()
>>      command-line()
>>      normal-top-level()
>>
>> hth,
>> Tom
>>
>> _______________________________________________
>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-08 19:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-07 22:35 [babel] (wrong-type-argument number-or-marker-p nil) Thomas S. Dye
2010-02-07 22:53 ` Eric Schulte
2010-02-08  4:44   ` Thomas S. Dye
2010-02-08 12:50     ` Dan Davison
2010-02-08 19:21   ` Thomas S. Dye

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).