11

What I do: Here

enter image description here

press Shift+Enter to evaluate.

What I get: The cursor disappeared

enter image description here

What I want: The cursor retained

enter image description here

Workaround: Up Arrow as many times as it takes, Right arrow as many times as it takes.

Note: Related may be the fact that on Windows Chrome, ALT+TAB, ALT+TAB hides the cursor :(

LCarvalho
  • 9,233
  • 4
  • 40
  • 96
ChrisJJ
  • 608
  • 3
  • 8
  • 2
    I don't think there is a way to do that. But instead of right arrowing, why not just up arrow until you're under the input cell, and then do one left arrow. This takes you to the end of the cell immediately Often that's only three keystrokes. – Arnoud Buzing Jul 30 '15 at 15:25
  • closely related: 29396 @community: Close enough to be a duplicate? – Kuba Jul 30 '15 at 15:34
  • 2
    @Kuba in this case, I don't think so. The FE and cloud are sufficiently different that i don't think they're duplicates. – rcollyer Jul 30 '15 at 15:59
  • 3
    If this question is about the programming cloud, please mention is specifically within the body of the post. Do not rely on tags to convey information (at least not in Mma.SE) – Szabolcs Jul 30 '15 at 16:10
  • @rcollyer sure, I agree, I have missed WPC reference. – Kuba Aug 04 '15 at 08:55

1 Answers1

13

Is this what you are after?

SetOptions[
 EvaluationNotebook[],
 CellEpilog :> (
   SelectionMove[EvaluationNotebook[], All, EvaluationCell];
   SelectionMove[EvaluationNotebook[], After, CellContents];
   )
 ]
Kuba
  • 136,707
  • 13
  • 279
  • 740
  • +1 but based on the tags the OP seems to want to do this in the Programming Cloud, where it doesn't work. – Szabolcs Jul 30 '15 at 15:38
  • @Szabolcs oh, right, WPC is off topic, isn't it? – Kuba Jul 30 '15 at 15:40
  • @Kuba :P but to give a serious answer: This question is specifically about the WPC because it's a question about using the editor, not about the language. WPC is not off-topic per se because this StackExchange exists to discuss Mathematica and related software, and I don't think anyone disputes that the WPC is related to Mathematica. – Patrick Stevens Jul 30 '15 at 15:48
  • @PatrickStevens Sure, if it's about WPC I will delete it. I don't know what's the status, could you point me to source of " this StackExchange exists to discuss Mathematica and related software". – Kuba Jul 30 '15 at 15:52
  • 1
    I wouldn't delete it, it's still a valid answer for the desktop FE. – Szabolcs Jul 30 '15 at 16:09
  • 6
    @PatrickStevens my understanding is that related software is on-topic if its usage relates to Mathematica, not necessarily its genesis. For example, Wolfram|Alpha is based on Mathematica, but knowing Mathematica does not help one to answer a question about W|A. So, W|A is off-topic here unless the question is about interacting with W|A using Mathematica. (Otherwise, we defer to the experts on that particular product, who are at the Wolfram Community site.) I can imagine a similar argument applying to the Cloud, because it is in a state of flux and none of us really knows how it works. – Oleksandr R. Jul 30 '15 at 16:11
  • @Kuba "could you point me to source of " this StackExchange exists to discuss Mathematica and related software"." The source is where you'd expect, surely. http://mathematica.stackexchange.com/help/on-topic What topics can I ask about here? "Mathematica Stack Exchange is for users of the software Mathematica developed by Wolfram Research, as well as related products like gridMathematica, Wolfram Workbench, Player (Pro), and the CDF Player." – ChrisJJ Aug 03 '15 at 21:11
  • @ChrisJJ Thanks, I'm always having trouble finding such info about SE sites. And I find confusing that the greeting screen says something more scoped: http://mathematica.stackexchange.com/tour – Kuba Aug 03 '15 at 21:17
  • @Kuba You're welcome. Re that confusion, you might want to contribute here http://meta.mathematica.stackexchange.com/questions/1630/wouldnt-it-be-nice-if-the-question-form-accorded-with-the-forum-scope and http://meta.mathematica.stackexchange.com/questions/1636/are-people-working-together-to-build-a-library-of-detailed-answers-to-every-ques – ChrisJJ Aug 03 '15 at 21:43
  • @ChrisJJ I took a glimpse, the problem is, there is a lot of stuff written there and I don't have time atm to think about this. p.s. I don't think WPC or Cloud should be off topic here but atm they are in beta and the documentation is really the Mathematica documentation and this makes Community or WRI support the only valid places to ask such questions. – Kuba Aug 04 '15 at 07:27
  • @Kuba FTR, WPC docs differ from Mathematica docs ISTM by IDing some functions that are unavailable in WPC. – ChrisJJ Aug 04 '15 at 23:05
  • @ChrisJJ From WPC docs one can read about SelectionMove and all those FrontEnd procedures that are not yet implemented. WRI stopped taking care about including "cloud" icon which I find highly annoying. It wastes my time to find what works and what is not. I won't answer any question and say it's valid on WPC because IMO there is no official documentation. Even WRI says it's beta. – Kuba Aug 05 '15 at 05:54
  • @Kuba Thanks. There is official documentation. Just press F1 in WPC IDE. Unfortunately yes is it highly inaccurate and I am beginning to suspect WS are too embarrassed to add the many cloud-bars it truly needs. – ChrisJJ Aug 06 '15 at 01:07
  • @ChrisJJ The fact the documentation is there is a joke. It is MMA documentation which was at the beginning modified a little to reflect WPC differences, it isn't atm. I had to and you have to accept that they are editing it fully and it is still in beta phase. At the end I had to test each part of code anyway. – Kuba Aug 06 '15 at 06:45
  • @Kuba "I had to and you have to accept that they are editing it fully". I'll accept that when I see evidence it is true So far I haven't. – ChrisJJ Nov 18 '15 at 21:17
  • 1
    Nice code, but how to actually restore the old cursor position, not just going to the end of the previous cell? – kungfooman Nov 21 '20 at 15:34
  • @kungfooman it is something between this answer and this one: https://mathematica.stackexchange.com/a/125032/5478 let me know if you get stuck or I missed your point – Kuba Nov 21 '20 at 17:21
  • Very nice, is it possible to set this to a keyboard shortcut so that one could use either this or the default shift+ enter? I suppose that would require setting the options using this code, evaluating the cell, and returning to the default options. I am not sure how to evaluate the current cell programmatically. – userrandrand Apr 03 '23 at 22:14
  • @Kuba When one clicks shift+enter on or evaluates a cell, it prevents you from typing/editing it. Pasting in your code and clicking shift+enter to apply your code does not help with it. Do you know how to fix this so typing/editing is not prevented? – Tyma Gaidash Mar 21 '24 at 23:28
  • @TymaGaidash What do you mean by that? Prevents from editing even before that code is used? Are you using desktop Mathematica or something else? Which version? – Kuba Mar 22 '24 at 05:30