all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* longlines-mode and visual-line-mode
@ 2009-05-31 16:05 Leo
  2009-05-31 16:26 ` Deniz Dogan
  0 siblings, 1 reply; 16+ messages in thread
From: Leo @ 2009-05-31 16:05 UTC (permalink / raw)
  To: emacs-devel

Hi there,

After briefly trying these two modes, I haven't found any significant
difference between them. It looks like longlines has all the features
for visual-line-mode. Is my impression correct? Thank you.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.





^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: longlines-mode and visual-line-mode
@ 2009-06-01  0:53 MON KEY
  2009-06-01  2:27 ` Leo
  0 siblings, 1 reply; 16+ messages in thread
From: MON KEY @ 2009-06-01  0:53 UTC (permalink / raw)
  To: emacs-devel

Was surprised to learn today of a new mode to rival
visual-line-mode... Lone Lines Mode - presumably for Texans!

`emacs-23.0.94/info/emacs-3  @line 1611 column 28 there is a typo:
``Unlike Visual Line mode, Lone Lines mode breaks long lines at the fill''
should be ``Long Lines'' - I hope :P
see diff below
---
>> I also think longlines should be marked obsolete for 23.1.

> I'm planning to do this post 23.1.

How does visual-lines-mode mirror longlines-mode functionality w/re
softlines at fill-column?
`
From what I can gather from the docs visual-line-mode and word-wrap are
wrapped at the fringe whereas longlines mode can _line wrap_  at an
arbitrary buffer or mode local fill column setting.

If indeed visual-line-mode and longlines-mode offer reasonably
identical behavior, how does one duplicate the longlines effect with
visual-lines-mode?
Neither the docstrings or the manual are clear about this vis a vis
filling when visual-lines-mode is non-nil.

FWIW, I have come to rely on longlines mode for certain types of
functionality and have also managed to kludge together more than one
function to accomodate it's idiosyncrasies.  While I have no objection
to abandoning longlines-mode this should not be at the loss of the
line-wrapping it has to offer.

(info "(emacs)Visual Line Mode")
"Here, each long logical line is divided into two or more screen
lines, like in ordinary line continuation.  However, Emacs attempts to
wrap the line at word boundaries near the right window edge."

Per `longlines-mode' docstring:
"In Long Lines mode, long lines are wrapped if they extend beyond
`fill-column'.  The soft newlines used for line wrapping will not
show up when the text is yanked or saved to disk.

(info (emacs)Continuation Lines")
"This is called "line wrapping" or "continuation", and the long
logical line is called a "continued line".


----------------------------------------------------------------
*** /home/sp/local-emacs/emacs-23.0.94/info/mm	
--- /home/sp/local-emacs/emacs-23.0.94/info/emacs-3	
***************
*** 1608,1614 ****
  "soft newlines" as you type (*note Hard and Soft Newlines::).  These
  soft newlines won't show up when you save the buffer into a file, or
  when you copy the text into the kill ring, clipboard, or a register.
! Unlike Visual Line mode, Long Lines mode breaks long lines at the fill
  column (*note Fill Commands::), rather than the right window edge.  To
  enable Long Lines mode, type `M-x longlines-mode'.  If the text is full
  of long lines, this also immediately "wraps" them all.
--- 1608,1614 ----
  "soft newlines" as you type (*note Hard and Soft Newlines::).  These
  soft newlines won't show up when you save the buffer into a file, or
  when you copy the text into the kill ring, clipboard, or a register.
! Unlike Visual Line mode, Lone Lines mode breaks long lines at the fill
  column (*note Fill Commands::), rather than the right window edge.  To
  enable Long Lines mode, type `M-x longlines-mode'.  If the text is full
  of long lines, this also immediately "wraps" them all.
--------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: longlines-mode and visual-line-mode
@ 2009-06-01  5:14 MON KEY
  2009-06-01  9:55 ` tomas
  2009-06-01 13:27 ` Leo
  0 siblings, 2 replies; 16+ messages in thread
From: MON KEY @ 2009-06-01  5:14 UTC (permalink / raw)
  To: sdl.web; +Cc: emacs-devel

> Marking it obsolete does not mean its going to disappear. You can still

Understood.

> reply on it. But it should be discouraged given that the functionality
> is not properly implemented.

Respectfully, I'll be taking that one with a not too small lump of
salt given your initial inquiry:

"After briefly trying these two modes, I haven't found any significant
difference between them."

> Then people can focus on improving the new visual-line-mode.

This does not in any way address either of my principal inquiries (nor
yours for that matter...)

While I understand, appreciate, and respect the sentiment - improving
V-L-M simply because it is _new_ strikes me as wrong-headed in the
worst way.

If L-L-M is fundamentally flawed in ways that V-L-M isn't, it is most
important to understand the nature of those flaws; how and where they
occur; why they arose in the first place; and how or why they
can/should be avoided when improving V-L-M.

I am aware that Mr. Yidong had a hand in maintaining longlines-mode. I
suspect he will spearhead future extension of V-L-M capability.

It would seem that Mr. Yidong is publicly hinting at deprecating L-L-M
in favor of V-L-M in upcoming releases.

Great! L-L-M _is_ backward headed on more than one count... hence the
kludges I alluded to earlier.

That said, given the recent furor over line-move-visual _now_ would
seem a reasonable time to begin airing out the extant gaps of V-L-M
which L-L-M is/can/will continue to mitigate during the transition.

Investigating how users such as myself might expect V-L-M to
accommodate those aspects of L-L-M which _are_ worth preserving seems
fundamental to a focused approach towards improving V-L-M and
supporting ancillary code/packages which are
developed/ported/re-factored in lieu of any such improvements.

s_P




^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: longlines-mode and visual-line-mode
@ 2009-06-03  3:09 MON KEY
  0 siblings, 0 replies; 16+ messages in thread
From: MON KEY @ 2009-06-03  3:09 UTC (permalink / raw)
  To: emacs-devel

> Anyway, I believe the following is useful but still missing in v-l-m, a
> variable to control the width, i.e. if it is positive integer, it
> controls the length of the line, otherwise it is the distance from the
> window edge to the right-most char of the line.

Realized this evening where Mr. Yidong may be looking to -> grapheme-clusters.

Now that the underlying Emacs encoding is "..to Unicode and Beyond"
this would seem a likely approach esp. coupled with the users
language-environment settings.

Fancy that...

(defun my-grapheme-fuzz-factor-pref ()
  (if (and (member
	    (cdr (assoc 'major-mode (buffer-local-variables)))
	    '(language-o-choice-mode
	      language-o-plenty-mode
	      emacs-rdf-graph-navigator-mode))
	   (and (assoc 'syntax-table text-property-default-nonsticky)
	   (cdr (assoc 'syntax-table text-property-default-nonsticky))))
  (setq right-most-grapheme-avoidance 3)))

  (set (make-local-variable 'grapheme-wrap-fuzz-factor) nil)))

  (add-hook 'buffer-grapheme-wrap-fuzziness-hook 'my-grapheme-fuzz-factor-pref)

Or, for the bidi bound - test for a front-skicky instead in
`my-grapheme-fuzz-factor-pref' and

  (setq left-most-grapheme-avoidance 3)  instead :)




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

end of thread, other threads:[~2009-06-03  3:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-31 16:05 longlines-mode and visual-line-mode Leo
2009-05-31 16:26 ` Deniz Dogan
2009-05-31 17:03   ` Miles Bader
2009-05-31 17:11   ` Leo
2009-05-31 17:17     ` Deniz Dogan
2009-05-31 17:21     ` David Reitter
2009-05-31 17:55       ` Leo
2009-05-31 21:21         ` Chong Yidong
  -- strict thread matches above, loose matches on Subject: below --
2009-06-01  0:53 MON KEY
2009-06-01  2:27 ` Leo
2009-06-01 14:08   ` Stefan Monnier
2009-06-01  5:14 MON KEY
2009-06-01  9:55 ` tomas
2009-06-01 10:01   ` Lennart Borgman
2009-06-01 13:27 ` Leo
2009-06-03  3:09 MON KEY

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.