all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* customize type spec not being followed?
@ 2017-12-24 11:46 Rusi
  2017-12-24 12:01 ` Philipp Stephani
       [not found] ` <mailman.6291.1514116912.27995.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Rusi @ 2017-12-24 11:46 UTC (permalink / raw)
  To: help-gnu-emacs

When I do C-h v: org-structure-template-alist

I see:
-----------------
org-structure-template-alist is a variable defined in ‘org.el’.
Its value is shown below.

<description>

Value: ((97 . "export ascii")
 (99 . "center")
 (67 . "comment")
 (101 . "example")
 (69 . "export")
 (104 . "export html")
 (108 . "export latex")
 (113 . "quote")
 (115 . "src")
 (118 . "verse"))
---------------------

Its definition pointed to from above is
----------------------
(defcustom org-structure-template-alist
  '((?a . "export ascii")
    (?c . "center")
    (?C . "comment")
    (?e . "example")
    (?E . "export")
    (?h . "export html")
    (?l . "export latex")
    (?q . "quote")
    (?s . "src")
    (?v . "verse"))
  "Structure completion elements.
This is an alist of characters and values.  When
`org-insert-structure-template' is called, an additional key is
read.  The key is first looked up in this alist, and the
corresponding structure is inserted, with \"#+BEGIN_\" and
\"#+END_\" added automatically."
  :group 'org-edit-structure
  :type '(repeat
	  (cons (character :tag "Key")
		(string :tag "Template")))
  :package-version '(Org . "9.2"))
--------------------------

So my question: When the type says character why does it show as integer?


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

* Re: customize type spec not being followed?
  2017-12-24 11:46 customize type spec not being followed? Rusi
@ 2017-12-24 12:01 ` Philipp Stephani
       [not found] ` <mailman.6291.1514116912.27995.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Philipp Stephani @ 2017-12-24 12:01 UTC (permalink / raw)
  To: Rusi; +Cc: help-gnu-emacs

Rusi <rustompmody@gmail.com> schrieb am So., 24. Dez. 2017 um 12:50 Uhr:

>
> So my question: When the type says character why does it show as integer?
>

Because characters are integers. See
https://www.gnu.org/software/emacs/manual/html_node/elisp/Character-Type.html
.


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

* Re: customize type spec not being followed?
       [not found] ` <mailman.6291.1514116912.27995.help-gnu-emacs@gnu.org>
@ 2017-12-24 12:05   ` Rusi
  2017-12-24 12:34     ` Philipp Stephani
  0 siblings, 1 reply; 4+ messages in thread
From: Rusi @ 2017-12-24 12:05 UTC (permalink / raw)
  To: help-gnu-emacs

On Sunday, December 24, 2017 at 5:31:55 PM UTC+5:30, Philipp Stephani wrote:
> Rusi  schrieb am So., 24. Dez. 2017 um 12:50 Uhr:
> 
> >
> > So my question: When the type says character why does it show as integer?
> >
> 
> Because characters are integers. See
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Character-Type.html
> .

In (info "(elisp)simple types")
we find

‘character’
     The value must be a character code.  A character code is actually
     an integer, but this type shows the value by inserting the
     character in the buffer, rather than by showing the number.


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

* Re: customize type spec not being followed?
  2017-12-24 12:05   ` Rusi
@ 2017-12-24 12:34     ` Philipp Stephani
  0 siblings, 0 replies; 4+ messages in thread
From: Philipp Stephani @ 2017-12-24 12:34 UTC (permalink / raw)
  To: Rusi; +Cc: help-gnu-emacs

Rusi <rustompmody@gmail.com> schrieb am So., 24. Dez. 2017 um 13:10 Uhr:

> On Sunday, December 24, 2017 at 5:31:55 PM UTC+5:30, Philipp Stephani
> wrote:
> > Rusi  schrieb am So., 24. Dez. 2017 um 12:50 Uhr:
> >
> > >
> > > So my question: When the type says character why does it show as
> integer?
> > >
> >
> > Because characters are integers. See
> >
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Character-Type.html
> > .
>
> In (info "(elisp)simple types")
> we find
>
> ‘character’
>      The value must be a character code.  A character code is actually
>      an integer, but this type shows the value by inserting the
>      character in the buffer, rather than by showing the number.
>


Ah, that only describes the behavior of the Customize widget, the help
screen is unrelated. `describe-variable' uses `prin1-to-string', which
doesn't know about customization types.


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

end of thread, other threads:[~2017-12-24 12:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-24 11:46 customize type spec not being followed? Rusi
2017-12-24 12:01 ` Philipp Stephani
     [not found] ` <mailman.6291.1514116912.27995.help-gnu-emacs@gnu.org>
2017-12-24 12:05   ` Rusi
2017-12-24 12:34     ` Philipp Stephani

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.