all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolaj Schumacher <me@nschum.de>
To: Decebal <CLDWesterhof@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Why is there no selected region in the second case
Date: Tue, 30 Sep 2008 19:00:29 +0200	[thread overview]
Message-ID: <m27i8tpo0i.fsf@nschum.de> (raw)
In-Reply-To: <66c7838f-7c1c-4ddc-b7f3-f99144b9514d@79g2000hsk.googlegroups.com> (Decebal's message of "Mon\, 29 Sep 2008 09\:30\:09 -0700 \(PDT\)")

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	other threads:[~2008-09-30 17:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29 16:30 Why is there no selected region in the second case Decebal
2008-09-30 17:00 ` Nikolaj Schumacher [this message]
     [not found] ` <mailman.20263.1222794037.18990.help-gnu-emacs@gnu.org>
2008-10-01  7:42   ` Decebal

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=m27i8tpo0i.fsf@nschum.de \
    --to=me@nschum.de \
    --cc=CLDWesterhof@gmail.com \
    --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.