emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Wes Hardaker <wjhns209@hardakers.net>
Cc: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: Re: Suggestion with bad patch for org-remember-templates
Date: Sat, 3 Jan 2009 18:26:16 +0100	[thread overview]
Message-ID: <F86E5410-6D76-4880-A213-BFDBF84E55F9@uva.nl> (raw)
In-Reply-To: <sdtz8k5p7d.fsf@wes.hardakers.net>

Hi Wes,

yes, a better display of the remember template options would be useful.
However, right now the remember interface, because I believe that
James is working on a rewrite of the remember integration.  Maybe he
wants to put this on his list?

- Carsten

On Dec 31, 2008, at 4:39 PM, Wes Hardaker wrote:

>
> My templates for remind are numerous.  So much that they don't fit  
> in a
> single mini-buffer line (and I stopped using auto-expanding  
> minibuffers
> years ago when I had issues with it; I suspect it's safer now and I  
> just
> haven't tried again).
>
> But anyway, I started thinking: you know...  that *Remember* buffer is
> sitting there open and blank when selecting a template.  Can't we put
> the list of templates there?  So I hacked together a quick patch to  
> put
> the contents in the *Remember* buffer and it works just fine.  I'm not
> an expert elisp hacker as I dabble in it only every few years, hence  
> the
> reason "bad" is in the subject line.  It's also left as an exercise to
> the reader to make the inserted contents prettier (like a table,  
> rather
> than one item per line).
>
> --- org-remember.el.~1~ 2008-10-25 03:57:02.000000000 -0700
> +++ org-remember.el     2008-12-26 06:32:51.000000000 -0800
> @@ -286,7 +286,23 @@
>                           (string-to-char org-force-remember- 
> template-char)
>                         org-force-remember-template-char))
>                      (t
> -                      (message "Select template: %s"
> +                      (let ((currbuf (current-buffer)))
> +                        (switch-to-buffer remember-buffer t)
> +                        (erase-buffer)
> +                        (insert "Select template:\n"
> +                         (mapconcat
> +                          (lambda (x)
> +                            (cond
> +                             ((not (string-match "\\S-" (nth 1 x)))
> +                              (format "  [%c]" (car x)))
> +                             ((equal (downcase (car x))
> +                                     (downcase (aref (nth 1 x) 0)))
> +                              (format "  [%c]%s" (car x)
> +                                      (substring (nth 1 x) 1)))
> +                             (t (format "  [%c]%s" (car x) (nth 1  
> x)))))
> +                          templates "  \n"))
> +                        (switch-to-buffer currbuf t))
> +                        (message "Select template: %s"
>                                (mapconcat
>                                 (lambda (x)
>                                   (cond
>
> -- 
> "In the bathtub of history the truth is harder to hold than the soap,
> and much more difficult to find."  -- Terry Pratchett
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-01-03 17:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-31 15:39 Suggestion with bad patch for org-remember-templates Wes Hardaker
2009-01-03 17:26 ` Carsten Dominik [this message]
2009-01-03 18:45   ` James TD Smith
2009-01-04  7:23     ` Carsten Dominik
2009-01-05 16:31       ` Wes Hardaker
2009-01-05 18:41         ` Carsten Dominik
2009-01-06 14:32           ` Wes Hardaker
2009-01-06 15:17             ` Carsten Dominik
2009-01-06 23:06           ` James TD Smith
2009-01-05 16:30     ` Wes Hardaker

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F86E5410-6D76-4880-A213-BFDBF84E55F9@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=wjhns209@hardakers.net \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).