all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 16265@debbugs.gnu.org
Subject: bug#16265: 24.3.50; re-search-forward (error "Invalid search bound (wrong side of point)")
Date: Tue, 31 Dec 2013 13:07:24 +0100	[thread overview]
Message-ID: <52C2B37C.6060107@yahoo.fr> (raw)
In-Reply-To: <m2ob40iu3f.wl%esq@lawlist.com>

Le 28/12/2013 21:44, Keith David Bershatsky a écrit :
> This example demonstrates the problem caused when `org-capture`
> damages the line numbers in the `org-agenda-files`, making it
> impossible to go to the bottom of the buffer with (goto-char
> (point-max))  --  consequently, re-search-backward fails -- other
> functions fail also, e.g., `org-sort-entries`.

Thanks for the recipe, I can indeed reproduce problems, but they are
different from what you describe. I suspect they are tied, but I'm not
sure because I don't understand them.

Here is a reduced version of your recipe which shows what I see. Run the
following snippet using emacs -Q --batch -l filenamehere :
,---- this is filenamehere.el
| (setq test-file "/tmp/foo.org")
| (setq capture-todo (mapconcat
|                     #'identity
|                     (list "** whatever"
|                           ":PROPERTIES:"
|                           ":ToodledoFolder: TASKS"
|                           ":END:")
|                     "\n"))
| (when (file-exists-p test-file) (delete-file test-file) (message "Deleted file %s" test-file))
| (find-file test-file)
| (org-mode)
| (setq org-agenda-files (list test-file))
| (setq org-capture-templates `(("n" "NextAction" entry (file+headline test-file "TASKS")
| 			       ,capture-todo)))
| (org-capture nil "n")
| (org-capture-finalize)
| (goto-char (point-min))
| (insert "It's important to insert something ; I guess it triggers something\n")
| (search-forward "Toodledo")
| (end-of-line) ; this should land us before "\n:END:" not after it
| (if (looking-at "\n:END:")
|     (message "Great!")
|   (error "Problem here."))
`----

fun facts : if you remove the (insert ...) form, it works. Also, if you
do it interactively, then the problem appears too, but not if you clone
the buffer.

I'll bisect this (I tested 24.3, it works there) and post the result
unless someone understands what's going on before the bisect finishes
(it does take quite some time to rebuild each version of emacs on my
machine).

-- 
Nicolas.

  reply	other threads:[~2013-12-31 12:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-27  5:57 bug#16265: 24.3.50; re-search-forward (error "Invalid search bound (wrong side of point)") Keith David Bershatsky
2013-12-27 12:55 ` Nicolas Richard
2013-12-27 17:35 ` Keith David Bershatsky
2013-12-28  8:00 ` Keith David Bershatsky
2013-12-28 20:44 ` Keith David Bershatsky
2013-12-31 12:07   ` Nicolas Richard [this message]
2013-12-31 14:16     ` Nicolas Richard
2013-12-31 17:37 ` Keith David Bershatsky
2014-01-01  9:46   ` Nicolas Richard
2014-01-01  9:46   ` Nicolas Richard
2014-01-01 17:50   ` Eli Zaretskii
2014-01-01 17:50   ` Eli Zaretskii
2014-01-02  1:30 ` Keith David Bershatsky
2014-01-02  1:30 ` Keith David Bershatsky
2014-01-02  3:38   ` Eli Zaretskii
2014-01-02  3:38   ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52C2B37C.6060107@yahoo.fr \
    --to=theonewiththeevillook@yahoo.fr \
    --cc=16265@debbugs.gnu.org \
    --cc=esq@lawlist.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.