Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re: CPAN::shell to work in XEmacs M-x shell #771

Closed
p5pRT opened this issue Oct 22, 1999 · 3 comments
Closed

Re: CPAN::shell to work in XEmacs M-x shell #771

p5pRT opened this issue Oct 22, 1999 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 22, 1999

Migrated from rt.perl.org#1695 (status was 'resolved')

Searchable as RT1695$

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 1999

From aichner@ecf.teradyne.com

  APA> The problem​:

  APA> CPAN.pm 1.50 does not work in a shell started from XEmacs (M-x shell)
  APA> on Windows NT
  APA> explicit-shell-file-name is "c​:\\winnt\\system32\\cmd.exe"
  APA> shell-command-switch is "/c"

  APA> Following patch fixes this. It executes the body of the
  APA> unless ($Suppress_readline) {
  APA> ...
  APA> }
  APA> block unconditionally, otherwise $term is not defined in a XEmacs
  APA> *shell* buffer.

  APA> I can now run
  APA> perl -d -MCPAN -e shell
  APA> from within a XEmacs *shell* buffer, recording the whole session for
  APA> documentation purposes.

Oops! This solution only works when perl is run under the debugger
(-d), which is a good workaround for me for now, but obviously not a
real solution.

Can someone on perlbug think about a correct fix?
It would be great to have!

Adrian

  APA> Best regards,

  APA> Adrian

  APA> diff -u c​:\perl\5.00503\lib\CPAN-untar.pm c​:\perl\5.00503\lib\CPAN.pm
  APA> --- c​:\perl\5.00503\lib\CPAN-untar.pm Fri Oct 22 23​:45​:18 1999
  APA> +++ c​:\perl\5.00503\lib\CPAN.pm Fri Oct 22 23​:45​:18 1999
  APA> @​@​ -95,24 +95,22 @​@​

  APA> my $prompt = "cpan> ";
  APA> local($^W) = 1;
  APA> - unless ($Suppress_readline) {
  APA> - require Term​::ReadLine;
  APA> + require Term​::ReadLine;
  APA> # import Term​::ReadLine;
  APA> - $term = Term​::ReadLine->new('CPAN Monitor');
  APA> - if ($term->ReadLine eq "Term​::ReadLine​::Gnu") {
  APA> - my $attribs = $term->Attribs;
  APA> + $term = Term​::ReadLine->new('CPAN Monitor');
  APA> + if ($term->ReadLine eq "Term​::ReadLine​::Gnu") {
  APA> + my $attribs = $term->Attribs;
  APA> # $attribs->{completion_entry_function} =
  APA> # $attribs->{'list_completion_function'};
  APA> - $attribs->{attempted_completion_function} = sub {
  APA> - &CPAN​::Complete​::gnu_cpl;
  APA> - }
  APA> + $attribs->{attempted_completion_function} = sub {
  APA> + &CPAN​::Complete​::gnu_cpl;
  APA> + }
  APA> # $attribs->{completion_word} =
  APA> # [qw(help me somebody to find out how
  APA> # to use completion with GNU)];
  APA> - } else {
  APA> - $readline​::rl_completion_function =
  APA> - $readline​::rl_completion_function = 'CPAN​::Complete​::cpl';
  APA> - }
  APA> + } else {
  APA> + $readline​::rl_completion_function =
  APA> + $readline​::rl_completion_function = 'CPAN​::Complete​::cpl';
  APA> }

  APA> no strict;

  APA> ----------------------------------------------------------------------------

  APA> Site configuration information for perl 5.00503​:

  APA> Summary of my perl5 (5.0 patchlevel 5 subversion 03) configuration​:
  APA> Platform​:
  APA> osname=MSWin32, osvers=4.0, archname=MSWin32-x86
  APA> uname=''
  APA> hint=recommended, useposix=true, d_sigaction=undef
  APA> usethreads=undef useperlio=undef d_sfio=undef
  APA> Compiler​:
  APA> cc='cl.exe', optimize='-Od -MD -DNDEBUG', gccversion=
  APA> cppflags='-DWIN32'
  APA> ccflags ='-Od -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT '
  APA> stdchar='char', d_stdstdio=define, usevfork=false
  APA> intsize=4, longsize=4, ptrsize=4, doublesize=8
  APA> d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
  APA> alignbytes=8, usemymalloc=y, prototype=define
  APA> Linker and Libraries​:
  APA> ld='link', ldflags ='-nologo -nodefaultlib -release -machine​:x86'
  APA> libpth=\lib
  APA> libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
  APA> libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl.lib
  APA> Dynamic Linking​:
  APA> dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
  APA> cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -machine​:x86'

  APA> Locally applied patches​:
 

  APA> ---
  APA> @​INC for perl 5.00503​:
  APA> d​:\Users\AichnerAd\pl
  APA> c​:\perl\5.00503\lib/MSWin32-x86
  APA> c​:\perl\5.00503\lib
  APA> c​:\perl\site\5.00503\lib/MSWin32-x86
  APA> c​:\perl\site\5.00503\lib
  APA> .

  APA> ---
  APA> Environment for perl 5.00503​:
  APA> HOME=d​:\Users\AichnerAd
  APA> LANG (unset)
  APA> LANGUAGE (unset)
  APA> LD_LIBRARY_PATH (unset)
  APA> LOGDIR (unset)
  APA> PATH=c​:\perl\5.00503\bin;c​:\perl\5.00503\bin\MSWin32-x86;c​:\cygnus\cygwin-b20\H-i586-cygwin32\bin;c​:\mks\mkssi;c​:\mks\mksnt;c​:\gcisdn;C​:\WINNT\system32;C​:\WINNT;C​:\NTRESKIT;c​:\mks\mkssi;c​:\cvs;c​:\enscript;c​:\gnuserv-2_1p1\gnuserv;C​:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C​:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C​:\Program Files\Microsoft Visual Studio\Common\Tools;C​:\Program Files\Microsoft Visual Studio\VC98\bin
  APA> PERL5LIB=d​:\Users\AichnerAd\pl
  APA> PERL_BADLANG (unset)
  APA> SHELL=cmd

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 1999

From [Unknown Contact. See original ticket]

Adrian Aichner writes​:

Oops! This solution only works when perl is run under the debugger
(-d), which is a good workaround for me for now, but obviously not a
real solution.

Can someone on perlbug think about a correct fix?

"Correct fix" for what? With my patch to CPAN.pm it can be run with

  ... |& tee 00cpan

Ilya

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 1999

From @andk

On Fri, 22 Oct 1999 22​:07​:03 -0400 (EDT), Ilya Zakharevich <ilya@​math.ohio-state.edu> said​:

Adrian Aichner writes​:

Oops! This solution only works when perl is run under the debugger
(-d), which is a good workaround for me for now, but obviously not a
real solution.

Can someone on perlbug think about a correct fix?

"Correct fix" for what? With my patch to CPAN.pm it can be run with

... |& tee 00cpan

FWIW, I just uploaded the version with Ilya's patch as 1.50_01.

Sorry for the long delay. I have more patches in my mailbox, hope to
apply them soonish.

--
andreas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant