all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luca Ferrari <fluca1978@infinito.it>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: align-regexp problem when called from lisp code
Date: Thu, 8 Aug 2013 12:34:02 +0200	[thread overview]
Message-ID: <CAKoxK+54D1eJ7EtYbauEFDy8Zi9CRC2JBDSa=TtfgyHFvO3t3A@mail.gmail.com> (raw)

Hi all,
if I use (align-regexp) interactively with a region marked all works
as expected, but if I call it from the following piece of lisp:

(defun fluca1978/align-assignments ()
  (interactive )
  (let ( (line-moving-increment) )
    (align-regexp (point) (mark) "=" )
    (deactivate-mark) ) )

I got the following stack trace:

Debugger entered--Lisp error: (error "Marker does not point anywhere")
  align-areas(((#<marker (moves after insertion) in no buffer> .
#<marker (moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>) (#<marker (moves after insertion) in no buffer> . #<marker
(moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>) (#<marker (moves after insertion) in no buffer> . #<marker
(moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>) (#<marker (moves after insertion) in no buffer> . #<marker
(moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>) (#<marker (moves after insertion) in no buffer> . #<marker
(moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>)) (1) (nil (regexp . "=") (group . 1) (bogus) (spacing . 1)
(repeat)) nil)
  align-region(5171 5775 entire ((nil (regexp . "=") (group . 1)
(bogus) (spacing . 1) (repeat))) nil nil)
  align-regexp(5171 5775 "=")
  (let ((line-moving-increment)) (align-regexp (point) (mark) "=")
(deactivate-mark))
  fluca1978/align-assignments()
  call-interactively(fluca1978/align-assignments t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)


What am I missing?

Thanks,
Luca



             reply	other threads:[~2013-08-08 10:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08 10:34 Luca Ferrari [this message]
2013-08-08 11:32 ` align-regexp problem when called from lisp code Tassilo Horn
2013-08-08 11:57   ` Luca Ferrari
2013-08-09  6:08     ` Luca Ferrari
2013-08-09  8:13       ` Tassilo Horn
2013-08-09  8:45         ` Luca Ferrari
2013-08-09  9:40           ` Tassilo Horn
2013-08-09 10:03             ` Luca Ferrari

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='CAKoxK+54D1eJ7EtYbauEFDy8Zi9CRC2JBDSa=TtfgyHFvO3t3A@mail.gmail.com' \
    --to=fluca1978@infinito.it \
    --cc=help-gnu-emacs@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 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.