all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>,
	"Herring, Davis" <herring@lanl.gov>,
	emacs-devel@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: Variable-width font indentation: pasting outside Emacs
Date: Tue, 6 Mar 2018 10:21:47 -0800 (PST)	[thread overview]
Message-ID: <f078cc98-b584-470b-acd9-6f450f4ff9ba@default> (raw)

FWIW -

I see lots of discussion about different ways that Emacs might
implement appropriate display wrt indentation and alignment, for
code and other text, and in particular, for variable-width fonts.

But all of that is only about how the text appears inside Emacs.
What about copying text and pasting it into other applications?

Today, with a fixed-width font, you can copy and paste text,
including code, into other apps and have it appear pretty much
as you might expect/hope.  (At least, that is, provided the
text uses only SPC and not tab chars for indentation, or
provided you first use `untabify'.)

Should some consideration be given to pasting variable-width
text outside Emacs in a way that pretty much does what a user
might want/expect?  If so, how to do that for variable-width
fonts?

Could we, for example, (optionally) affect copy or paste
operations, to automatically try to compensate by inserting
the (more or less) right number of SPC chars of the
variable-width font (of the first non-whitespace char on the
line)?

Should we perhaps have different such conversions available
while copying, depending on the destination (paste) environment,
i.e., whether or not it handles variable-width text?

People communicate about code and other text in more and more
ways, many of which are and will remain outside Emacs.  Can we
try to DTRT for variable-width text, so that the result of
pasting into another app gives indentation and alignment that
at least approximates what one would want/expect?  If so,
should we try to do that?

Shouldn't we take a point of view in which Emacs is part of
the wider world and text is exchanged between Emacs and other
apps?  Thinking about that fact of exchange should maybe
affect decisions about how to indent and align variable-width
fonts inside Emacs.

Or if it doesn't, maybe we should at least think about how
we might convert text for exchange, from whatever design we
choose to solve the inside-Emacs problem of displaying
variable-width text with appropriate indentation and alignment.

Put differently, if we choose this or that implementation to
show variable-width text appropriately in Emacs, that might
affect how well the result of pasting outside Emacs reflects
the appearance inside Emacs.



             reply	other threads:[~2018-03-06 18:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 18:21 Drew Adams [this message]
2018-03-06 19:09 ` Variable-width font indentation: pasting outside Emacs Yuri Khan
2018-03-06 19:52   ` Drew Adams
2018-03-06 22:15     ` Drew Adams
2018-03-07  6:28       ` Yuri Khan
2018-03-06 20:21 ` Eli Zaretskii
2018-03-06 20:56 ` Richard Stallman
2018-03-06 21:31   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f078cc98-b584-470b-acd9-6f450f4ff9ba@default \
    --to=drew.adams@oracle.com \
    --cc=cpitclaudel@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=herring@lanl.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.