octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #37573] edit.m cannot open multiple file names


From: Jordi Gutiérrez Hermoso
Subject: [Octave-bug-tracker] [bug #37573] edit.m cannot open multiple file names
Date: Mon, 15 Oct 2012 14:41:50 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110109 Seadinosaur/3.6.13

Follow-up Comment #3, bug #37573 (project octave):

> Most of the changes shown in the changeset are due to me putting a lot
> of the original code inside an if statement, and therefore adding
> spaces at the start of the lines.

Ah, I see. I just looked at your change ignoring whitespace, and it
was much more readable.

> In the original code you could supply either one argument (a file
> name) or two arguments (an editor state to be changed and the new
> value of that state). In the second case then the first argument
> (named file) was already no longer actually a file name anyway.

Yes, what I mean is that you should remove the "state" from the
function definition entirely and instead have


function ret = edit (file, varargin)


and deal with the ensuing logic in the function body.

> I could add more comments to explain this if you like.

Yes, please.

> I am very unfamiliar with hg, is the exact sequence of things I need
> to do the following?

> hg up -r 30c8b5d22e
> make my edits to edit.m
> hg commit edit.m --amend -m"new commit msg"

Yes, minus the -m. Then hg will open a new editor window where you can
edit the commit message that's already there.

One further hg tip, if you're using an OS with a functional terminal
(i.e. not Windows), try adding (possibly a variation of) the following
lines to your .hgrc:


[extensions]
color =
pager =

[pager]
pager = LESS='FSRX' less
attend = tags, help, annotate, cat, diff, export, glog, log, qdiff, status,
outgoing, incoming

[color]
status.modified = magenta bold
status.added = green bold
status.removed = red bold
status.deleted = cyan bold
status.unknown = black  bold
status.ignored = black bold


When you look at diffs with hg this way, they will be coloured, and
you will see that your proposed change has trailing whitespace. Remove
it, please. ;-)

> I had read the guidelines, but misunderstood them, edit.m does
> contain multiple functions (it has subfunctions), so I though I
> would need to be specific from what I read.

The commit message guidelines there aren't quite set in stone, but I
would have written the commit message like


open multiple files with edit (bug #37573)

* edit.m (edit): Check args, [etc...]



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37573>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]