Readline <= 6.2 shouldn't require the SIGWINCH patch, so if older versions have trouble finding rl_resize_terminal then you could wrap a macro around that part. The isearch C-c bug has existed forever, according to Chet Ramey. Yes, I had to retrain myself to use C-g to exit isearch but it's confusing. It would be nice to fix this C-c bug on older versions too, but my solution used some global variables and I'm not sure which Readline version they date from. Out of curiosity, did you delete the HAVE_READLINE_READLINE_H block? Thanks so much for working this out! Frederick P.S. I do use Emacs too, but I have some bindings which stuff the current region into a numbered 'GNU screen' window (where R is running) - I was never a fan of inferior Emacs processes. Also a keybinding which stuffs "source('CURRENT_FILE')\n". And a rxvt-unicode 'url-select' extension which copies text after a "> " prompt, to get commands I edited back into Emacs. That's why I still use the basic interface. On Wed, May 18, 2016 at 10:58:59PM +0200, peter dalgaard wrote:> Spoke too soon, both systems now build, but neither has the original bugs fixed.... > > (Incidentally, I realized why the ctl-R...ctl-C bug never bit me: The emacs habit is to exit isearch with ctl-G and that works flawlessly.) > > -pd > > > On 18 May 2016, at 22:40 , peter dalgaard <pdalgd at gmail.com> wrote: > > > > Ah, got it. For some ancient reason config.site on that machine had > > > > LDFLAGS=-L/usr/X11R6/lib > > > > in config.site, and that prevented configure from inserting -L /usr/local/lib, so linked /usr/lib/libreadline.dylib, which is the Apple-supplied one, which possibly is really libedit... > > > > -p > > > > > >> On 18 May 2016, at 22:01 , peter dalgaard <pdalgd at gmail.com> wrote: > >> > >> gcc -L/usr/X11R6/lib -o R.bin Rmain.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o radixsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o `ls ../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/tre/libtre.a ../extra/intl/libintl.a ../extra/tzone/libtz.a -L../../lib/x86_64 -lRblas -L/usr/lib/gcc/i686-apple-darwin11/4.2.1/x86_64 -L/usr/lib/gcc/i686-apple-darwin11/4.2.1 -L/usr/lib -lgfortran -Wl,-framework -Wl,CoreFoundation -lreadline -lpcre -llzma -lbz2 -lz -licucore -lm -llzma -liconv > >> Undefined symbols for architecture x86_64: > >> "_rl_resize_terminal", referenced from: > >> _Rstd_ReadConsole in sys-std.o > >> ld: symbol(s) not found for architecture x86_64 > >> clang: error: linker command failed with exit code 1 (use -v to see invocation) > >> make[3]: *** [R.bin] Error 1 > >> make[2]: *** [R] Error 2 > >> make[1]: *** [R] Error 1 > >> make: *** [R] Error 1 > >> > >> and the MBAir still builds... > >> > >> Confused!, > >> > >> -pd > > > > -- > > Peter Dalgaard, Professor, > > Center for Statistics, Copenhagen Business School > > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > > Phone: (+45)38153501 > > Office: A 4.23 > > Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com > > > > > > > > > > > > > > > > > > > > -- > Peter Dalgaard, Professor, > Center for Statistics, Copenhagen Business School > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > Phone: (+45)38153501 > Office: A 4.23 > Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com > > > > > > > > >
>>>>> <frederik at ofb.net> >>>>> on Wed, 18 May 2016 15:03:31 -0700 writes:> Readline <= 6.2 shouldn't require the SIGWINCH patch, so > if older versions have trouble finding rl_resize_terminal > then you could wrap a macro around that part. I find python related patches that use #ifdef HAVE_RL_RESIZE_TERMINAL so they must have configured for that. We could and probably should do the same, but as a Linux_only guy currently (even basically only one flavor of Linux), I'd appreciate others to produce code for that. > The isearch C-c bug has existed forever, according to Chet Ramey. I see. As your patch seems to only work for readline (>=) 6.3, we have solved part of the problems. If those who use olders readlines are willing to test and provide (well looking, as yours) patches for earlier versions, they should be welcome too. > Yes, I had to retrain myself to use C-g to exit > isearch but it's confusing. It would be nice to fix this > C-c bug on older versions too, but my solution used some > global variables and I'm not sure which Readline version > they date from. > Out of curiosity, did you delete the > HAVE_READLINE_READLINE_H block? Not yet...I've even kept your suggestion about it in the source comments. Note you can always point your web browser at https://svn.r-project.org/trunk/R/ which contains upto the minute current R development sources (it *is* our apache based subversion server), i.e., the file in this case is https://svn.r-project.org/trunk/R/src/unix/sys-std.c {or you can use the github *mirror* of the svn server which provides version/revision/log etc ((this be available for svn as well, but we (I) had chosen not to provide (via apache modules) just to keep our server as bare bones as possible and hence less vulnerable to viciousities)) } > Thanks so much for working this out! > Frederick > P.S. I do use Emacs too, but I have some bindings which > stuff the current region into a numbered 'GNU screen' > window (where R is running) - I was never a fan of > inferior Emacs processes. Also a keybinding which stuffs > "source('CURRENT_FILE')\n". And a rxvt-unicode > 'url-select' extension which copies text after a "> " > prompt, to get commands I edited back into Emacs. That's > why I still use the basic interface. > On Wed, May 18, 2016 at 10:58:59PM +0200, peter dalgaard > wrote: >> Spoke too soon, both systems now build, but neither has >> the original bugs fixed.... >> >> (Incidentally, I realized why the ctl-R...ctl-C bug never >> bit me: The emacs habit is to exit isearch with ctl-G and >> that works flawlessly.) >> >> -pd >> >> > On 18 May 2016, at 22:40 , peter dalgaard >> <pdalgd at gmail.com> wrote: >> > >> > Ah, got it. For some ancient reason config.site on that >> machine had >> > >> > LDFLAGS=-L/usr/X11R6/lib >> > >> > in config.site, and that prevented configure from >> inserting -L /usr/local/lib, so linked >> /usr/lib/libreadline.dylib, which is the Apple-supplied >> one, which possibly is really libedit... >> > >> > -p >> > >> > >> >> On 18 May 2016, at 22:01 , peter dalgaard >> <pdalgd at gmail.com> wrote: >> >> >> >> gcc -L/usr/X11R6/lib -o R.bin Rmain.o >> CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o >> apply.o arithmetic.o array.o attrib.o bind.o builtin.o >> character.o coerce.o colors.o complex.o connections.o >> context.o cum.o dcf.o datetime.o debug.o deparse.o >> devices.o dotcode.o dounzip.o dstruct.o duplicate.o >> edit.o engine.o envir.o errors.o eval.o format.o >> gevents.o gram.o gram-ex.o graphics.o grep.o identical.o >> inlined.o inspect.o internet.o iosupport.o lapack.o >> list.o localecharset.o logic.o main.o mapply.o match.o >> memory.o names.o objects.o options.o paste.o platform.o >> plot.o plot3d.o plotmath.o print.o printarray.o >> printvector.o printutils.o qsort.o radixsort.o random.o >> raw.o registration.o relop.o rlocale.o saveload.o scan.o >> seq.o serialize.o sort.o source.o split.o sprintf.o >> startup.o subassign.o subscript.o subset.o summary.o >> sysutils.o times.o unique.o util.o version.o g_alab_her.o >> g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o `ls >> ../unix/*.o ../appl/*.o ../nmath/*.o` >> ../extra/tre/libtre.a ../extra/intl/libintl.a >> ../extra/tzone/libtz.a -L../../lib/x86_64 -lRblas >> -L/usr/lib/gcc/i686-apple-darwin11/4.2.1/x86_64 >> -L/usr/lib/gcc/i686-apple-darwin11/4.2.1 -L/usr/lib >> -lgfortran -Wl,-framework -Wl,CoreFoundation -lreadline >> -lpcre -llzma -lbz2 -lz -licucore -lm -llzma -liconv >> >> Undefined symbols for architecture x86_64: >> >> "_rl_resize_terminal", referenced from: >> >> _Rstd_ReadConsole in sys-std.o >> ld: symbol(s) not found >> for architecture x86_64 >> clang: error: linker command >> failed with exit code 1 (use -v to see invocation) >> >> make[3]: *** [R.bin] Error 1 >> make[2]: *** [R] Error 2 >> >> make[1]: *** [R] Error 1 >> make: *** [R] Error 1 >> >> >> >> and the MBAir still builds... >> >> >> >> Confused!, >> >> >> >> -pd >> > >> > -- >> > Peter Dalgaard, Professor, > Center for Statistics, >> Copenhagen Business School > Solbjerg Plads 3, 2000 >> Frederiksberg, Denmark > Phone: (+45)38153501 > Office: A >> 4.23 > Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com >> > >> > >> > >> > >> > >> > >> > >> > >> > >> >> -- >> Peter Dalgaard, Professor, Center for Statistics, >> Copenhagen Business School Solbjerg Plads 3, 2000 >> Frederiksberg, Denmark Phone: (+45)38153501 Office: A >> 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com >> >> >> >> >> >> >> >> >>
>>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Thu, 19 May 2016 10:26:44 +0200 writes:>>>>> <frederik at ofb.net> >>>>> on Wed, 18 May 2016 15:03:31 -0700 writes:>> Readline <= 6.2 shouldn't require the SIGWINCH patch, so >> if older versions have trouble finding rl_resize_terminal >> then you could wrap a macro around that part. > I find python related patches that use > #ifdef HAVE_RL_RESIZE_TERMINAL > so they must have configured for that. We could and > probably should do the same, but as a Linux_only guy > currently (even basically only one flavor of Linux), I'd > appreciate others to produce code for that. Actually that was easy (in hindsight.. I took too long!) enough, so I've now committed ------------------------------------------------------------------------ r70632 | maechler | 2016-05-19 10:59:51 +0200 (Thu, 19 May 2016) | 1 line Changed paths: M configure M configure.ac M src/include/config.h.in M src/unix/sys-std.c check for rl_resize_terminal() now ------------------------------------------------------------------------ ... and Keith should even not see the warning anymore (nor Peter the error, when compiling using readline 5.x instead of 6.[23]). >> The isearch C-c bug has existed forever, according to >> Chet Ramey. > I see. As your patch seems to only work for readline (>=) > 6.3, we have solved part of the problems. If those who > use olders readlines are willing to test and provide (well > looking, as yours) patches for earlier versions, they > should be welcome too. >> Yes, I had to retrain myself to use C-g to exit isearch >> but it's confusing. It would be nice to fix this C-c bug >> on older versions too, but my solution used some global >> variables and I'm not sure which Readline version they >> date from. >> Out of curiosity, did you delete the >> HAVE_READLINE_READLINE_H block? > Not yet...I've even kept your suggestion about it in the > source comments. Note you can always point your web > browser at https://svn.r-project.org/trunk/R/ which > contains upto the minute current R development sources (it > *is* our apache based subversion server), i.e., the file > in this case is > https://svn.r-project.org/trunk/R/src/unix/sys-std.c > {or you can use the github *mirror* of the svn server > which provides version/revision/log etc ((this be > available for svn as well, but we (I) had chosen not to > provide (via apache modules) just to keep our server as > bare bones as possible and hence less vulnerable to > viciousities)) }