unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Misleading --help text
@ 2007-06-27  9:58 Reuben Thomas
  2007-06-28  5:25 ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Reuben Thomas @ 2007-06-27  9:58 UTC (permalink / raw)
  To: bug-emacs

I'm not sure whether this applies to current CVS (sorry, I only use emacs 
from my GNU/Linux distribution), but emacs 21.4 --help says:

Action options:

FILE			visit FILE using find-file
+LINE FILE		visit FILE using find-file, then go to line LINE
+LINE:COLUMN FILE	visit FILE using find-file, then go to line LINE,
 			    column COLUMN

Reading this, I would expect that

emacs +5 +5 foo

would visit a file called "+5", then go to line 5, and also visit a file 
called "foo" but it doesn't, it visits "foo", then goes to line 5. That's 
fine by me, but it does mean the documentation is misleading.

I suggest the following stanza instead:

Action options:

FILE			visit FILE using find-file
+LINE			go to line LINE in the next file visited
+LINE:COLUMN 		go to line LINE, column COLUMN in the next file
 			    visited

Then it's fairly obvious that if you give two successive +LINE[:COLUMN] 
options, the second will override the first.

-- 
http://rrt.sc3d.org/ | The yak is slow but the earth is patient (LucasArts)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Misleading --help text
  2007-06-27  9:58 Misleading --help text Reuben Thomas
@ 2007-06-28  5:25 ` Kevin Rodgers
  2007-06-28  9:04   ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2007-06-28  5:25 UTC (permalink / raw)
  To: bug-gnu-emacs

Reuben Thomas wrote:
> I'm not sure whether this applies to current CVS (sorry, I only use 
> emacs from my GNU/Linux distribution), but emacs 21.4 --help says:
> 
> Action options:
> 
> FILE            visit FILE using find-file
> +LINE FILE        visit FILE using find-file, then go to line LINE
> +LINE:COLUMN FILE    visit FILE using find-file, then go to line LINE,
>                 column COLUMN
> 
> Reading this, I would expect that
> 
> emacs +5 +5 foo
> 
> would visit a file called "+5", then go to line 5, and also visit a file 
> called "foo" but it doesn't, it visits "foo", then goes to line 5. 
> That's fine by me, but it does mean the documentation is misleading.
> 
> I suggest the following stanza instead:
> 
> Action options:
> 
> FILE            visit FILE using find-file
> +LINE            go to line LINE in the next file visited
> +LINE:COLUMN         go to line LINE, column COLUMN in the next file
>                 visited
> 
> Then it's fairly obvious that if you give two successive +LINE[:COLUMN] 
> options, the second will override the first.

Actually, I think it's misleading to mention visited files: the +LINE
and +LINE:COLUMN options act within the current buffer whether it is
visiting a file or not.

-- 
Kevin Rodgers
Denver, Colorado, USA

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Misleading --help text
  2007-06-28  5:25 ` Kevin Rodgers
@ 2007-06-28  9:04   ` Andreas Schwab
  2007-06-29  2:17     ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2007-06-28  9:04 UTC (permalink / raw)
  To: Kevin Rodgers; +Cc: bug-gnu-emacs

Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:

> Actually, I think it's misleading to mention visited files: the +LINE
> and +LINE:COLUMN options act within the current buffer whether it is
> visiting a file or not.

No, they don't.  They only have an effect on the next visited file from
the command line.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Misleading --help text
  2007-06-28  9:04   ` Andreas Schwab
@ 2007-06-29  2:17     ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2007-06-29  2:17 UTC (permalink / raw)
  To: bug-gnu-emacs

Andreas Schwab wrote:
> Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:
> 
>> Actually, I think it's misleading to mention visited files: the +LINE
>> and +LINE:COLUMN options act within the current buffer whether it is
>> visiting a file or not.
> 
> No, they don't.  They only have an effect on the next visited file from
> the command line.

Yes, sorry for the noise.  I swear when I tried this yesterday, it left
me on the 2nd line of he *Messages* buffer, but now I can't reproduce
that behavior: emacs -Q --eval '(switch-to-buffer "*Messages*")' +2

-- 
Kevin Rodgers
Denver, Colorado, USA

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-29  2:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-27  9:58 Misleading --help text Reuben Thomas
2007-06-28  5:25 ` Kevin Rodgers
2007-06-28  9:04   ` Andreas Schwab
2007-06-29  2:17     ` Kevin Rodgers

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).