Why does Trimble thank Longstreet for an assignment that could very likely hasten Trimble’s own death?
General Trimble, who commanded one of Stonewall Jackson's divisions early 1863, became ill, left the army to recuperate, and lost his command, which went to E. A. Johnson. When Trimble realized the Army of Northern Virginia was on its way into the North, Trimble caught up with Lee but had no specific duties during the march. In a few days, Lee assigned him to Ewell's Corps, which he joined in Carlisle, Pennsylvania, in late June.
After the initial battle between part of Ewell's Corps and Federal troops, which was a significant Confederate success, Trimble suggestion to Ewell that he take Cemetery Hill, which was unoccupied and, of course, a strategic position on high ground. Ewell, who understood Lee's orders to avoid a general engagement until all the army was in position, decided to wait. Ewell, who couldn't control his anger, said a few expletives, threw his sword down, and went back to see Lee where he essentially begged for a command.
Lee, not sure if Trimble was up to the task, gave in and assigned Trimble to replace James Lane on July 3, who had been commanding Pender's Division, and Trimble, having his first real command since April, was very thankful even though he had serious doubts about the massed assault we know as Pickett's Charge. Trimble was wounded during the charge, and while recuperating from the amputation of his lower left leg, he was captured and not exchanged until February, 1865.