all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: What standard library to use to provide settings editing to user?
Date: Thu, 28 Feb 2013 20:52:48 +0200	[thread overview]
Message-ID: <87ehg0feyn.fsf@gavenkoa.example.com> (raw)
In-Reply-To: 87ip5mvjw6.fsf@gavenkoa.example.com

On 2013-02-20, Oleksandr Gavenko wrote:

> I write blogging mode and want to provide ability to users to list and edit
> connection settings.
>
> As I use external program to do actual authentication and network jobs so I
> don't use Emacs variables for storing settings.
>
> External process send list of parameters and their values. I should show them
> to user and return user modifications back to external process.
>
> Every parameter have a name and string value (possibly multi-line).
>
> What libraries or code examples are usable for solving such task?

Firstly I try use low level API:

  (info "(elisp) Text Properties")

but stuck with:

  (info "(elisp) Sticky Properties")

when I need to code boundary between editable and read-only areas...

After looking how is work "M-x customize-mode" I found:

  (info "(widget)")

Some practice and I get working code. Most useful feature is 'widget-value'
function.

But some parts are very hard to understand. For example how can I make custom
face in widget-insert? I use such code, it work but I don't know if this right
usage:

    (put-text-property 0 (length blog4y*conf-header-id) 'face 'bold blog4y*conf-header-id)
    (widget-insert blog4y*conf-header-id id "\n\n")

-- 
Best regards!




      reply	other threads:[~2013-02-28 18:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 19:56 What standard library to use to provide settings editing to user? Oleksandr Gavenko
2013-02-28 18:52 ` Oleksandr Gavenko [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=87ehg0feyn.fsf@gavenkoa.example.com \
    --to=gavenkoa@gmail.com \
    --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.