unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* tumme and keyboard macros.
@ 2006-07-25 10:03 Matt Hodges
  2006-07-25 15:20 ` Mathias Dahl
  2006-07-25 16:30 ` Mathias Dahl
  0 siblings, 2 replies; 7+ messages in thread
From: Matt Hodges @ 2006-07-25 10:03 UTC (permalink / raw


It might be useful for tumme-forward-char and tumme-backward-char
(perhaps tumme-{forward/backward}-image would be better names?) to
signal an error from the last and first thumbnails respectively.  This
would make useful `C-u 0 C-x e' type execution of keyboard macros in
*tumme* buffers.

(Support for prefix args would be good for all the movement commands.)

Thanks,

Matt

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

* Re: tumme and keyboard macros.
  2006-07-25 10:03 tumme and keyboard macros Matt Hodges
@ 2006-07-25 15:20 ` Mathias Dahl
  2006-07-25 15:34   ` Mathias Dahl
  2006-07-25 16:30 ` Mathias Dahl
  1 sibling, 1 reply; 7+ messages in thread
From: Mathias Dahl @ 2006-07-25 15:20 UTC (permalink / raw
  Cc: emacs-devel

> It might be useful for tumme-forward-char and tumme-backward-char
> (perhaps tumme-{forward/backward}-image would be better names?)

Yes, those might be better names.

> to
> signal an error from the last and first thumbnails respectively.  This
> would make useful `C-u 0 C-x e' type execution of keyboard macros in
> *tumme* buffers.

I don't see how such a keyboard macro would be useful; can you
explain? If you want to have a way to move to the beginning and end of
the tumme buffer, maybe it's better to add such commands instead? Or
we could do both.

> (Support for prefix args would be good for all the movement commands.)

Personally I seldom or never use prefix args for the movement commands
in Emacs, but as they are so many commends that does support it, I
guess people would find such an addition useful.

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

* Re: tumme and keyboard macros.
  2006-07-25 15:20 ` Mathias Dahl
@ 2006-07-25 15:34   ` Mathias Dahl
  2006-07-25 17:27     ` Matt Hodges
  0 siblings, 1 reply; 7+ messages in thread
From: Mathias Dahl @ 2006-07-25 15:34 UTC (permalink / raw
  Cc: emacs-devel

> > signal an error from the last and first thumbnails respectively.  This
> > would make useful `C-u 0 C-x e' type execution of keyboard macros in
> > *tumme* buffers.
>
> I don't see how such a keyboard macro would be useful; can you
> explain? If you want to have a way to move to the beginning and end of
> the tumme buffer, maybe it's better to add such commands instead? Or
> we could do both.

Sorry for that, I read your e-mail to quickly. I though the macro
would only consist of `tumme-forward-char' or `tumme-backward-char'
but of course they can be more complex than that and do whatever cool
stuff you want to do. I will think about this.

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

* Re: tumme and keyboard macros.
  2006-07-25 10:03 tumme and keyboard macros Matt Hodges
  2006-07-25 15:20 ` Mathias Dahl
@ 2006-07-25 16:30 ` Mathias Dahl
  2006-07-26  6:28   ` Matt Hodges
  1 sibling, 1 reply; 7+ messages in thread
From: Mathias Dahl @ 2006-07-25 16:30 UTC (permalink / raw
  Cc: emacs-devel

> It might be useful for tumme-forward-char and tumme-backward-char
> (perhaps tumme-{forward/backward}-image would be better names?) to
> signal an error from the last and first thumbnails respectively.  This
> would make useful `C-u 0 C-x e' type execution of keyboard macros in
> *tumme* buffers.
>
> (Support for prefix args would be good for all the movement commands.)

I just commited a rename of those commands. Also, below is a new
version of `tumme-forward-image' with the changes you asked for.
Please try it out:

(defun tumme-forward-image (&optional arg)
  "Move to next image and display properties.
Optional prefix ARG says how many images to move; default is one
image."
  (interactive "p")
  (let (pos (steps (or arg 1)))
    (dotimes (i steps)
      (if (save-excursion
            (forward-char)
            (while (and (not (eobp))
                        (not (tumme-image-at-point-p)))
              (forward-char))
            (setq pos (point))
            (tumme-image-at-point-p))
          (goto-char pos)
        (error "No more images"))))
  (when tumme-track-movement
    (tumme-track-original-file))
  (tumme-display-thumb-properties))

/Mathias

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

* Re: tumme and keyboard macros.
  2006-07-25 15:34   ` Mathias Dahl
@ 2006-07-25 17:27     ` Matt Hodges
  0 siblings, 0 replies; 7+ messages in thread
From: Matt Hodges @ 2006-07-25 17:27 UTC (permalink / raw
  Cc: emacs-devel

>>>>> Mathias Dahl writes:

 > Sorry for that, I read your e-mail to quickly. I though the macro
 > would only consist of `tumme-forward-char' or `tumme-backward-char'
 > but of course they can be more complex than that and do whatever
 > cool stuff you want to do. I will think about this.

Yes, that was what I had in mind.  Thanks.

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

* Re: tumme and keyboard macros.
  2006-07-25 16:30 ` Mathias Dahl
@ 2006-07-26  6:28   ` Matt Hodges
  2006-07-26  9:57     ` Mathias Dahl
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Hodges @ 2006-07-26  6:28 UTC (permalink / raw


>>>>> Mathias Dahl writes:

 > I just commited a rename of those commands. Also, below is a new
 > version of `tumme-forward-image' with the changes you asked for.
 > Please try it out:

Works for me.  Thanks.

Matt

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

* Re: tumme and keyboard macros.
  2006-07-26  6:28   ` Matt Hodges
@ 2006-07-26  9:57     ` Mathias Dahl
  0 siblings, 0 replies; 7+ messages in thread
From: Mathias Dahl @ 2006-07-26  9:57 UTC (permalink / raw
  Cc: emacs-devel

>  > I just commited a rename of those commands. Also, below is a new
>  > version of `tumme-forward-image' with the changes you asked for.
>  > Please try it out:
>
> Works for me.  Thanks.

I commited this and also a new version of `tumme-backward-image' with
similar changes.

/Mathias

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-25 10:03 tumme and keyboard macros Matt Hodges
2006-07-25 15:20 ` Mathias Dahl
2006-07-25 15:34   ` Mathias Dahl
2006-07-25 17:27     ` Matt Hodges
2006-07-25 16:30 ` Mathias Dahl
2006-07-26  6:28   ` Matt Hodges
2006-07-26  9:57     ` Mathias Dahl

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).