From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: org-indent mode not indenting free text?
Date: Sat, 04 Dec 2010 10:12:18 +0100 [thread overview]
Message-ID: <87hbet7vgt.fsf@Rainer.invalid> (raw)
In-Reply-To: 4CF95F69.3050303@ccbr.umn.edu
Hi Eric,
Erik Iverson <eriki@ccbr.umn.edu> writes:
> It only appears defined for Emacs < 23.2,
> So in particular, 23.1.50 is 'stuck' in
> between these two version checks, and maybe
> that's causing Antti's issue?
Sorry for the confusion and my apologies for any trouble I have caused.
When introducing this patch I referred to the documentation that said
"with-silent-modifications" was introduced in Emacs 23.2, hence the test
for this version. I was completely unaware of Emacs 23.1.50, which must
have this function, otherwise org-indent-mode should not work as it is
currently implemented. In earlier versions of org-indent-mode the call
to with-silent-modifications had been using org-unmodified (see [1] for
why it has been changed), hence my attempt to redefine
with-silent-modifications with org-unmodified when unavailable. The
problems on Emacs 23.1.50 prove that these two are not really
interchangeable, but I was hoping for "close enough".
As I understand, the crashes Emacs <23.1.50 with org-indent-mode have
nothing to do with the bug that got fixed by with-silent-modifications,
so these are really different issues. For the reasons outlined above my
attempted patch is botched, but I'm not sure how to proceed. Maybe a
better idea is to revert org-indent back to using org-unmodified and
implementing this macro using with-silent-modifications on Emacsen where
it is available. Since org-unmodified is used in many more places this
would need some testing, but it might be easier to maintain in the long
run.
(defmacro org-unmodified (&rest body)
"Execute body without changing `buffer-modified-p'.
Also, do not record undo information."
(if (not (fboundp 'with-silent-modifications))
`(set-buffer-modified-p
(prog1 (buffer-modified-p)
(let ((buffer-undo-list t)
before-change-functions after-change-functions)
,@body)))
`(with-silent-modifications ,@body)))
The version check in org-indent.el should probably be replaced by a
feature-check for with-silent-modifications to avoid the bug in [1].
[1] http://comments.gmane.org/gmane.emacs.orgmode/31927
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
next prev parent reply other threads:[~2010-12-04 9:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 16:47 org-indent mode not indenting free text? Erik Iverson
2010-11-23 18:51 ` Nicolas Goaziou
2010-11-23 20:35 ` David Maus
2010-12-02 7:57 ` Antti Kaihola
2010-12-02 20:17 ` Achim Gratz
2010-12-03 13:30 ` Antti Kaihola
2010-12-03 16:18 ` Erik Iverson
2010-12-03 19:57 ` Carsten Dominik
2010-12-03 21:16 ` Achim Gratz
2010-12-03 21:21 ` Erik Iverson
2010-12-03 22:33 ` Carsten Dominik
2010-12-04 9:12 ` Achim Gratz [this message]
2010-12-03 17:08 ` Achim Gratz
2010-12-02 18:51 ` Carsten Dominik
2010-12-02 20:29 ` Erik Iverson
2010-12-02 20:32 ` Erik Iverson
2010-12-03 13:15 ` Antti Kaihola
2010-12-02 20:42 ` Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hbet7vgt.fsf@Rainer.invalid \
--to=stromeko@nexgo.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).