David Abrahams <d...@boostpro.com> writes:

> Well, my first thought is "why didn't he use something based on
> clone-indirect-buffer and narrow-to-region instead of actually inserting
> and removing headers?"  Take a look at my-clone-region-set-mode in the
> enclosed.  It somehow seems like a more principled approach.

In a buffer that has been narrowed, the headers still exist.  While this
is fine for many, perhaps most modes, modes like nxml-mode won't work
with non-XML content at the top of the buffer. (I don't claim to be an
elisp expert, though, so let me know if you see a way around this.)

An alternative is to use something like mumamo.el (see nxhtml) which
allows you to use multiple major modes in a single buffer.  I may try
that in the future, but this quick hack was sufficient for now.

> The only thing I really wanted corrected was that if I edited a clone of
> the *weblogger-entry* buffer, its contents would be updated, but somehow
> weblogger-entry-mode wouldn't know that it had been changed, so they
> could be too easily lost, for example, by `C-c C-n'.  I think I'd still
> really like that to be fixed, no matter what else is done.

Sure.  But I didn't understand your problem.

I've spent some time attempting to reproduce it now, so I have a pretty
good idea of what is happening.

After evaluating your file, I opened up a weblogger-entry-mode buffer
with a currently published entry.  Then I did

    M-; (my-clone-region-set-mode 'org-mode) RET

and edited the cloned buffer.  At this point, I saw that both the cloned
buffer and the original buffer had been marked modified.  Finally, I
switched back to the original buffer and hit “C-c C-n” to go to the next
buffer.

Here's what happens:

    On my MT blog, the published post stays the same.  From the admin
    interface, I can see that the post has been edited, but the new
    version not yet published.

    On my WP.com blog, the post is no longer published, it has gone back
    to the “draft” state.

    On my LJ-based weblog, the post is updated and published.

Since I've been doing most of my testing till now with the LJ weblog, I
didn't catch this before.  It looks like this is related to the other
problem you mentioned: 

    When I edit a published article, it seems to become unpublished if I
    just do `C-c C-c' or `C-c C-s'.

Could you verify that and file a bug report here:

    https://savannah.nongnu.org/bugs/?group=emacsweblogs

Thanks,

Mark.

-- 
http://hexmode.com/

Every day, mindful practice.  When the mind is disciplined, then the
Way can work for us.  Otherwise, all we do is talk of the Way; everything
is just words; and the world will know us as its one great fool.


_______________________________________________
Emacsweblogs mailing list
Emacsweblogs@nongnu.org
http://lists.nongnu.org/mailman/listinfo/emacsweblogs

Reply via email to