This patch introduces the 'reload()' remote command, so that elinks reloads the page in the current tab with `elinks -remote 'reload()'`
diff -Naur elinks-0.13-20170428/src/config/cmdline.c elinks-0.13-modified/src/config/cmdline.c --- elinks-0.13-20170428/src/config/cmdline.c 2017-03-06 21:47:40.000000000 +0100 +++ elinks-0.13-modified/src/config/cmdline.c 2017-05-01 12:17:01.000000000 +0200 @@ -204,6 +204,7 @@ REMOTE_METHOD_XFEDOCOMMAND, REMOTE_METHOD_ADDBOOKMARK, REMOTE_METHOD_INFOBOX, + REMOTE_METHOD_RELOAD, REMOTE_METHOD_NOT_SUPPORTED, }; @@ -221,6 +222,7 @@ { "addBookmark", REMOTE_METHOD_ADDBOOKMARK }, { "infoBox", REMOTE_METHOD_INFOBOX }, { "xfeDoCommand", REMOTE_METHOD_XFEDOCOMMAND }, + { "reload", REMOTE_METHOD_RELOAD }, { NULL, REMOTE_METHOD_NOT_SUPPORTED }, }; unsigned char *command, *arg, *argend, *argstring; @@ -386,6 +388,10 @@ remote_session_flags = SES_REMOTE_INFO_BOX; break; + case REMOTE_METHOD_RELOAD: + remote_session_flags = SES_REMOTE_RELOAD; + break; + case REMOTE_METHOD_NOT_SUPPORTED: break; } diff -Naur elinks-0.13-20170428/src/session/session.c elinks-0.13-modified/src/session/session.c --- elinks-0.13-20170428/src/session/session.c 2017-03-06 21:47:40.000000000 +0100 +++ elinks-0.13-modified/src/session/session.c 2017-05-01 12:17:01.000000000 +0200 @@ -1007,6 +1007,9 @@ } else if (remote & SES_REMOTE_PROMPT_URL) { dialog_goto_url_open(ses); + + } else if (remote & SES_REMOTE_RELOAD) { + reload(ses, CACHE_MODE_FORCE_RELOAD); } } diff -Naur elinks-0.13-20170428/src/session/session.h elinks-0.13-modified/src/session/session.h --- elinks-0.13-20170428/src/session/session.h 2017-03-06 21:47:40.000000000 +0100 +++ elinks-0.13-modified/src/session/session.h 2017-05-01 12:17:01.000000000 +0200 @@ -35,6 +35,7 @@ SES_REMOTE_PING = 16, SES_REMOTE_ADD_BOOKMARK = 32, SES_REMOTE_INFO_BOX = 64, + SES_REMOTE_RELOAD = 128, }; /** This is generic frame descriptor, meaningful mainly for ses_*_frame*(). */ -- http://lists.linuxfromscratch.org/listinfo/elinks-dev Unsubscribe: See the above information page