GNU bug report logs - #4717
23.1.50; C-M-h in bibtex mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Leo <sdl.web@HIDDEN>; dated Tue, 13 Oct 2009 15:35:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 4717@HIDDEN:


Received: (at 4717) by emacsbugs.donarmstrong.com; 19 Oct 2009 03:38:51 +0000
From rwinkler@HIDDEN Sun Oct 18 20:38:51 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from tfkpsv.physik.uni-erlangen.de (tfkpsv.physik.uni-erlangen.de [131.188.164.197])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9J3cn4r018332
	for <4717@HIDDEN>; Sun, 18 Oct 2009 20:38:51 -0700
Received: from regnitz.physics.niu.edu (adsl-68-77-29-3.dsl.emhril.ameritech.net [68.77.29.3])
	by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id BE3CE84B34;
	Mon, 19 Oct 2009 05:38:48 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <19163.57157.842686.926110@HIDDEN>
Date: Sun, 18 Oct 2009 22:38:45 -0500
From: "Roland Winkler" <Roland.Winkler@HIDDEN>
To: Chong Yidong <cyd@HIDDEN>
Cc: 4717 <at> debbugs.gnu.org
Subject: Re: 23.1.50; C-M-h in bibtex mode
In-Reply-To: <87ws2sbg0k.fsf@HIDDEN>
References: <8763agjs00.fsf@HIDDEN>
	<19163.19389.592808.77535@HIDDEN>
	<87ws2sbg0k.fsf@HIDDEN>
X-Mailer: VM 8.2 trial under 23.1.50.1 (i686-pc-linux-gnu)

On Sun Oct 18 2009 Chong Yidong wrote:
> > mark-defun does not put point where beginning-of-defun puts it. But
> > if there is an empty line preceding the beginning-of-defun location,
> > mark-defun will put point there. Why? The docstring of mark-defun
> > does not explain this behavior.
> 
> I don't know the answer.  This behavior dates to 1993, though, so I
> don't think it's feasible to change it for Lisp mode.

Agreed, changing it will probably break something. Could it be that
the empty line was included so that in a sequence of defuns (each
normally separated by one empty line) mark-defun could by used, for
example in combination with kill-region and yank to move around
defuns in a simple way?

No matter whether something like that or anything else was the
actual reason for implementing this behavior, the docstring should
always document the actual behavior

Roland



Acknowledgement sent to "Roland Winkler" <Roland.Winkler@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4717; Package emacs. Full text available.

Message received at 4717@HIDDEN:


Received: (at 4717) by emacsbugs.donarmstrong.com; 18 Oct 2009 20:31:49 +0000
From cyd@HIDDEN Sun Oct 18 13:31:48 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.0 required=4.0 tests=AWL autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from pantheon-po43.its.yale.edu (pantheon-po43.its.yale.edu [130.132.50.104])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9IKVlpm018499
	for <4717@HIDDEN>; Sun, 18 Oct 2009 13:31:48 -0700
Received: from furry (adsl-99-69-49-186.dsl.wlfrct.sbcglobal.net [99.69.49.186])
	(authenticated bits=0)
	by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n9IKVfZf026510
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Sun, 18 Oct 2009 16:31:41 -0400
Received: by furry (Postfix, from userid 1000)
	id 06EFAC070; Sun, 18 Oct 2009 16:31:39 -0400 (EDT)
From: Chong Yidong <cyd@HIDDEN>
To: "Roland Winkler" <Roland.Winkler@HIDDEN>
Cc: 4717 <at> debbugs.gnu.org
Subject: Re: 23.1.50; C-M-h in bibtex mode
References: <8763agjs00.fsf@HIDDEN>
	<19163.19389.592808.77535@HIDDEN>
Date: Sun, 18 Oct 2009 16:31:39 -0400
In-Reply-To: <19163.19389.592808.77535@HIDDEN> (Roland
	Winkler's message of "Sun, 18 Oct 2009 12:09:17 -0500")
Message-ID: <87ws2sbg0k.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed)

"Roland Winkler" <Roland.Winkler@HIDDEN> writes:

> mark-defun does not put point where beginning-of-defun puts it. But
> if there is an empty line preceding the beginning-of-defun location,
> mark-defun will put point there. Why? The docstring of mark-defun
> does not explain this behavior.

I don't know the answer.  This behavior dates to 1993, though, so I
don't think it's feasible to change it for Lisp mode.



Acknowledgement sent to Chong Yidong <cyd@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4717; Package emacs. Full text available.

Message received at 4717@HIDDEN:


Received: (at 4717) by emacsbugs.donarmstrong.com; 18 Oct 2009 17:09:25 +0000
From rwinkler@HIDDEN Sun Oct 18 10:09:25 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from tfkpsv.physik.uni-erlangen.de (tfkpsv.physik.uni-erlangen.de [131.188.164.197])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9IH9Okr016170
	for <4717@HIDDEN>; Sun, 18 Oct 2009 10:09:25 -0700
Received: from regnitz.physics.niu.edu (adsl-68-77-29-3.dsl.emhril.ameritech.net [68.77.29.3])
	by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 2066484A27;
	Sun, 18 Oct 2009 19:09:21 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <19163.19389.592808.77535@HIDDEN>
Date: Sun, 18 Oct 2009 12:09:17 -0500
From: "Roland Winkler" <Roland.Winkler@HIDDEN>
To: Chong Yidong <cyd@HIDDEN>
Cc: 4717 <at> debbugs.gnu.org
Subject: Re: 23.1.50; C-M-h in bibtex mode
In-Reply-To: <8763agjs00.fsf@HIDDEN>
References: <8763agjs00.fsf@HIDDEN>
X-Mailer: VM 8.2 trial under 23.1.50.1 (i686-pc-linux-gnu)

On Thu Oct 15 2009 Chong Yidong wrote:
> Could you take a look at this bug?  There seems to be no good reason for
> bibtex to behave differently than the rest of Emacs.  What bibtex-mode
> probably needs to do is to bind beginning/end-of-defun-function to
> bibtex-beginning/end-of-entry.  Then you can remove bibtex-mark-entry
> (or rather make it an obsolete alias for mark-defun).

Kind of related question:

mark-defun does not put point where beginning-of-defun puts it. But
if there is an empty line preceding the beginning-of-defun location,
mark-defun will put point there. Why? The docstring of mark-defun
does not explain this behavior. Also, the optional arg of mark-defun
should be explained, too.

Thanks,

Roland



Acknowledgement sent to "Roland Winkler" <Roland.Winkler@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4717; Package emacs. Full text available.

Message received at 4717@HIDDEN:


Received: (at 4717) by emacsbugs.donarmstrong.com; 15 Oct 2009 23:09:33 +0000
From rwinkler@HIDDEN Thu Oct 15 16:09:33 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from essmail.ess.niu.edu (essmail.ess.niu.edu [131.156.1.18])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9FN9WJO005934
	for <4717@HIDDEN>; Thu, 15 Oct 2009 16:09:33 -0700
Received: from lukas.physics.niu.edu (lukas.physics.niu.edu [131.156.85.221])
	by essmail.ess.niu.edu (8.13.6/8.13.6) with ESMTP id n9FN9TA8007552;
	Thu, 15 Oct 2009 18:09:29 -0500 (CDT)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <19159.43945.39728.132688@HIDDEN>
Date: Thu, 15 Oct 2009 18:09:29 -0500
From: "Roland Winkler" <Roland.Winkler@HIDDEN>
To: Chong Yidong <cyd@HIDDEN>
Cc: 4717 <at> debbugs.gnu.org
Subject: Re: 23.1.50; C-M-h in bibtex mode
In-Reply-To: <8763agjs00.fsf@HIDDEN>
References: <8763agjs00.fsf@HIDDEN>
X-Mailer: VM 8.2 trial under 23.1.50.1 (x86_64-unknown-linux-gnu)

On Thu Oct 15 2009 Chong Yidong wrote:
> Could you take a look at this bug? There seems to be no good
> reason for bibtex to behave differently than the rest of Emacs.
> What bibtex-mode probably needs to do is to bind
> beginning/end-of-defun-function to bibtex-beginning/end-of-entry.
> Then you can remove bibtex-mark-entry (or rather make it an
> obsolete alias for mark-defun).

I thought I could do that quickly, till I realized there is a minor
nuisance:

There are several functions / commands that could benefit from
binding beginning/end-of-defun-function to bibtex-beginning/end-of-entry.
Yet for historical reasons bibtex-beginning/end-of-entry behave
slightly different from the `standard' beginning/end-of-defun.
So the proper solution will be to make these bibtex functions behave
similar to beginning/end-of-defun
This will require to check also the internal usage of
bibtex-beginning/end-of-entry by bibtex-mode, which is just a bit
more work...

Roland



Acknowledgement sent to "Roland Winkler" <Roland.Winkler@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4717; Package emacs. Full text available.

Message received at 4717@HIDDEN:


Received: (at 4717) by emacsbugs.donarmstrong.com; 15 Oct 2009 20:56:38 +0000
From cyd@HIDDEN Thu Oct 15 13:56:38 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-0.3 required=4.0 tests=AWL,FOURLA autolearn=no
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from pantheon-po43.its.yale.edu (pantheon-po43.its.yale.edu [130.132.50.104])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9FKubuS016363
	for <4717@HIDDEN>; Thu, 15 Oct 2009 13:56:38 -0700
Received: from furry (dhcp128036014244.central.yale.edu [128.36.14.244])
	(authenticated bits=0)
	by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n9FKuVXu005966
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 15 Oct 2009 16:56:31 -0400
Received: by furry (Postfix, from userid 1000)
	id 9DFBAC070; Thu, 15 Oct 2009 16:56:31 -0400 (EDT)
From: Chong Yidong <cyd@HIDDEN>
To: Roland Winkler <roland.winkler@HIDDEN>
Cc: 4717 <at> debbugs.gnu.org
Subject: Re: 23.1.50; C-M-h in bibtex mode
Date: Thu, 15 Oct 2009 16:56:31 -0400
Message-ID: <8763agjs00.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed)

Hi Roland,

Could you take a look at this bug?  There seems to be no good reason for
bibtex to behave differently than the rest of Emacs.  What bibtex-mode
probably needs to do is to bind beginning/end-of-defun-function to
bibtex-beginning/end-of-entry.  Then you can remove bibtex-mark-entry
(or rather make it an obsolete alias for mark-defun).

WDYT?

> C-M-h which runs bibtex-mark-entry in BibTeX-mode seems to be
> inconsistent with C-M-h in other modes. For example, C-M-h in
> emacs-lisp-mode will mark the 'defun' with highlighted region and the
> point in the beginning of the region.

> In BibTeX mode, however, the region is _not_ highlighted and the point
> is left at the end of the region.

> I wonder if this inconsistency can be done away with.



Acknowledgement sent to Chong Yidong <cyd@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4717; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 13 Oct 2009 15:26:20 +0000
From sl392@HIDDEN Tue Oct 13 08:26:20 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.2 required=4.0 tests=AWL autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9DFQIE4016998
	for <submit@HIDDEN>; Tue, 13 Oct 2009 08:26:20 -0700
Received: from mx10.gnu.org ([199.232.76.166]:59866)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <sl392@HIDDEN>)
	id 1MxjGU-0007Y6-H6
	for emacs-pretest-bug@HIDDEN; Tue, 13 Oct 2009 11:26:18 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <sl392@HIDDEN>)
	id 1MxjGS-0004M6-QX
	for emacs-pretest-bug@HIDDEN; Tue, 13 Oct 2009 11:26:18 -0400
Received: from ppsw-6.csi.cam.ac.uk ([131.111.8.136]:35801)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <sl392@HIDDEN>)
	id 1MxjGS-0004Lg-Gl
	for emacs-pretest-bug@HIDDEN; Tue, 13 Oct 2009 11:26:16 -0400
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from lapwing-gw-1.csx.cam.ac.uk ([131.111.1.66]:64086 helo=victoria.local)
	by ppsw-6.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587)
	with esmtpsa (PLAIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128)
	id 1MxjGQ-0003ni-Kz (Exim 4.70) for emacs-pretest-bug@HIDDEN
	(return-path <sl392@HIDDEN>); Tue, 13 Oct 2009 16:26:14 +0100
From: Leo <sdl.web@HIDDEN>
To: emacs-pretest-bug@HIDDEN
Subject: 23.1.50; C-M-h in bibtex mode
Date: Tue, 13 Oct 2009 16:26:12 +0100
Message-ID: <m0r5t71fjf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (darwin)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: "Leo, Shidai Liu" <sl392@HIDDEN>
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4)

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

C-M-h which runs bibtex-mark-entry in BibTeX-mode seems to be
inconsistent with C-M-h in other modes. For example, C-M-h in
emacs-lisp-mode will mark the 'defun' with highlighted region and the
point in the beginning of the region.

In BibTeX mode, however, the region is _not_ highlighted and the point
is left at the end of the region.

I wonder if this inconsistency can be done away with.

Best wishes,

Leo



Acknowledgement sent to Leo <sdl.web@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4717; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.