all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* What's the purpose of things like `default-truncate-lines'?
@ 2006-06-29 10:55 David Kastrup
  2006-06-29 17:58 ` Richard Stallman
  0 siblings, 1 reply; 7+ messages in thread
From: David Kastrup @ 2006-06-29 10:55 UTC (permalink / raw)



I read

    default-truncate-lines is a variable defined in `src/buffer.c'.
    Its value is nil

    Documentation:
    Default value of `truncate-lines' for buffers that do not override it.
    This is the same as (default-value 'truncate-lines).

    [back]

If it is the same as (default-value 'truncate-lines), why do we have a
separately named variable?

Is this just a technical necessity for some reason?

I am asking because `default-truncate-lines' is documented as a
variable of its own in the Elisp manual, and I am not sure whether
that makes any sense.  Maybe it would be better to point out that
`truncate-lines' is automatically buffer-local and thus its default
should be set with `setq-default'.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: What's the purpose of things like `default-truncate-lines'?
  2006-06-29 10:55 What's the purpose of things like `default-truncate-lines'? David Kastrup
@ 2006-06-29 17:58 ` Richard Stallman
  2006-06-29 18:04   ` David Kastrup
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2006-06-29 17:58 UTC (permalink / raw)
  Cc: emacs-devel

    If it is the same as (default-value 'truncate-lines), why do we have a
    separately named variable?

History.

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

* Re: What's the purpose of things like `default-truncate-lines'?
  2006-06-29 17:58 ` Richard Stallman
@ 2006-06-29 18:04   ` David Kastrup
  2006-06-29 19:01     ` Stuart D. Herring
  2006-07-01  3:20     ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: David Kastrup @ 2006-06-29 18:04 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     If it is the same as (default-value 'truncate-lines), why do we have a
>     separately named variable?
>
> History.

Is it then appropriate to remove the reference to
default-truncate-lines from the Elisp manual, as
default-truncate-lines does not appear to have usefulness of its own?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: What's the purpose of things like `default-truncate-lines'?
  2006-06-29 18:04   ` David Kastrup
@ 2006-06-29 19:01     ` Stuart D. Herring
  2006-07-01  3:20       ` Richard Stallman
  2006-07-01  3:20     ` Richard Stallman
  1 sibling, 1 reply; 7+ messages in thread
From: Stuart D. Herring @ 2006-06-29 19:01 UTC (permalink / raw)
  Cc: emacs-devel

>>     If it is the same as (default-value 'truncate-lines), why do we have
>> a
>>     separately named variable?
>>
>> History.
>
> Is it then appropriate to remove the reference to
> default-truncate-lines from the Elisp manual, as
> default-truncate-lines does not appear to have usefulness of its own?

More than that; unless I'm mistaken, it doesn't actually attach to the
default value of `truncate-lines'.  Does it actually do anything
interesting at all?

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* Re: What's the purpose of things like `default-truncate-lines'?
  2006-06-29 18:04   ` David Kastrup
  2006-06-29 19:01     ` Stuart D. Herring
@ 2006-07-01  3:20     ` Richard Stallman
  2006-07-01  9:25       ` David Kastrup
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2006-07-01  3:20 UTC (permalink / raw)
  Cc: emacs-devel

    Is it then appropriate to remove the reference to
    default-truncate-lines from the Elisp manual, as
    default-truncate-lines does not appear to have usefulness of its own?

I don't see a reason to remove its docs.  Some code might use it.

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

* Re: What's the purpose of things like `default-truncate-lines'?
  2006-06-29 19:01     ` Stuart D. Herring
@ 2006-07-01  3:20       ` Richard Stallman
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2006-07-01  3:20 UTC (permalink / raw)
  Cc: emacs-devel

    More than that; unless I'm mistaken, it doesn't actually attach to the
    default value of `truncate-lines'.

Yes it does.

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

* Re: What's the purpose of things like `default-truncate-lines'?
  2006-07-01  3:20     ` Richard Stallman
@ 2006-07-01  9:25       ` David Kastrup
  0 siblings, 0 replies; 7+ messages in thread
From: David Kastrup @ 2006-07-01  9:25 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     Is it then appropriate to remove the reference to
>     default-truncate-lines from the Elisp manual, as
>     default-truncate-lines does not appear to have usefulness of its own?
>
> I don't see a reason to remove its docs.  Some code might use it.

But for understanding existing code, the DOC string should be enough.
Things that are documented in the Elisp manual are usually intended to
be _written_ in new code, not merely understood in old code.  I don't
think we should encourage writing code that is harder to understand,
namely requires looking up both default-truncate-lines as well as
truncate-lines for understanding.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

end of thread, other threads:[~2006-07-01  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-29 10:55 What's the purpose of things like `default-truncate-lines'? David Kastrup
2006-06-29 17:58 ` Richard Stallman
2006-06-29 18:04   ` David Kastrup
2006-06-29 19:01     ` Stuart D. Herring
2006-07-01  3:20       ` Richard Stallman
2006-07-01  3:20     ` Richard Stallman
2006-07-01  9:25       ` David Kastrup

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.