7

I sometimes edit questions. It often happens when it's something I could help about, but the code attached has a horrible indentation. I simply cannot check other peoples' code if the indentation is not correct: my eyes hurt!

But sometimes it happens that the code is so messed up that something wrong remains. It usually happens when the code contains a lot of tabs (by the way: wouldn't be a good feature to automatically expand tabs in code sections?).

What to do in these cases?

  • If I edit again the question someone could tell me "Hey! Are you fraudulently trying to get reputation???"
  • If I don't edit the question (or if I cannot edit it because of the 6 characters limit) it seems that I did a bad job. But it would be unfair after editing a 400 lines code section removing 10 tabs per line... from my phone!

So I searched for any meta questions, and I found this one. It sadly tells that no edit^2 can be done. But it says that

However, you can make adjustments to a suggestion while it's still under review.

How could the action above be done? I recently tried to find it, with no success.

(I think that the capability to reverse/modify own suggested edits, or even squash the second edit in the first one in order to not get further reputation could be a useful feature. But this is another question.)

Edit: Here it is! That's what I see after a suggested edit from mobile phone:

the edit link disappeared

The edit link disappeared! In this case I just realized that the C tag was wrong (c++ to be used due to new use) but I could not edit my edit.

9
  • Maybe this helps: Can I modify and resubmit my suggested edit before it is peer reviewed?
    – honk
    Commented Dec 29, 2019 at 20:35
  • @honk thans, I missed that question. But... "edit" link disappears after submitting an edit. Could it be an issue specific for mobile version of the site? Commented Dec 29, 2019 at 21:12
  • 5
    "400 lines code" - vote to close as "missing MRE", possibly downvote and move on. There is no reason to waste your time on editing that much code. Commented Dec 29, 2019 at 21:35
  • I also recommend copy/pasting the code into an IDE, letting the IDE tidy it, and then pasting that back into the post. You can even use an online tool like JSFiddle.
    – BSMP
    Commented Dec 30, 2019 at 7:18
  • If I edit again the question someone could tell me "Hey! Are you fraudly trying to get reputation???" I think this would be unlikely unless you made a habit of doing it or edited the same post a bunch of times (not just 2).
    – BSMP
    Commented Dec 30, 2019 at 7:21
  • For reference: In this particular case, the OP has effectively re-written the question, which has no doubt over-ridden your suggested edit - there's no sign of your 'presence' in the edit history! Commented Jan 9, 2020 at 7:15
  • @AdrianMole that's strange... For the record, this was my suggested edit stackoverflow.com/review/suggested-edits/25046412 Commented Jan 9, 2020 at 7:54
  • Actually, not that strange: the reason given by "Community" was "This edit conflicted with a subsequent edit." That's not, in any way, criticising your edit - just that OP did something far more drastic, while yours was still in the review queue. (BTW, I think your edit was a good one: code-formatting is important on SO!) Commented Jan 9, 2020 at 7:57
  • @AdrianMole, thanks for your appreciation. Anyway here the problem here is that the "edit" link below disappeared if the edit was performed from mobile phone. Commented Jan 9, 2020 at 8:02

1 Answer 1

6

If your edit hasn't been reviewed yet (approved or rejected) then you're lucky. You can click 'edit', make the changes you want and save them. The new edit will be merged with the old one. The reviews (if any) will be kept.

However, if your edit was approved, it's not a good idea to edit the post to indent the code. It isn't a functional change and doesn't attempt to improve the post. What you can do is ask the OP in comments to format the code properly, so that it would be readable. Note that 400 lines of code is not a minimal example, therefore, instead of editing the post, flag it as off-topic.

See also Edits must be at least six characters when reformatting

4
  • I write also here what I wrote in the comment above. Is it possible that the edit link is not shown anymore in mobile version of the site after a submitted edit? I'm 99% sure. Commented Dec 29, 2019 at 21:16
  • 2
    Ps: I don't agree about the little impact of the indentation edit. It makes the difference between "I will never check that code" and "let's have a look". Commented Dec 29, 2019 at 21:18
  • @Cubo78 this is all about <2k rep users. An edit (by a <2k) which only indents code will probably be rejected. A high-rep user can edit posts to indent the code if only the code hurts the eyes too much. With regards to the edit link disappearing after suggesting an edit... please reload the page, make sure the question isn't locked or there isn't any other suggested edit waiting in the queue before reporting a bug here, on Meta. Commented Dec 29, 2019 at 21:31
  • @double-beep See my comment in OP's question: the edit is gone. Commented Jan 9, 2020 at 7:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .