How to publish the literal "<<" or ">>" with planner-calendar-prev-date-href-from-page?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to publish the literal "<<" or ">>" with planner-calendar-prev-date-href-from-page?

赵雷
Hi there,

I want use "<<" and ">>" as "prev" and "next" link in my planner
published pages.

The code in my header.html is:
<lisp>
  ;; insert pre day link when in Planner mode
  (let ((page (planner-page-name)))
   (when (and page (string-match planner-date-regexp page))
    (planner-calendar-prev-date-href-from-page "<<")))
</lisp>
<lisp>(muse-wiki-publish-pretty-title)</lisp>
<lisp>
  ;; insert next day link when in Planner mode
  (let ((page (planner-page-name)))
   (when (and page (string-match planner-date-regexp page))
    (planner-calendar-next-date-href-from-page ">>")))
</lisp>

But after it is published, "<<" is converted to html-encoded
"&lt;&lt;". What should I do to let muse publish it as original "<<"?

Thanks,
Zhao Lei


_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to publish the literal "<<" or ">>" with planner-calendar-prev-date-href-from-page?

Michael Olson-2
"赵雷" <[hidden email]> writes:

> Hi there,
>
> I want use "<<" and ">>" as "prev" and "next" link in my planner
> published pages.
>
> The code in my header.html is:
> <lisp>
>  ;; insert pre day link when in Planner mode
>  (let ((page (planner-page-name)))
>   (when (and page (string-match planner-date-regexp page))
>    (planner-calendar-prev-date-href-from-page "<<")))
> </lisp>
> <lisp>(muse-wiki-publish-pretty-title)</lisp>
> <lisp>
>  ;; insert next day link when in Planner mode
>  (let ((page (planner-page-name)))
>   (when (and page (string-match planner-date-regexp page))
>    (planner-calendar-next-date-href-from-page ">>")))
> </lisp>
>
> But after it is published, "<<" is converted to html-encoded
> "&lt;&lt;". What should I do to let muse publish it as original "<<"?
If you're using the development version of Muse, try <lisp
markup="nil"> instead of <lisp>.

--
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: Emacs Lisp, text markup, protocols -- Jabber: mwolson_at_hcoop.net
  /` |\ | | | IRC: freenode.net/mwolson: #emacs, #hcoop, #muse, #PurdueLUG
 |_] | \| |_| Projects: Emacs, Muse, ERC, EMMS, Planner, ErBot, DVC

_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: How to publish the literal "<<" or ">>" with planner-calendar-prev-date-href-from-page?

赵雷
On 9/21/06, Michael Olson <[hidden email]> wrote:
>
> If you're using the development version of Muse, try <lisp
> markup="nil"> instead of <lisp>.

I've downloaded muse by
===
tla register-archive -f http://arch.gna.org/muse-el/archive-2006/
tla get [hidden email]--2006-muse-el/muse-el--devel--0 muse
===
and tried using <lisp markup="nil">, but it still doesn't work.

When I publish, it still uses "&amp;lt;" as the html code which is
displayed as "&lt;" in browser.

I also tried to remove "<" and ">" from muse-xml-markup-specials. But
obviously this is not a good approach, because now the published html
code is "<", not "&lt;", though both are displayed as "<".

Thanks,
Zhao Lei


_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Re: How to publish the literal "<<" or ">>" with planner-calendar-prev-date-href-from-page?

赵雷
Now I use "&laquo;" and "&raquo; " instead, and remove "&" from
muse-xml-markup-specials (according to previous discussion about the
problem of month link of calender in this mailing list).

Now comes up another question. I use <calendar arrows="t">. When
publishing, it shows the following warning and nothing is published:

Warning (muse): An error occurred while publishing 2006.09.22:
(wrong-type-argument stringp nil)

A similiar error is reported in the previous discussion:
http://lists.nongnu.org/archive/html/emacs-wiki-discuss/2006-05/msg00045.html
, but that error is occured for index page.

muse Version: 3.02.92 (3.03 RC2)
planner Version: 3.41
The backtrace begin with planner-publish-calendar-tag is below:
=======================
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-directory(nil)
  (let ((dir ...)) (when dir (setq page ...)) (let (... ...) (if dir
... ... ...)))
  muse-project-page-file(nil "Plans")
  planner-page-file(nil)
  (and (planner-page-file page) (not (planner-private-p ...)))
  (if (and (planner-page-file page) (not ...)) (planner-link-href page
(or name page)) (or name page))
  planner-calendar-published-file-href(nil "\x00bb" t)
  (let ((next-date ...) (muse-publish-desc-transforms nil))
(planner-calendar-published-file-href
(planner-calendar-date-to-filename next-date) name nop))
  planner-calendar-next-month-href(9 2006 "\x00bb" t)
  (concat "<th>" (planner-calendar-next-month-href month year
planner-calendar-next-month-button planner-calendar-nop-buttons-flag)
"</th>\n")
  (progn (concat "<th>" (planner-calendar-next-month-href month year
planner-calendar-next-month-button planner-calendar-nop-buttons-flag)
"</th>\n"))
  (if arrows (progn (concat "<th>" ... "</th>\n")))
  (when arrows (concat "<th>" (planner-calendar-next-month-href month
year planner-calendar-next-month-button
planner-calendar-nop-buttons-flag) "</th>\n"))
  (concat "<table class=\"month-calendar\">\n" "<tr
class=\"month-calendar-head\">\n" (if arrows (concat "<th>" ...
"</th>\n" "<th colspan=\"5\">\n") "<th colspan=\"7\">\n") (format "%s
%d" (calendar-month-name month) year) "</th>\n" (when arrows (concat
"<th>" ... "</th>\n")) "</tr>\n" "<tr>\n" (planner-calendar-render i 0
6 "th" "month-calendar-day-head" (calendar-day-name day
planner-calendar-day-header-chars t)) "</tr>\n" "<tr>\n"
(planner-calendar-render i 0 (1- blank-days) "td"
"month-calendar-day-noday" "&nbsp;") (planner-calendar-render i
blank-days (+ last blank-days -1) "td" (if ...
"month-calendar-day-link" "month-calendar-day-nolink")
(planner-calendar-published-file-href ... ...
planner-calendar-nop-buttons-flag)) (unless (zerop ...)
(planner-calendar-render i ... ... "td" "month-calendar-day-noday"
"&nbsp;")) "</tr>\n" "</table>\n")
  (let* ((blank-days ...) (last ...) (pad-days ...) (string ...)) string)
  planner-calendar(9 2006 "t")
  (let ((year ...) (month ...)) (planner-calendar month year arrows))
  (progn (let (... ...) (planner-calendar month year arrows)))
  (if (and (stringp page) (save-match-data ...)) (progn (let ... ...)))
  (when (and (stringp page) (save-match-data ...)) (let (... ...)
(planner-calendar month year arrows)))
  planner-calendar-from-page("t" nil)
  (let* ((arrows ...) (page ...) (calendar ...)) (delete-region beg
end) (when calendar (planner-insert-markup "<div
class=\"calendar\">\n") (planner-insert-markup calendar)
(planner-insert-markup "</div>\n")))
  planner-publish-calendar-tag(839 #<marker at 839 in  *muse-temp*>
(("arrows" . "t")))
...
 =======================


_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss