From: Wojciech Meyer <wojciech.meyer@googlemail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: juri@jurta.org, Eli Zaretskii <eliz@gnu.org>,
emacs-devel@gnu.org, joakim@verona.se, deniz.a.m.dogan@gmail.com
Subject: Re: Refreshing Info nodes
Date: Mon, 13 Sep 2010 11:22:50 +0100 [thread overview]
Message-ID: <AANLkTimRT2OWWbFgwf1kca45gwagi=yxQ1sXazeLTKwb@mail.gmail.com> (raw)
In-Reply-To: <jwviq2avugs.fsf-monnier+emacs@gnu.org>
On Mon, Sep 13, 2010 at 11:11 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> Done. I am investigating possibility of using swap-buffer with
>> archive-mode.
>
> Great, but note that it's a separate issue to the one of using special-mode.
I know.. and I thought I could look at it later.
>
>> BTW: Maybe we should think about merging (at least reusing bits & pieces
>> and making user interface more consistent) tar-mode <-> archive-mode?
>
> Yes, bringing them closer would be good, indeed.
>
>> - changing `image-mode' to something else and wrapping the rest into
>> `defun' (ad-hoc solution, which I like at least)
>
> This solution you like least is the right one: image-mode should really
> be a command that sets the major-mode to image-mode, not a command that
> tries it and does something else if it can't be done. I.e. we need
> a separate command to do the "check if image-mode can be used, and call
> image-mode if possible".
>
OK.
>> Ideally in case of saving previous mode we should have a stack for this
>> (even better, stack with functions that restore previous state, but this
>> might be an overkill).
>
> The user might want to switch in a circular rather than stack fashion.
> Since we don't know how best to solve this general case, we stick to the
> only really use case we know, where the user switches between two modes
> (the doc-view/image-mode and the "see raw data" mode (can be
> fundamental-mode, ps-mode, c-mode, ...)).
Yes, I will do just major-mode swap for time being.
>
>> (define-derived-mode my-major-mode special-mode
>> :keymap 'my-major-mode-map
>> ...)
>
> This would encourage the use of non-standard naming, so I'd rather not
> go down that road.
Actually that's what i though initially.
>
>> As you notice I also think that defining key-maps should be easier.
>> Generally maybe we should do what's been done with `easy-menu' for maps.
>
> As you may have noticed in easy-mmode-define-keymap, I've toyed with
> this idea in the past. Maybe a `defkeymap' macro would be good, indeed,
> but it's not that important, I think.
>
>> +(define-derived-mode archive-mode special-mode "Archive mode"
> [...]
>> ;; Archive mode is suitable only for specially formatted data.
>> (put 'archive-mode 'mode-class 'special)
In the begining, I was not sure if i should leave those lines.
>
> The above line is made redundant by deriving from special-mode.
>
>> +(define-derived-mode bookmark-edit-annotation-mode nil "Edit Bookmark Annotation"
> [...]
>> (run-mode-hooks 'text-mode-hook))
>
> This run-mode-hooks is a good hint that the mode should actually derive
> from text-mode-hook.
That was my consideration too.
>
>> (put 'occur-mode 'mode-class 'special)
>> -(defun occur-mode ()
>> +(define-derived-mode occur-mode special-mode "Occur"
>
> Here also, the `put' is now redundant.
Yes.
>
>
> Stefan
>
Thank you,
I will send the final version soon.
Wojciech
next prev parent reply other threads:[~2010-09-13 10:22 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-13 17:51 Refreshing Info nodes Wojciech Meyer
2010-06-13 17:56 ` Deniz Dogan
2010-06-14 15:38 ` Juri Linkov
2010-06-14 18:34 ` Wojciech Meyer
2010-06-14 19:08 ` Stefan Monnier
2010-06-14 20:49 ` joakim
2010-06-14 21:59 ` Juri Linkov
2010-06-14 22:58 ` joakim
2010-06-15 21:35 ` Juri Linkov
2010-06-15 23:38 ` Wojciech Meyer
2010-06-16 13:39 ` Stefan Monnier
2010-06-16 20:43 ` Juri Linkov
2010-06-17 0:46 ` Stefan Monnier
2010-06-17 8:29 ` Juri Linkov
2010-08-28 20:38 ` Wojciech Meyer
2010-08-28 20:50 ` Eli Zaretskii
2010-08-28 22:17 ` Wojciech Meyer
2010-08-29 15:18 ` Wojciech Meyer
2010-09-11 13:19 ` Stefan Monnier
2010-09-11 14:00 ` Wojciech Meyer
2010-09-13 1:34 ` Wojciech Meyer
2010-09-13 10:11 ` Stefan Monnier
2010-09-13 10:22 ` Wojciech Meyer [this message]
2010-06-17 8:00 ` Richard Stallman
2010-06-17 8:52 ` Wojciech Meyer
2010-06-15 0:38 ` Stefan Monnier
2010-06-16 20:35 ` Juri Linkov
2010-06-17 0:49 ` Stefan Monnier
2010-06-15 3:00 ` Eli Zaretskii
2010-06-15 3:18 ` Drew Adams
2010-06-14 21:57 ` Juri Linkov
2010-06-15 0:42 ` Stefan Monnier
2010-06-16 20:33 ` Juri Linkov
2010-06-17 0:50 ` Stefan Monnier
2010-06-17 20:34 ` Juri Linkov
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='AANLkTimRT2OWWbFgwf1kca45gwagi=yxQ1sXazeLTKwb@mail.gmail.com' \
--to=wojciech.meyer@googlemail.com \
--cc=deniz.a.m.dogan@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=joakim@verona.se \
--cc=juri@jurta.org \
--cc=monnier@iro.umontreal.ca \
/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.