public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
@ 2010-07-09  2:36 Peter Farley
  2010-07-09  2:39 ` Larry Hall (Cygwin X)
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Farley @ 2010-07-09  2:36 UTC (permalink / raw)
  To: cygwin-xfree

I don't know if this is the right place to ask this question, but if it is not please advise me where to send it.

Midnight Commander exits with F10, and in a native bash window or rxvt F10 exits to the last directory viewed.  In an xterm though, it exits to the original directory from which MC was started.

Do you think this a bug in MC or is it WAD?  If you think it's a bug in MC I will gladly debug it myself, I just want to know if it's WAD for xterm's first.

I am using a fresh cygwin + cygwin/X install on WinXP SP3, and I will supply the usual problem report documentation if needed to answer my question.

Regards,

Peter



      

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


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

* Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
  2010-07-09  2:36 Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt Peter Farley
@ 2010-07-09  2:39 ` Larry Hall (Cygwin X)
  2010-07-09  6:58   ` Marco Atzeri
  2010-07-11  4:57   ` Peter Farley
  0 siblings, 2 replies; 7+ messages in thread
From: Larry Hall (Cygwin X) @ 2010-07-09  2:39 UTC (permalink / raw)
  To: cygwin-xfree

On 7/8/2010 10:35 PM, Peter Farley wrote:
> I don't know if this is the right place to ask this question, but if it is
> not please advise me where to send it.
>
> Midnight Commander exits with F10, and in a native bash window or rxvt F10
> exits to the last directory viewed.  In an xterm though, it exits to the
> original directory from which MC was started.
>
> Do you think this a bug in MC or is it WAD?  If you think it's a bug in MC I
> will gladly debug it myself, I just want to know if it's WAD for xterm's
> first.
>
> I am using a fresh cygwin + cygwin/X install on WinXP SP3, and I will supply
> the usual problem report documentation if needed to answer my question.

Sorry, I don't know anything about MC really but isn't there some doc on
it that describes what F10 is supposed to do?

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


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

* Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
  2010-07-09  2:39 ` Larry Hall (Cygwin X)
@ 2010-07-09  6:58   ` Marco Atzeri
  2010-07-11  4:41     ` Peter Farley
  2010-07-13 19:21     ` Jon TURNEY
  2010-07-11  4:57   ` Peter Farley
  1 sibling, 2 replies; 7+ messages in thread
From: Marco Atzeri @ 2010-07-09  6:58 UTC (permalink / raw)
  To: cygwin-xfree

--- Ven 9/7/10, Larry Hall  ha scritto:

> On 7/8/2010 10:35 PM, Peter Farley
> wrote:
> > I don't know if this is the right place to ask this
> question, but if it is
> > not please advise me where to send it.
> >
> > Midnight Commander exits with F10, and in a native
> bash window or rxvt F10
> > exits to the last directory viewed.  In an xterm
> though, it exits to the
> > original directory from which MC was started.
> >
> > Do you think this a bug in MC or is it WAD?  If
> you think it's a bug in MC I
> > will gladly debug it myself, I just want to know if
> it's WAD for xterm's
> > first.
> >
> > I am using a fresh cygwin + cygwin/X install on WinXP
> SP3, and I will supply
> > the usual problem report documentation if needed to
> answer my question.
> 
> Sorry, I don't know anything about MC really but isn't
> there some doc on
> it that describes what F10 is supposed to do?
> 
> -- 
> Larry Hall


on my Win-XP SP2 under cygwin/X 
MC with F10 exits in the current directory

Peter,
as mc is an alias
alias mc='. /usr/share/mc/bin/mc-wrapper.sh'

I guess that under X this wrapper is working 
differently than under console

---------------mc-wrapper.sh------------------
MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
/usr/bin/mc -P "$MC_PWD_FILE" "$@"

if test -r "$MC_PWD_FILE"; then
        MC_PWD="`cat $MC_PWD_FILE`"
        if test -n "$MC_PWD" && test -d "$MC_PWD"; then
                cd "$MC_PWD"
        fi
        unset MC_PWD
fi

rm -f "$MC_PWD_FILE"
unset MC_PWD_FILE
------------------------------------------------

Regards
Marco






--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


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

* Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
  2010-07-09  6:58   ` Marco Atzeri
@ 2010-07-11  4:41     ` Peter Farley
  2010-07-13 19:21     ` Jon TURNEY
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Farley @ 2010-07-11  4:41 UTC (permalink / raw)
  To: cygwin-xfree

--- On Fri, 7/9/10, Marco Atzeri <marco_atzeri@yahoo.it> wrote:

> From: Marco Atzeri <marco_atzeri@yahoo.it>
> Subject: Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
<Snipped> 
> on my Win-XP SP2 under cygwin/X 
> MC with F10 exits in the current directory
> 
> Peter,
> as mc is an alias
> alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
> 
> I guess that under X this wrapper is working 
> differently than under console

Marco,

Thanks, but in my xterm "which mc" returns "/usr/bin/mc", which is an "exe" and not an alias to the wrapper shell script.

Executing "/usr/bin/mc" from an xterm prompt produces the same result, it exits to the MC invocation directory instead of the current one.

Thanks for pointing out that wrapper script though.  Most interesting.

Peter



      

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


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

* Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
  2010-07-09  2:39 ` Larry Hall (Cygwin X)
  2010-07-09  6:58   ` Marco Atzeri
@ 2010-07-11  4:57   ` Peter Farley
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Farley @ 2010-07-11  4:57 UTC (permalink / raw)
  To: cygwin-xfree

--- On Thu, 7/8/10, Larry Hall (Cygwin X) <reply-to-list-only-lh-x@cygwin.com> wrote:

> From: Larry Hall (Cygwin X) <reply-to-list-only-lh-x@cygwin.com>
> Subject: Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
<Snipped>
> Sorry, I don't know anything about MC really but isn't
> there some doc on it that describes what F10 is supposed to do?

Yes, there is, from the "info mc" pages:

"       Quit (F10, Shift-F10)

       Terminate the Midnight Commander.  Shift-F10 is used when you want to quit and you are using the shell wrapper.  Shift-F10 will not take you to the last directory you visited with the Midnight Commander,  instead it will stay at the directory where you started the Midnight Commander."

I am not using the "wrapper" shell script, as far as I can tell (but I'm still looking hard to see if I am wrong about that).  Simple F10 in an xterm though *always* exits to the original directory.  "Shift-F10" has no effect at all inside of MC from an xterm in the testing I have done (nor do Ctrl-F10 or Alt-F10).  I guess it's *possible* that there is a bug that makes MC *think* it sees "shift-F10" when only simple "F10" was pressed, but that remains to be proven.

I will have to run a debugging version of MC with gdb to see the difference between xterm and non-xterm behavior.  I will report back when I have done that experiment.

It might be a while, but I will report back.

Thanks for your help and advice.

Peter



      

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


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

* Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
  2010-07-09  6:58   ` Marco Atzeri
  2010-07-11  4:41     ` Peter Farley
@ 2010-07-13 19:21     ` Jon TURNEY
  2010-07-16  2:46       ` Peter Farley
  1 sibling, 1 reply; 7+ messages in thread
From: Jon TURNEY @ 2010-07-13 19:21 UTC (permalink / raw)
  To: cygwin-xfree

On 09/07/2010 07:58, Marco Atzeri wrote:
> --- Ven 9/7/10, Larry Hall  ha scritto:
>
>> On 7/8/2010 10:35 PM, Peter Farley
>> wrote:
>>> I don't know if this is the right place to ask this
>> question, but if it is
>>> not please advise me where to send it.
>>>
>>> Midnight Commander exits with F10, and in a native
>> bash window or rxvt F10
>>> exits to the last directory viewed.  In an xterm
>> though, it exits to the
>>> original directory from which MC was started.
>>>
>
> on my Win-XP SP2 under cygwin/X
> MC with F10 exits in the current directory
>
> Peter,
> as mc is an alias
> alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
>
> I guess that under X this wrapper is working
> differently than under console

Perhaps more likely, the alias isn't setup by the shell init scripts under 
xterm because of the way the xterm was started (which the OP hasn't said) (but 
is being setup for cmd.exe or rxvt)

Note that it's impossible for mc to change the current directory of the parent 
shell without this alias.

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


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

* Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
  2010-07-13 19:21     ` Jon TURNEY
@ 2010-07-16  2:46       ` Peter Farley
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Farley @ 2010-07-16  2:46 UTC (permalink / raw)
  To: cygwin-xfree

--- On Tue, 7/13/10, Jon TURNEY wrote:
> From: Jon TURNEY
> Subject: Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt
> To: cygwin-xfree@cygwin.com
> Date: Tuesday, July 13, 2010, 3:21 PM
> On 09/07/2010 07:58, Marco Atzeri wrote:
<Snipped>
> > on my Win-XP SP2 under cygwin/X
> > MC with F10 exits in the current directory
> >
> > Peter,
> > as mc is an alias
> > alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
> >
> > I guess that under X this wrapper is working
> > differently than under console
> 
> Perhaps more likely, the alias isn't setup by the shell
> init scripts under xterm because of the way the xterm
> was started (which the OP hasn't said) (but is being
> setup for cmd.exe or rxvt)
> 
> Note that it's impossible for mc to change the current
> directory of the parent shell without this alias.

For the record, the xterm I used for this test was the one started from the cygwin-X start menu item.

I still have not found the round tuits to compile a debugging version of MC to check this out in more detail, but I hope to do so sometime in the next 30 days (lots of RL intruding).

I will reply again when I have more information.

Thank you all for your advice and help.

Peter



      

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


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

end of thread, other threads:[~2010-07-16  2:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-09  2:36 Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt Peter Farley
2010-07-09  2:39 ` Larry Hall (Cygwin X)
2010-07-09  6:58   ` Marco Atzeri
2010-07-11  4:41     ` Peter Farley
2010-07-13 19:21     ` Jon TURNEY
2010-07-16  2:46       ` Peter Farley
2010-07-11  4:57   ` Peter Farley

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).