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

CPAN::shell to work in XEmacs M-x shell #770

Closed
p5pRT opened this issue Oct 22, 1999 · 1 comment
Closed

CPAN::shell to work in XEmacs M-x shell #770

p5pRT opened this issue Oct 22, 1999 · 1 comment

Comments

@p5pRT
Copy link

p5pRT commented Oct 22, 1999

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

Searchable as RT1694$

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 1999

From aichner@ecf.teradyne.com

sorry for the last mail. "1" was even a little short for an executive
summary :-)

Here's another patch, on top of my earlier patch entitled​:

From​: Adrian Aichner <aichner@​ecf.teradyne.com>
Subject​: CPAN.pm to work with tar (GNU tar) 1.12 in NT4sp4
To​: perlbug@​perl.com
Date​: 19 Oct 1999 05​:20​:53 +0200

Hint, hint ;->

The problem​:

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

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

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

Best regards,

Adrian

Inline Patch
diff -u c:\perl\5.00503\lib\CPAN-untar.pm c:\perl\5.00503\lib\CPAN.pm
--- c:\perl\5.00503\lib\CPAN-untar.pm	Fri Oct 22 23:45:18 1999
+++ c:\perl\5.00503\lib\CPAN.pm	Fri Oct 22 23:45:18 1999
@@ -95,24 +95,22 @@
 
     my $prompt = "cpan> ";
     local($^W) = 1;
-    unless ($Suppress_readline) {
-	require Term::ReadLine;
+    require Term::ReadLine;
 #	import Term::ReadLine;
-	$term = Term::ReadLine->new('CPAN Monitor');
-	if ($term->ReadLine eq "Term::ReadLine::Gnu") {
-	    my $attribs = $term->Attribs;
+    $term = Term::ReadLine->new('CPAN Monitor');
+    if ($term->ReadLine eq "Term::ReadLine::Gnu") {
+	my $attribs = $term->Attribs;
 #	     $attribs->{completion_entry_function} =
 #		 $attribs->{'list_completion_function'};
-	     $attribs->{attempted_completion_function} = sub {
-		 &CPAN::Complete::gnu_cpl;
-	     }
+	$attribs->{attempted_completion_function} = sub {
+	    &CPAN::Complete::gnu_cpl;
+	}
 #	    $attribs->{completion_word} =
 #		[qw(help me somebody to find out how
 #                    to use completion with GNU)];
-	} else {
-	    $readline::rl_completion_function =
-		$readline::rl_completion_function = 'CPAN::Complete::cpl';
-	}
+    } else {
+	$readline::rl_completion_function =
+	  $readline::rl_completion_function = 'CPAN::Complete::cpl';
     }
 
     no strict;

----------------------------------------------------------------------------

Site configuration information for perl 5.00503:

Summary of my perl5 (5.0 patchlevel 5 subversion 03) configuration​:
  Platform​:
  osname=MSWin32, osvers=4.0, archname=MSWin32-x86
  uname=''
  hint=recommended, useposix=true, d_sigaction=undef
  usethreads=undef useperlio=undef d_sfio=undef
  Compiler​:
  cc='cl.exe', optimize='-Od -MD -DNDEBUG', gccversion=
  cppflags='-DWIN32'
  ccflags ='-Od -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT '
  stdchar='char', d_stdstdio=define, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
  alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='link', ldflags ='-nologo -nodefaultlib -release -machine​:x86'
  libpth=\lib
  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
  libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl.lib
  Dynamic Linking​:
  dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -machine​:x86'

Locally applied patches​:
 


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


Environment for perl 5.00503​:
  HOME=d​:\Users\AichnerAd
  LANG (unset)
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  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
  PERL5LIB=d​:\Users\AichnerAd\pl
  PERL_BADLANG (unset)
  SHELL=cmd

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