Gnus development mailing list
 help / color / mirror / Atom feed
* text/plain with 80 char wrap vs the flowed mime-type (whatever it is)
@ 2016-01-27 21:59 Wes Hardaker
  2016-01-28  1:52 ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 12+ messages in thread
From: Wes Hardaker @ 2016-01-27 21:59 UTC (permalink / raw)
  To: ding


So, I was co-writing a mail message with my wife yesterday and I noticed,
after sending her my copy of the proposed text, using the standard wrap
length (76 or whatever it is), that it looked fairly messed up on her
small phone screen.

What are people using for wrapping text these days?  Sticking with an
assumed 80 char screen?  Always using non-wrapped text?

Sadly, what I suspect I need to is set up different parameters in
different topics depending on who I'm writing to.

I suspect that the 80-char battle finally sunk with the massive change
in form factors that people read mail on now.  Should I bother to
continue assuming I know how I want to lay out my message, when the
reader really should have their preference for generic paragraphs (as
opposed to structured things like code or ascii diagrams).

Thoughts?

-- 
Wes Hardaker                                     
My Pictures:       http://capturedonearth.com/
My Thoughts:       http://blog.capturedonearth.com/



^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: text/plain with 80 char wrap vs the flowed mime-type (whatever it is)
@ 2016-02-04 22:41 Magnus Henoch
  2016-02-05  0:14 ` Nikolaus Rath
  2016-02-05  0:22 ` Mark Simpson
  0 siblings, 2 replies; 12+ messages in thread
From: Magnus Henoch @ 2016-02-04 22:41 UTC (permalink / raw)
  To: ding

Nikolaus Rath <Nikolaus@rath.org> writes:

> On Jan 27 2016, jorge.alfaro-murillo@yale.edu (Jorge 
> A. Alfaro-Murillo) wrote: 
>> I have:  
>> 
>> #+BEGIN_SRC emacs-lisp   (add-hook 'message-mode-hook 
>> 'use-hard-newlines) #+END_SRC  
>> 
>> That allows the message to be sent with format=flowed. 
> 
> For me that breaks e.g. text pasted from a terminal or from a C 
> mode window (the pasted stuff is refilled when the message is 
> displayed by the recipient). 
> 
> Is that a general problem or something specific to my setup? 

I eventually came up with this:

  (defun my-mark-hard-newlines (beg end &rest _ignore)
    (interactive (list (point-min) (point-max)))
    (save-excursion
      (goto-char beg)
      (while (search-forward "\n" end t)
        (let ((pos (1- (point))))
          (if (get-text-property pos 'hard)
              ;; Use `copy-sequence', because display property 
              values must not be `eq'!
              (add-text-properties pos (1+ pos) (list 'display 
              (copy-sequence "⏎\n")))
            (remove-text-properties pos (1+ pos) '(display 
            nil)))))))

  (defun my-use-and-mark-hard-newlines ()
    (interactive)
    (use-hard-newlines)
    (add-hook 'after-change-functions 'my-mark-hard-newlines nil 
    t))

  (with-eval-after-load "message"
    (add-hook 'message-mode-hook 'my-use-and-mark-hard-newlines))

It doesn't fix things automatically, but it lets me see which 
newlines are hard, so I get the hint to fix code snippets manually 
before sending.

Regards,
Magnus



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-02-05 17:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-27 21:59 text/plain with 80 char wrap vs the flowed mime-type (whatever it is) Wes Hardaker
2016-01-28  1:52 ` Jorge A. Alfaro-Murillo
2016-02-02 18:22   ` Wes Hardaker
2016-02-04  2:54   ` Mark Simpson
2016-02-04  5:18     ` Teemu Likonen
2016-02-04 14:30       ` Teemu Likonen
2016-02-05  0:21         ` Mark Simpson
2016-02-05 17:13     ` Jorge A. Alfaro-Murillo
2016-02-04 16:17   ` Nikolaus Rath
2016-02-04 22:41 Magnus Henoch
2016-02-05  0:14 ` Nikolaus Rath
2016-02-05  0:22 ` Mark Simpson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).