emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-infojs-handle-options fails when :infojs-opt is not in exp-list
@ 2008-12-23 10:47 Friedrich Delgado Friedrichs
  2008-12-23 10:56 ` Friedrich Delgado Friedrichs
  0 siblings, 1 reply; 5+ messages in thread
From: Friedrich Delgado Friedrichs @ 2008-12-23 10:47 UTC (permalink / raw)
  To: Emacs-orgmode mailing list

Hi.

I got

 org-infojs-handle-options: Wrong type argument: stringp, nil

the first time I tried to do a html export with java script turned on.

I didn't change any options in 'Org Infojs Options' yet, so I guess
that's why (plist-get exp-plist :infojs-opt) returns nil and
string-match gives an error.

Workaround: set an option
Fix: Uhm, probably

(or (not (plist-get exp-plist :infojs-opt))
            (not (plist-get exp-plist :infojs-opt))
            (string-match "\\<view:nil\\>"
                                         (plist-get exp-plist :infojs-opt)))

Or something like that.

-- 
        Friedrich Delgado Friedrichs <friedel@nomaden.org>

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

* Re: org-infojs-handle-options fails when :infojs-opt is not  in exp-list
  2008-12-23 10:47 org-infojs-handle-options fails when :infojs-opt is not in exp-list Friedrich Delgado Friedrichs
@ 2008-12-23 10:56 ` Friedrich Delgado Friedrichs
  2008-12-23 11:14   ` Friedrich Delgado Friedrichs
  0 siblings, 1 reply; 5+ messages in thread
From: Friedrich Delgado Friedrichs @ 2008-12-23 10:56 UTC (permalink / raw)
  To: Emacs-orgmode mailing list

Doh!

Friedrich Delgado Friedrichs schrieb:
> Workaround: set an option

Doesn't work.

> Fix: 

Complete rubbish, as I just noticed... I think I got the wrong spot...

-- 
        Friedrich Delgado Friedrichs <friedel@nomaden.org>
Vaßmerstraße 3                             +49-4161/651844
21614 Buxtehude           TauPan on Ircnet and Freenode ;)

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

* Re: org-infojs-handle-options fails when :infojs-opt is not  in exp-list
  2008-12-23 10:56 ` Friedrich Delgado Friedrichs
@ 2008-12-23 11:14   ` Friedrich Delgado Friedrichs
  2009-01-08 14:12     ` Friedrich Delgado Friedrichs
  0 siblings, 1 reply; 5+ messages in thread
From: Friedrich Delgado Friedrichs @ 2008-12-23 11:14 UTC (permalink / raw)
  To: emacs-orgmode

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

Found the culprit :)

org-jsinfo rocks :)

-- 
        Friedrich Delgado Friedrichs <friedel@nomaden.org>

[-- Attachment #2: 0001-fix-string-match-against-nil-when-no-in-file-options.patch --]
[-- Type: text/x-diff, Size: 986 bytes --]

From 0fef25f56c837ae9f434449c6f30268e0474f7ab Mon Sep 17 00:00:00 2001
From: Friedrich Delgado Friedrichs <delgado@dfn-cert.de>
Date: Tue, 23 Dec 2008 12:10:42 +0100
Subject: [PATCH] fix string-match against nil when no in-file options are set for jsinfo

---
 lisp/org-jsinfo.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-jsinfo.el b/lisp/org-jsinfo.el
index 8f2d7e8..19faa9e 100644
--- a/lisp/org-jsinfo.el
+++ b/lisp/org-jsinfo.el
@@ -140,7 +140,8 @@ Option settings will replace the %MANAGER-OPTIONS cookie."
             default (cdr (assoc opt org-infojs-options)))
       (and (symbolp default) (not (memq default '(t nil)))
            (setq default (plist-get exp-plist default)))
-      (if (string-match (format " %s:\\(\\S-+\\)" opt) v)
+      (if (and v
+               (string-match (format " %s:\\(\\S-+\\)" opt) v))
           (setq val (match-string 1 v))
         (setq val default))
       (cond
-- 
1.6.0.2.526.g5c283.dirty


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

_______________________________________________
Emacs-orgmode mailing list
Remember: 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: org-infojs-handle-options fails when :infojs-opt is not  in exp-list
  2008-12-23 11:14   ` Friedrich Delgado Friedrichs
@ 2009-01-08 14:12     ` Friedrich Delgado Friedrichs
  2009-01-08 14:36       ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Friedrich Delgado Friedrichs @ 2009-01-08 14:12 UTC (permalink / raw)
  To: emacs-orgmode

Hi.

A while ago I had this problem:
org-infojs-handle-options: Wrong type argument: stringp, nil

I wonder if my patch ever reached the mailing list, or if it
was overlooked because it was too close to christmas:

Friedrich Delgado Friedrichs schrieb:
> >From 0fef25f56c837ae9f434449c6f30268e0474f7ab Mon Sep 17 00:00:00 2001
> From: Friedrich Delgado Friedrichs <delgado@dfn-cert.de>
> Date: Tue, 23 Dec 2008 12:10:42 +0100
> Subject: [PATCH] fix string-match against nil when no in-file options are set for jsinfo
> 
> ---
>  lisp/org-jsinfo.el |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org-jsinfo.el b/lisp/org-jsinfo.el
> index 8f2d7e8..19faa9e 100644
> --- a/lisp/org-jsinfo.el
> +++ b/lisp/org-jsinfo.el
> @@ -140,7 +140,8 @@ Option settings will replace the %MANAGER-OPTIONS cookie."
>              default (cdr (assoc opt org-infojs-options)))
>        (and (symbolp default) (not (memq default '(t nil)))
>             (setq default (plist-get exp-plist default)))
> -      (if (string-match (format " %s:\\(\\S-+\\)" opt) v)
> +      (if (and v
> +               (string-match (format " %s:\\(\\S-+\\)" opt) v))
>            (setq val (match-string 1 v))
>          (setq val default))
>        (cond
> -- 
> 1.6.0.2.526.g5c283.dirty
---Zitatende---

-- 
        Friedrich Delgado Friedrichs <friedel@nomaden.org>
Laziness led to the invention of the most useful tools.

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

* Re: org-infojs-handle-options fails when :infojs-opt is not in exp-list
  2009-01-08 14:12     ` Friedrich Delgado Friedrichs
@ 2009-01-08 14:36       ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2009-01-08 14:36 UTC (permalink / raw)
  To: friedel; +Cc: emacs-orgmode

Apparently, I had indeed overlooked this patch.

Fixed now, thanks for resending it.

- Carsten

On Jan 8, 2009, at 3:12 PM, Friedrich Delgado Friedrichs wrote:

> Hi.
>
> A while ago I had this problem:
> org-infojs-handle-options: Wrong type argument: stringp, nil
>
> I wonder if my patch ever reached the mailing list, or if it
> was overlooked because it was too close to christmas:
>
> Friedrich Delgado Friedrichs schrieb:
>>> From 0fef25f56c837ae9f434449c6f30268e0474f7ab Mon Sep 17 00:00:00  
>>> 2001
>> From: Friedrich Delgado Friedrichs <delgado@dfn-cert.de>
>> Date: Tue, 23 Dec 2008 12:10:42 +0100
>> Subject: [PATCH] fix string-match against nil when no in-file  
>> options are set for jsinfo
>>
>> ---
>> lisp/org-jsinfo.el |    3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/lisp/org-jsinfo.el b/lisp/org-jsinfo.el
>> index 8f2d7e8..19faa9e 100644
>> --- a/lisp/org-jsinfo.el
>> +++ b/lisp/org-jsinfo.el
>> @@ -140,7 +140,8 @@ Option settings will replace the %MANAGER- 
>> OPTIONS cookie."
>>             default (cdr (assoc opt org-infojs-options)))
>>       (and (symbolp default) (not (memq default '(t nil)))
>>            (setq default (plist-get exp-plist default)))
>> -      (if (string-match (format " %s:\\(\\S-+\\)" opt) v)
>> +      (if (and v
>> +               (string-match (format " %s:\\(\\S-+\\)" opt) v))
>>           (setq val (match-string 1 v))
>>         (setq val default))
>>       (cond
>> -- 
>> 1.6.0.2.526.g5c283.dirty
> ---Zitatende---
>
> -- 
>        Friedrich Delgado Friedrichs <friedel@nomaden.org>
> Laziness led to the invention of the most useful tools.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: 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:[~2009-01-08 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-23 10:47 org-infojs-handle-options fails when :infojs-opt is not in exp-list Friedrich Delgado Friedrichs
2008-12-23 10:56 ` Friedrich Delgado Friedrichs
2008-12-23 11:14   ` Friedrich Delgado Friedrichs
2009-01-08 14:12     ` Friedrich Delgado Friedrichs
2009-01-08 14:36       ` Carsten Dominik

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