When the output in term is longer than the frame it will wrap the line. But when I copy and paste the output, I found the output will break under the wrap point, because it treat it as line break. How can I avoid this behavior? I test eshell, which is good and will not break the wrap.

I am using zsh under term.

  • 2
    Does setting term-suppress-hard-newline help?
    – npostavs
    Dec 29, 2017 at 15:12

1 Answer 1


As @npostavs posted in comment:

(setq term-suppress-hard-newline t)
  • Welcome to Emacs.SE! As a matter of norms, if another user posts a comment that you think is the actual answer, please alert that user in another comment to post their original comment as a full answer so that they get credit for the idea.
    – Dan
    Jan 1, 2018 at 20:38
  • @Dan I don't see what's the big deal about imaginary-point allocation, considering they've already credited me in the text of the question.
    – npostavs
    Jan 1, 2018 at 21:56
  • @npostavs: I don't think OP intended anything malicious. It's just the politeness norm that the person who offered the idea should either get the acknowledgement, or at least be offered the opportunity to forgo the points. You're not concerned about the point allocation for yourself, which is no problem. I'm not concerned for myself either. But not everyone agrees with that, and, at a minimum, I always appreciate when I'm in this situation and get to choose to forgo something.
    – Dan
    Jan 1, 2018 at 23:34
  • @Dan Thanks for the reminder! This is the first time I encounter this situation. I will alter commenter next time.
    – Yuji
    Jan 3, 2018 at 0:37
  • @npostavs Thanks for your generousness. I did not expect to get the answer so quickly. Emacs.SE is really helpful!
    – Yuji
    Jan 3, 2018 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.