emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] about muse-browse-result


From: kid kid
Subject: [emacs-wiki-discuss] about muse-browse-result
Date: Sun, 7 May 2006 22:15:46 +0800

Hello! I'm using muse 3.02.6 and GNU Emacs 22.0.50.1 . After I wrote a
page and publish the project using C-c C-p, I use M-x
muse-browse-result to preview the result. But it look for the
published file in the current directory ignoring what I've defined in
my muse-project-alist and of course, it can't find the published file
in the current directory where the source file is put. I follow the
function of muse-browse-result and find that it call
muse-publish-get-style to fetch the styles that may contains the
``:path'' property, but muse-publish-get-style simply return value in
muse-publishing-styles, totally ignores what's defined in
muse-project-alist. It says the variable ``muse-publishing-styles''
get automatically generated when loading publishing styles, but it
seems not contains the publishing path? So I hacked
muse-publish-get-style form

,----------[ muse-publish-get-style ]
| (defsubst muse-publish-get-style ()
|   (if (= 1 (length muse-publishing-styles))
|       (car muse-publishing-styles)
|     (assoc (completing-read "Publish with style: "
|                             muse-publishing-styles nil t)
|            muse-publishing-styles)))
|  hacked by pluskid to make it find properly where the path is
`----------

to

,----------[ muse-publish-get-style ]
| (defsubst muse-publish-get-style()
|   (if (= 1 (length (cddr muse-current-project)))
|       (car (cddr muse-current-project))
|     (assoc (completing-read "Publish with style: "
|                           (cddr muse-current-project) nil t)
|          (cddr muse-current-project))))
`----------

And it seems to work now. It got the correct path to view the
published page. But I'm not sure whether this hack will mess up the
other codes in the package. It seems that the old function returning
things from muse-publishing-styles contains informations such as
muse-html-style-sheet etc. But the hacked function return only things
that are species in muse-project-alist and didn't contain those
informations. I wonder if the publishing process may call
muse-publish-get-style to gather informations such as style-sheet etc.
So I grep the *.el for muse-publish-get-style searching for uses of
this function. I found muse-publish-get-info use it and
muse-publish-get-info is used elsewhere... That's going to be a lot of
work to follow all of them. So I just test some file, the publish
process seems good and the published file seems to be correct, also
muse-browse-result works correctly. But I'm not sure about that. I'm
afraid if someday it goes wrong on some condition. So I'm asking
whether this is bug and is there an already alavaible way to fixed and
whether my hacking may make things go wrong.

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]