how to restore escreen configuration on emacs startup? - emacs

Is there a way to restore all escreen screens and window configurations on emacs startup?
I tried to add the (escreen-configuration-alist) to desktop-saved-globals with no result.
I also tried to execute some code manually, but whenever I run (escreen-restore-screen-map screen-map) with screen-map being export of current escreen screen map, I get "wrong argument type window-configuration-p".
Not an elisp expert and a little bit stuck.
If there's no luck with escreen, maybe el-screen has the needed functionality?
Thanks.

Actually, escreen use the window configuration as defined in Emacs. Unfortunately window configuration is hard coded in C and there is no serialization. So you cannot save/restore between sessions but simply register it.
The only way is to rewrite window configuration in Emacs Lisp. HIROSE Yuuji wrote his own window configuration and it works great! I enhanced it to support frames and escreen case and post it on github: https://github.com/martialboniou/revive-plus
I provided this package WITHOUT ANY WARRANTY. No unit test, for instance, but it should work. Let me know (it's a fresh hack so there will be refactoring soon)!

Related

VSCode-like integrated terminal functionality in nvim? (eg: open files mentioned in terminal output in a buffer)

I'm coming from VSCode to Neovim, and for the most part I've been able to accommodate/replicate the workflows and functionality I've gotten used to in VSCode in Vim. Right now, I'm stuck on replicating the Link functionality of the VSCode integrated terminal.
This lets you mouse over text like main.py or server.go:50 and ctrl-click to jump to that file or line location in your editor panes. This really helpful for jumping to the locations of compilation errors or test failures from their associated terminal output.
I've searched for existing plugins/solutions for this but haven't found any. Are there any that I've missed? Otherwise, what might be a good approach to scripting this myself?
I'm new to vimscripting, but I'd assume you could do some regex and with knowledge of the current working directory, you could infer the correct filepath to open.
Replicating one editor's workflow in another is not exactly a good idea as the two editors have—supposedly, if not why switch in the first place?—different feature sets or even paradigms. For instance, staying in insert mode all the time in Vim because that's what you are used to would make no sense because Vim derives most of its value from its modality… and you would probably also find examples in the other direction.
Case in point, compiling and jumping to errors in Vim typically doesn't involve the built-in :terminal at all. You are supposed to use the :help quickfix feature, which exists for that very purpose.
See :help 30.1 for a gentle introduction from the user manual.

Eclipse keybindings. Setting up a shortcut for executing a specific run configuration

I'm trying to setup a key binding in Eclipse to directly execute a background Java file. My file is called CodeChecker.java and it's sufficient for my purposes to run the main method without any arguments. I need to run it repeatedly and so I'm trying to setup a shortcut key to run it directly without having to bring up the Run... menu or having to bring up the file itself.
As far as I'm aware Eclipse is not able to offer this functionality directly. I've tried using a plugin called Practically Macro according to this answer Assigning a keyboard shortcut for a specific Eclipse build configuration. But this answer is horribly out of date and doesn't work any longer.
So I'm wondering if Practically Macro can still be used to achieve this? Any other solution, plugin, script or otherwise would be equally welcome.

How do I show Variable Bindings in SICSTUS' "SPIDER" IDE?

I'm using the "SPIDER" IDE for SICSTUS Prolog development, as instructed by the SICSTUS Manual and the documentation on the SPIDER IDE itself. When debugging, under the 'SICSTUS Debugging' perspective, the variables do not show on the Variables window, as can be seen in the top right in the image shown here (it's the first thing in the Spider page)
I set up everything according to this guide and this is, as far as I can tell, the only thing not working. Are there any additional steps to get the variable bindings while debugging?
Thanks in advance,
edit: I've recently reinstalled everything in the same system after formatting a drive, and it now works perfectly. I have no idea what, but I assume I did something wrong the first time.
Variable bindings should work by default. However, some variables may be omitted depending on compiler optimizations and other factors. Try it with the example program shown in the SPIDER image.

How to Make Eclipse More Like Emacs

I am very familiar with emacs--and I realize that there is nothing that it cannot do--but there are some things that it does not do well or efficiently. So, being between projects I am open to the idea of switching to a full-featured IDE such as Eclipse.
With muscle-memory being what it is, I would like to make Eclipse as emacs-like as possible. I have already discovered the excellent Emacs+ plugin which gets me about halfway there. However, I am still missing the following features of emacs which I routinely rely upon:
shell: It's not just a shell, it's also a buffer.
occur: Search->File... is close to what I want, but I just want it to search the current file--which might be a text file, a logfile, or a shell buffer, or whatever.
align-regexp: This awesome little command in emacs helps me make files more readable, and alignment helps with keyboard macros.
What plugins would you recommend to solve these issues? Are there any other emacs features you miss in Eclipse or plugins you would recommend?
Please, no emacs/vi zealots asking why on Earth I would do such a thing.
For the shell you have WickedShell
Ctrl+F is enough to trigger a Search within the current file. (does not create a new buffer with matched lines)
Only Mark Occurrences is about highlighting occurrences, but that is not as advanced as the Emacs function.
Formatter options can emulate "align-regex" function, as described here.
Preferences -> Java -> Code Style -> Formatter.
Click 'Edit' on the profile (you may need to make a new one since you can't edit the default).
In the indentation section select 'Align fields with columns'.
Then, in your code Ctrl+Shift+F will run that formatter.
I can confirm Brian's suggestion (Emacs key-bindings). What I do to resolve this dilemma is to use both Emacs and Eclipse simultaneously. They are both very good at reporting external changes to files so there is minimal chance of tromping on edits (but it can happen). More to the point, you can leverage the strengths of both tools without having to give up either one. The combination of using both tools and Eclipse having Emacs key-bindings makes this quite satisfactory for me.
IIRC (It's been a while since I've used eclipse) eclipse has a "use Emacs key-bindings" mode. I believe that there's also the option to tell eclipse to use emacs as its own editor...

Is it possible to make the auto-complete in netbeans not depend on a key-combination?

Is it possible to make the code-completion on Netbeans automatic, like on Aptana or Visual Studio?
I've noticed that Netbeans can sometimes take a while to populate the list, so this might be asking a bit too much, but if possible, I'd like to somehow enable it.
The onlything I've found in the options is the ability to set a custom key-combo, but not to make this automatic.
I know that if you wait a bit, the auto-completion shows up anyway, but I want it to be without delay.
It appears there is a setting in some NetBeans versions that sets the delay for the popup window.
Choose Tools | Options
Choose Advanced Options
Open the Editing and then Editor Settings folders
Select Java Editor and find the Delay of Completion Window Auto Popup property
Enter a new Delay value in milliseconds (default is 250).
Article where I found it: http://www.informit.com/articles/article.aspx?p=519945&seqNum=5
The problem is that this article is a couple years old, so I opened NetBeans (6.1) on my computer and looked for the property but it didn't exist for the Java Editor (It did for other editors like the XML Editor). This leads me to believe my version is newer than the one in the article and the delay property no longer exists for the Java Editor (checking couldn't hurt though).
So instead, I decided to test the delay. I made a sample project, imported and instantiated a list, and then went to call a method. I stopped at the dot to let NetBeans offer suggestions and it was basically immediate (no noticeable delay). It is at this point, I am wondering if the delay you are experiencing is due purely to performance of the computer, especially since you indicate this occurs "sometimes". It is possible that you are looking at rather large classes, and NetBeans is taking extra time to look up the completions. You could try and test to see if this is true or not by testing code completion on a known large class. The other possibility is your computer is not as fast, or is doing work for another program at the same time. You can try and test this by restarting the computer, opening only NetBeans (to maximize resources to NetBeans), and try some code completions. If either exhibit noticeably faster delays, this is most likely the problem.
Hope this helps.
I think I found a solution. I set up autocomplete keyboard shortcuts for all letters and #, it seems to work. In some cases there is a small lag, but it doesn't prevent you from typing. It took about 5 minutes to add those shortcuts.
I tried to get the desired feature by adding the alphabet to the completion selectors. It worked somewhat, you can always try it.
This works for the first two characters you type This is updated one
Goto:
Tools -> Options -> Editor -> Code Completion
Select
Language: [C/C++]
Autopop Triggers for C/C++ Identifiers
.;->;.*;->*;::;new ; a;b;c;d;e;f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y;z;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;aa;ab;ac;ad;ae;af;ag;ah;ai;aj;ak;al;am;an;ao;ap;aq;ar;as;at;au;av;aw;ax;ay;az;ba;bb;bc;bd;be;bf;bg;bh;bi;bj;bk;bl;bm;bn;bo;bp;bq;br;bs;bt;bu;bv;bw;bx;by;bz;ca;cb;cc;cd;ce;cf;cg;ch;ci;cj;ck;cl;cm;cn;co;cp;cq;cr;cs;ct;cu;cv;cw;cx;cy;cz;da;db;dc;dd;de;df;dg;dh;di;dj;dk;dl;dm;dn;do;dp;dq;dr;ds;dt;du;dv;dw;dx;dy;dz;ea;eb;ec;ed;ee;ef;eg;eh;ei;ej;ek;el;em;en;eo;ep;eq;er;es;et;eu;ev;ew;ex;ey;ez;fa;fb;fc;fd;fe;ff;fg;fh;fi;fj;fk;fl;fm;fn;fo;fp;fq;fr;fs;ft;fu;fv;fw;fx;fy;fz;ga;gb;gc;gd;ge;gf;gg;gh;gi;gj;gk;gl;gm;gn;go;gp;gq;gr;gs;gt;gu;gv;gw;gx;gy;gz;ha;hb;hc;hd;he;hf;hg;hh;hi;hj;hk;hl;hm;hn;ho;hp;hq;hr;hs;ht;hu;hv;hw;hx;hy;hz;ia;ib;ic;id;ie;if;ig;ih;ii;ij;ik;il;im;in;io;ip;iq;ir;is;it;iu;iv;iw;ix;iy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;acm;acn;aco;acp;acq;acr;acs;act;acu;acv;acw;acx;acy;acz;ada;adb;adc;add;ade;adf;adg;adh;adi;adj;adk;adl;adm;adn;ado;adp;adq;adr;ads;adt;adu;adv;adw;adx;ady;adz;aea;aeb;aec;aed;aee;aef;aeg;aeh;aei;aej;aek;ael;aem;aen;aeo;aep;aeq;aer;aes;aet;aeu;aev;aew;aex;aey;aez;afa;afb;afc;afd;afe;aff;afg;afh;afi;afj;afk;afl;afm;afn;afo;afp;afq;afr;afs;aft;afu;afv;afw;afx;afy;afz;aga;agb;agc;agd;age;agf;agg;agh;agi;agj;agk;agl;agm;agn;ago;agp;agq;agr;ags;agt;agu;agv;agw;agx;agy;agz;aha;ahb;ahc;ahd;ahe;ahf;ahg;ahh;ahi;ahj;ahk;ahl;ahm;ahn;aho;ahp;ahq;ahr;ahs;aht;ahu;ahv;ahw;ahx;ahy;ahz;aia;aib;aic;aid;aie;aif;aig;aih;aii;aij;aik;ail;aim;ain;aio;aip;aiq;air;ais;ait;aiu;aiv;aiw;aix;aiy;aiz;aja;ajb;ajc;ajd;aje;ajf;ajg;ajh;aji;ajj;ajk;ajl;ajm;ajn;ajo;ajp;ajq;ajr;ajs;ajt;aju;ajv;ajw;ajx;ajy;ajz;aka;akb;akc;akd;ake;akf;akg;akh;aki;akj;akk;akl;akm;akn;ako;akp;akq;akr;aks;akt;aku;akv;akw;akx;aky;akz;ala;alb;alc;ald;ale;alf;alg;alh;ali;alj;alk;all;alm;aln;alo;alp;alq;alr;als;alt;alu;alv;alw;alx;aly;alz;ama;amb;amc;amd;ame;amf;amg;amh;ami;amj;amk;aml;amm;amn;amo;amp;amq;amr;ams;amt;amu;amv;amw;amx;amy;amz;ana;anb;anc;and;ane;anf;ang;anh;ani;anj;ank;anl;anm;ann;ano;anp;anq;anr;ans;ant;anu;anv;anw;anx;any;anz;aoa;aob;aoc;aod;aoe;aof;aog;aoh;aoi;aoj;aok;aol;aom;aon;aoo;aop;aoq;aor;aos;aot;aou;aov;aow;aox;aoy;aoz;apa;apb;apc;apd;ape;apf;apg;aph;api;apj;apk;apl;apm;apn;apo;app;apq;apr;aps;apt;apu;apv;apw;apx;apy;apz;aqa;aqb;aqc;aqd;aqe;aqf;aqg;aqh;aqi;aqj;aqk;aql;aqm;aqn;aqo;aqp;aqq;aqr;aqs;aqt;aqu;aqv;aqw;aqx;aqy;aqz;ara;arb;arc;ard;are;arf;arg;arh;ari;arj;ark;arl;arm;arn;aro;arp;arq;arr;ars;art;aru;arv;arw;arx;ary;arz;asa;asb;asc;asd;ase;asf;asg;ash;asi;asj;ask;asl;asm;asn;aso;asp;asq;asr;ass;ast;asu;asv;asw;asx;asy;asz;ata;atb;atc;atd;ate;atf;atg;ath;ati;atj;atk;atl;atm;atn;ato;atp;atq;atr;ats;att;atu;atv;atw;atx;aty;atz;aua;aub;auc;aud;aue;auf;aug;auh;aui;auj;auk;aul;aum;aun;auo;aup;auq;aur;aus;aut;auu;auv;auw;aux;auy;auz;ava;avb;avc;avd;ave;avf;avg;avh;avi;avj;avk;avl;avm;avn;avo;avp;avq;avr;avs;avt;avu;avv;avw;avx;avy;avz;awa;awb;awc;awd;awe;awf;awg;awh;awi;awj;awk;awl;awm;awn;awo;awp;awq;awr;aws;awt;awu;awv;aww;awx;awy;awz;axa;axb;axc;axd;axe;axf;axg;axh;axi;axj;axk;axl;axm;axn;axo;axp;axq;axr;axs;axt;axu;axv;axw;axx;axy;axz;aya;ayb;ayc;ayd;aye;ayf;ayg;ayh;ayi;ayj;ayk;ayl;aym;ayn;ayo;ayp;ayq;ayr;ays;ayt;ayu;ayv;ayw;ayx;ayy;ayz;aza;azb;azc;azd;aze;azf;azg;azh;azi;azj;azk;azl;azm;azn;azo;azp;azq;azr;azs;azt;azu;azv;azw;azx;azy;azz;
Good Luck!