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

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

Re: [emacs-wiki-discuss] Re: Kludge fix for notes in planner-muse


From: Peter K . Lee
Subject: Re: [emacs-wiki-discuss] Re: Kludge fix for notes in planner-muse
Date: Mon, 15 Aug 2005 10:18:24 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.0.50 (gnu/linux)

Chris McMahan <address@hidden> writes:

> Peter,
>
> Thanks for the cleanup! You had an excellent point in getting the HTML
> out of the functions, and you solution works quite well.
>
> I'd like to recommend one change, however. 
> In the function planner-publish-markup-note, you're specifying
> level=2 for the title, which maps to <h3> and a forced line feed.
>
> (format "<title level=\"2\">%s</title>\n"
>
> You can highlights this with css instead, while eliminating the forced
> line feed.
>
> (format "<title>%s</title>\n"

I know, I'm personally not used to using h* in standard html markup,
but I kept the above functionality as derived from original muse html
publishing for a couple of reasons.

1. make it compatible with current planner publishing user base
   (either migrating from emacs-wiki, or muse users that expect h*
   behavior)
2. text-based web browsers (i.e. w3m, links) and such do *not* process
   CSS.  But they *do* understand h* and do a decent job marking them
   up as titles.

The whole level thing is to generate a sense of hierarchy in the
titles.  Obviously, with pure CSS and CSS-based browsers, we can do
nest the sections and titles as...

.section .title { something }
.section .section .title { something else }

But obviously it doesn't play nice with text browsers that does not
understand the above statement.

However, if the forced line feed is what you're trying to avoid, you
can do the following:

.note h3 { display: inline; }

Which is what I'd recommend for now in order to play nice with
text-based web browsers.  For one, I use w3m for most browsing needs,
and I'm sure there are many others (especially Emacs users) who does
the same.

-Peter

p.s. I'm copying my response to the list in case there are others with
similar concerns.  I hope that's ok with you.


> Here's the css I have that maps to your changes and still emphasizes

> the title:
>
> /******* notes *********/
> .note { 
>   margin-top: 1.5em;
>   text-transform: uppercase;
>   font-weight: bold;
> }
> .note .content {
>   font-weight: normal;
>   text-transform: none;
>   padding-left: 20px;
>   font-style: normal;
> }
> .note .details {
>   font-weight: normal;
>   text-transform: none;
> }
>
> - Chris
>
> Peter K.Lee writes:
>>Chris McMahan <address@hidden> writes:
>>
>>> In using the newest (10 Aug) planner-muse with the planner-html output
>>> format, I discovered that the links to the notes were being dropped on
>>> publishing.
>>>
>>> I hacked this fix within planner-publish.el (diff output is
>>> attached).
>>>
>>> Within the limited testing it went through, it seems to be working.
>>>
>>> I'm not a lisp programmer by any stretch. I'd welcome any
>>> comments. Maybe there was a simple solution (like using another style
>>> within planner) or a cleaner way of coding this. 
>>>
>>> - Chris
>>
>>The patch has been applied with minor modifications to place HTML
>>markup as part of planner-html-markup-strings instead of inside the
>>planner-publish-note-tag.  The tag publishing routines should be free
>>from html specific markup so that in the future, we can have planner
>>specific latex publishing or such and have those over-loaded via
>>planner-latex-markup-strings.
>>
>>You can also consider _customizing_ the planner-html-markup-strings
>>variable to generate other HTML output of your choice!
>>
>>I ended up placing the details (timestamp, links) into its own div
>>class="details" at the end of the note markup instead of after the
>>title (I like the way how Sacha has her notes published).  To be
>>honest, I'm not really sure where it should go.  I'm open to
>>suggestions! :)
>>
>>You can find the patch on my planner-muse tree as the following:
>>
>>address@hidden/planner-muse--peter--1.0--patch-9
>>
>>Thanks for the patch Chris!
>>
>>-Peter
>>
>>
>>_______________________________________________
>>emacs-wiki-discuss mailing list
>>address@hidden
>>http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
>
> -- 
>     ================================
>     Chris McMahan | address@hidden
>     ================================

-- 
B 01110011 01100001 01101001 01101110 01110100
----------------------------------------------
Managing Member @ CORENOVA,LLC. M:919-641-6314
- let them be, just evolve.     O:919-641-6314
----------------------------------------------
56 69 73 69 74  75 73  61 74: www.corenova.com

CORENOVA> ./freedom. intoxicating. <RET>




reply via email to

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