emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Matthew Sauer <improv.philosophy@gmail.com>
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: [HELP} trying to figure out how to figure out?
Date: Tue, 19 Jul 2011 02:05:28 +0200	[thread overview]
Message-ID: <871uxnuoc7.fsf@gnu.org> (raw)
In-Reply-To: <CALRk1sa1R+sHKEDi1bbqZrMy_x3nMukKECEHV9909KUpy0iXCQ@mail.gmail.com> (Matthew Sauer's message of "Mon, 18 Jul 2011 17:49:06 -0500")

Hi Matthew,

(defconst ...) defines a constant, i.e. a symbol which value
will not change.

What happens here is that org.el defines org-outline-regexp
as a constant, whereas some functions use org-outline-regexp
as a symbol for a temporary value (used in let constructs).

See for example the macro `org-with-limited-levels' in org-macs.el:

#+begin_src emacs-lisp
(defmacro org-with-limited-levels (&rest body)
  "Execute BODY with limited number of outline levels."
  `(let* ((org-outline-regexp (org-get-limited-outline-regexp)))
     ,@body))
#+end_src emacs-lisp


The let* construct uses org-outline-regexp to store a temporary
value...  which 100% conflicts (!) with the idea of org-outline-regexp
being a constant.

Thanks for spotting at this!

I've just pushed this fix:

  http://orgmode.org/w/?p=org-mode.git;a=commit;h=08fc6384bcb3937d933f21d0b12c818603d8a279

PS: some compilation warnings depend on the Emacs version you use,
it's always a good idea to tell what version of Emacs you use.

-- 
 Bastien

  reply	other threads:[~2011-07-19  0:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 22:49 [HELP} trying to figure out how to figure out? Matthew Sauer
2011-07-19  0:05 ` Bastien [this message]
2011-07-19 15:48 ` Achim Gratz

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=871uxnuoc7.fsf@gnu.org \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=improv.philosophy@gmail.com \
    /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).