all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: String length 13 characters made of blank spaces
Date: Fri, 30 Oct 2020 09:12:18 +0100	[thread overview]
Message-ID: <20201030081218.GB26449@tuxteam.de> (raw)
In-Reply-To: <trinity-ca77a852-c67a-457a-bdf1-54bc7a711f6e-1604030017889@3c-app-mailcom-bs12>

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

On Fri, Oct 30, 2020 at 04:53:37AM +0100, Christopher Dimech wrote:
> 
> Can one do the following to have a string length 13 characters
> made of blank spaces, or is it better to use some other construct?
> 
> (make-string 13 ? )

That's perfectly fine. For that one character, it is customary
to escape it (i.e. to spell it out as "?\ ". For one, that makes
the space more visible, and then, you need the escape in the
cases where the character has a special meaning (try making a
string of thirteen open parentheses, for example).

Since the escape works always, you get a more consistent (and
arguably, readable) result by always putting a "\" there, i.e.
?\a instead of the equivalent ?a.

But just a matter of taste. In the case of space, since it's
nearly invisible, could send your readers into a tailspin.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      parent reply	other threads:[~2020-10-30  8:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  3:53 String length 13 characters made of blank spaces Christopher Dimech
2020-10-30  5:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-30  8:05 ` Joost Kremers
2020-10-30  8:13   ` tomas
2020-11-02 22:34   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-30  8:12 ` tomas [this message]

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=20201030081218.GB26449@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.