From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: Why is there no selected region in the second case Date: Tue, 30 Sep 2008 19:00:29 +0200 Message-ID: References: <66c7838f-7c1c-4ddc-b7f3-f99144b9514d@79g2000hsk.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222794067 20842 80.91.229.12 (30 Sep 2008 17:01:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2008 17:01:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Decebal Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 30 19:02:05 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kkibs-0002K0-5X for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2008 19:02:04 +0200 Original-Received: from localhost ([127.0.0.1]:50427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kkiap-0007Lr-2I for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2008 13:00:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KkiaS-0007IM-6G for help-gnu-emacs@gnu.org; Tue, 30 Sep 2008 13:00:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KkiaQ-0007Ff-Qu for help-gnu-emacs@gnu.org; Tue, 30 Sep 2008 13:00:35 -0400 Original-Received: from [199.232.76.173] (port=51841 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkiaQ-0007FW-LP for help-gnu-emacs@gnu.org; Tue, 30 Sep 2008 13:00:34 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:34301) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkiaQ-0005aa-7h for help-gnu-emacs@gnu.org; Tue, 30 Sep 2008 13:00:34 -0400 Original-Received: from thursday (BAH54bb.bah.pppool.de [77.135.84.187]) by dd18200.kasserver.com (Postfix) with ESMTP id 15ADC182FA1A8; Tue, 30 Sep 2008 19:00:35 +0200 (CEST) In-Reply-To: <66c7838f-7c1c-4ddc-b7f3-f99144b9514d@79g2000hsk.googlegroups.com> (Decebal's message of "Mon\, 29 Sep 2008 09\:30\:09 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58232 Archived-At: Decebal 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