GNU bug report logs - #11266
emacs 23.4 with --batch and (next-line)

Previous Next

Package: emacs;

Reported by: <michael_rytting <at> agilent.com>

Date: Tue, 17 Apr 2012 17:16:01 UTC

Severity: normal

Tags: notabug

Merged with 11053

Found in version 24.0.94

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11266 in the body.
You can then email your comments to 11266 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11266; Package emacs. (Tue, 17 Apr 2012 17:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to <michael_rytting <at> agilent.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 17 Apr 2012 17:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: <michael_rytting <at> agilent.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: emacs 23.4 with --batch and (next-line)
Date: Tue, 17 Apr 2012 11:11:45 -0600
[Message part 1 (text/plain, inline)]
I recently upgraded to emacs 23.4 and found a rather obscure bug.  When invoked with -batch emacs behaves differently with the command (next-line) compared to when it is invoked without batch.  I had to switch to using (forward-line) in my code to work around this.  This behavior can be easily seen by running.

emacs -batch config.log --eval "(next-line 1)"

And you'll see and End of buffer message.  While

emacs -Q config.log --eval "(next-line 1)"

Produces no such error.


Michael Rytting
Agilent Technologies
michael_rytting <at> agilent.com<mailto:michael_rytting <at> agilent.com>
719-590-3708

[Message part 2 (text/html, inline)]

Merged 11053 11266. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 17 Apr 2012 17:40:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11266; Package emacs. (Wed, 18 Apr 2012 03:13:02 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#11266: emacs 23.4 with --batch and (next-line)
Date: Tue, 17 Apr 2012 21:05:04 -0600
On 4/17/12 11:11 AM, michael_rytting <at> agilent.com wrote:
> I recently upgraded to emacs 23.4 and found a rather obscure bug. When invoked
> with –batch emacs behaves differently with the command (next-line) compared to
> when it is invoked without batch. I had to switch to using (forward-line) in my
> code to work around this. This behavior can be easily seen by running.
>
> emacs –batch config.log --eval "(next-line 1)"
>
> And you’ll see and End of buffer message. While
>
> emacs -Q config.log --eval "(next-line 1)"
>
> Produces no such error.

`C-h f next-line' says:

	If you are thinking of using this in a Lisp program, consider
	using `forward-line' instead.  It is usually easier to use
	and more reliable (no dependence on goal column, etc.).

And `M-: (info "(emacs)Initial Options")' reminds:

     `--batch' implies `-q' (do not load an initialization file), but
     `site-start.el' is loaded nonetheless.  It also causes Emacs to
     exit after processing all the command options.  In addition, it
     disables auto-saving except in buffers for which it has been
     explicitly requested.

-- 
Kevin Rodgers
Denver, Colorado, USA





bug closed, send any further explanations to 11053 <at> debbugs.gnu.org and Reuben Thomas <rrt <at> sc3d.org> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 18 Apr 2012 07:06:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11266; Package emacs. (Wed, 18 Apr 2012 21:47:02 GMT) Full text and rfc822 format available.

Message #15 received at 11266 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: <michael_rytting <at> agilent.com>
Cc: 11266 <at> debbugs.gnu.org
Subject: Re: bug#11266: emacs 23.4 with --batch and (next-line)
Date: Wed, 18 Apr 2012 17:46:29 -0400
tags 11266 notabug
thanks

> emacs -batch config.log --eval "(next-line 1)"
> And you'll see and End of buffer message.  While
> emacs -Q config.log --eval "(next-line 1)"
> Produces no such error.

`next-line' in Emacs-23 was changed to use visual lines rather than
logical lines, so its behavior depends on the shape of the selected
window.  And indeed, the selected-window depends on the terminal
(-batch uses a dummy terminal).


        Stefan




Added tag(s) notabug. Request was from Stefan Monnier <monnier <at> IRO.UMontreal.CA> to control <at> debbugs.gnu.org. (Wed, 18 Apr 2012 21:47:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11266; Package emacs. (Wed, 18 Apr 2012 21:49:01 GMT) Full text and rfc822 format available.

Message #20 received at 11266 <at> debbugs.gnu.org (full text, mbox):

From: <michael_rytting <at> agilent.com>
To: <monnier <at> IRO.UMontreal.CA>
Cc: 11266 <at> debbugs.gnu.org
Subject: RE: bug#11266: emacs 23.4 with --batch and (next-line)
Date: Wed, 18 Apr 2012 15:47:49 -0600
Good to know, I've already corrected my scripts to use forward-line instead.

-----Original Message-----
From: Stefan Monnier [mailto:monnier <at> IRO.UMontreal.CA] 
Sent: Wednesday, April 18, 2012 3:46 PM
To: RYTTING,MICHAEL (A-ColSprings,ex1)
Cc: 11266 <at> debbugs.gnu.org
Subject: Re: bug#11266: emacs 23.4 with --batch and (next-line)

tags 11266 notabug
thanks

> emacs -batch config.log --eval "(next-line 1)"
> And you'll see and End of buffer message.  While emacs -Q config.log 
> --eval "(next-line 1)"
> Produces no such error.

`next-line' in Emacs-23 was changed to use visual lines rather than logical lines, so its behavior depends on the shape of the selected window.  And indeed, the selected-window depends on the terminal (-batch uses a dummy terminal).


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 17 May 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 34 days ago.

Previous Next


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