* bug#11266: emacs 23.4 with --batch and (next-line)
@ 2012-04-17 17:11 michael_rytting
2012-04-18 3:05 ` Kevin Rodgers
2012-04-18 21:46 ` Stefan Monnier
0 siblings, 2 replies; 4+ messages in thread
From: michael_rytting @ 2012-04-17 17:11 UTC (permalink / raw)
To: 11266
[-- Attachment #1: Type: text/plain, Size: 612 bytes --]
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@agilent.com<mailto:michael_rytting@agilent.com>
719-590-3708
[-- Attachment #2: Type: text/html, Size: 2709 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#11266: emacs 23.4 with --batch and (next-line)
2012-04-17 17:11 bug#11266: emacs 23.4 with --batch and (next-line) michael_rytting
@ 2012-04-18 3:05 ` Kevin Rodgers
2012-04-18 21:46 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2012-04-18 3:05 UTC (permalink / raw)
To: 11266
On 4/17/12 11:11 AM, michael_rytting@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#11266: emacs 23.4 with --batch and (next-line)
2012-04-17 17:11 bug#11266: emacs 23.4 with --batch and (next-line) michael_rytting
2012-04-18 3:05 ` Kevin Rodgers
@ 2012-04-18 21:46 ` Stefan Monnier
2012-04-18 21:47 ` michael_rytting
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2012-04-18 21:46 UTC (permalink / raw)
To: michael_rytting; +Cc: 11266
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#11266: emacs 23.4 with --batch and (next-line)
2012-04-18 21:46 ` Stefan Monnier
@ 2012-04-18 21:47 ` michael_rytting
0 siblings, 0 replies; 4+ messages in thread
From: michael_rytting @ 2012-04-18 21:47 UTC (permalink / raw)
To: monnier; +Cc: 11266
Good to know, I've already corrected my scripts to use forward-line instead.
-----Original Message-----
From: Stefan Monnier [mailto:monnier@IRO.UMontreal.CA]
Sent: Wednesday, April 18, 2012 3:46 PM
To: RYTTING,MICHAEL (A-ColSprings,ex1)
Cc: 11266@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-18 21:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 17:11 bug#11266: emacs 23.4 with --batch and (next-line) michael_rytting
2012-04-18 3:05 ` Kevin Rodgers
2012-04-18 21:46 ` Stefan Monnier
2012-04-18 21:47 ` michael_rytting
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.