unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Variable-width font indentation: pasting outside Emacs
@ 2018-03-06 18:21 Drew Adams
  2018-03-06 19:09 ` Yuri Khan
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Drew Adams @ 2018-03-06 18:21 UTC (permalink / raw)
  To: Clément Pit-Claudel, Herring, Davis, emacs-devel; +Cc: Paul Eggert

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.



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

end of thread, other threads:[~2018-03-07  6:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-06 18:21 Variable-width font indentation: pasting outside Emacs Drew Adams
2018-03-06 19:09 ` 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

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).