help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Why is there no selected region in the second case


From: Nikolaj Schumacher
Subject: Re: Why is there no selected region in the second case
Date: Tue, 30 Sep 2008 19:00:29 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

Decebal <CLDWesterhof@gmail.com> wrote:

> The first push-mark works and I can delete with delete-region. But the
> second does not work. There is no region selected after the last two
> statements. What am I doing wrong?

Actually the second one works, too.  However, in Emacs, the region is
visually highlighted only when the mark is "active".

Are you sure you want to activate the mark, though?  Normally you would
save the position in a variable, something like this:

(save-excursion
  (goto-char (point-min))
  (let ((beg (point)))
    (re-search-forward "^=" nil t)
    (forward-line 2)
    (delete-region beg (point))))


regards,
Nikolaj Schumacher




reply via email to

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