emacsweblogs
[Top][All Lists]
Advanced

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

[Emacsweblogs] Re: weblogger & major mode


From: David Abrahams
Subject: [Emacsweblogs] Re: weblogger & major mode
Date: Fri, 18 Sep 2009 22:17:19 -0400


On Sep 18, 2009, at 4:47 PM, Mark A. Hershberger wrote:

David Abrahams <address@hidden> 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.

Oh, I didn't realize that. I suppose it makes sense, though, as a design decision. Either you accept the hidden stuff may bork the mode's parser (status quo) or you accept that eliminating the hidden stuff may bork the mode's parser. I think the status quo is probably less prone to surprising behavior.

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

Yeah, I talked to the mumamo guy about this, but he didn't support markdown at that time.

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

I don't know how I'd verify your analysis, but I'll file the bug report.

--
David Abrahams
BoostPro Computing
http://boostpro.com








reply via email to

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