all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "B. T. Raven" <nihil@nihilo.net>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs mode line suggestions
Date: Mon, 17 Nov 2008 22:58:35 -0600	[thread overview]
Message-ID: <TIOdnScx8NXl1r_UnZ2dnUVZ_vWdnZ2d@sysmatrix.net> (raw)
In-Reply-To: <a505a002-047f-4d34-b752-95a2081c9b3e@k24g2000pri.googlegroups.com>

Xah wrote:
> On Nov 17, 6:33 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
>> But if a user is interested in working with Emacs rather than just 
>> playing with it, she will know the suffix that will trigger the
>> correct mode.
> 
> You missed the point. When a programer work with multiple langs, and 
> when he create a buffer for scratch purposes, there is a need to 
> switch to switch mode.

If he creates it then he will have to name it. Let the mode depend on
the name. I can see (sort of) why assembler might need to be in a .c
buffer but you certainly don't need text blocks from many different
languages in the same temp buffer, do you? Why? On the off chance that
you really do need all of them then it seems that some new mixed mode
should be designed.

> 
> It is not playing with emacs.
> 
> For example, i program in elisp and perl. So, say, i created a buffer
>  xx for scratch purposes to code some elisp. Then, suddenly my 
> contractor called and needed some code fixed quickly. I immediatly
> get to work, and i want to switch my xx buffer to perl mode, and
> start coding perl there.

This scenario seems very unworkmanlike to me. If a contractor needs code
fixed, then that code is likely to be in a file with a suffix .pl or
.perl or whatever. Why not just go to that file and then you would
automatically be in the right mode. If you put elisp and perl in the
same temp buffer you are going to have to segregate them later anyway,
right? Why not do it now by creating a new temp buffer in the right
mode? I don't know why you need one but I am not a programmer.

> 
> however, i'm emacs newbie, i dunno that the mode switching command. 
> So, i click on the majo mode name in the buffer, get a list, then 
> there i can switch.
> 
>> So if there is a programming language Brainfsck, then it's mode 
>> might be switched to by visiting a file named scratch.ppp.
> 
> not quite sure what you mean. I'm guessing what you mean is that the 
> suffix now may not correspond to the mode. Not so, because switching 
> mode is a conscious decision, not something happens automatically.

I was being cute and therefore obscure. Say the extension is .bfk rather
than .ppp; it doesn't affect the argument. Anyway, deciding that you
want only a temp buffer (in some mode) rather than one associated with a
file is also a conscious decision. Most such decisions will be conscious
unless they are side effects implicit in some other conscious decision(s).

> 
>> If this worked correctly it would work faster than anything you
>> could do with the mouse on the mode line.
> 
> remember, the context is ease of use for those who just started to
> use emacs, and the context is about the the behavior of clicking the
> mode line. The argument in this subthread, is NOT about switching
> mode in general. For example, as most emacs users known, you simply
> switch mode by Alt+x ‹mode name›.

So you are saying that the mode line should be not only informational
but also executive. But that's what the menu is for. I find Eli's
arguments more cogent. I suspect that your tastes derive from Redmond
based software. De gustibus non est disputandum.
Anyway I still would like to go to iswitchb via C-x b and enter a
non-existent buffer name like scratch.el.abb and be in Emacs lisp major
mode and abbrev minor mode. Of course this buffer name isn't a good name
for a file but if you want this temp buffer saved you can do C-x C-w
instead of C-x C-s.
Maybe it's not a good idea though. We newbies tend to want more freedom
than we can handle before the basics are mastered.


> 
> So, my argument is that clicking on the major mode in the mode line 
> should pop up a list of commonly used lang's modes.
> 
>> Fortunately (or maybe not) you are correct that suffix-mode 
>> correspondences aren't always intuitive. For instance, I press C-x
>> b and then type in a new (temporary)buffer name like scratch.el *
>> The buffer is created but it is in Text mode (my default) until I
>> do either C-x C-w or M-x emacs-lisp-mode. But if I save it I now
>> have an empty file with that name in my default directory, which I
>> will eventually have to delete. It would be better (imho) if the
>> buffer switched to the mode indicated by the buffer name suffix
>> immediately after creation. But it may be that we are wrong about
>> that since, in the context of the big picture, it may seem hokey to
>> the developers to give a suffix to a temporary buffer name.
>> 
>> * Just for the sake of example. Of course there already is a buffer
>>  *scratch* set to the correct mode
>> 
>> Ed
> 
> Xah ∑ http://xahlee.org/
> 
> ☄


  reply	other threads:[~2008-11-18  4:58 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.215.1226562978.26697.help-gnu-emacs@gnu.org>
2008-11-14 23:18 ` emacs mode line suggestions Xah
2008-11-15  1:02   ` xahlee
2008-11-15  9:23   ` Eli Zaretskii
     [not found]   ` <mailman.423.1226741023.26697.help-gnu-emacs@gnu.org>
2008-11-16  1:54     ` Xah
2008-11-16 18:12       ` Ian Eure
2008-11-18  9:39         ` Kevin Rodgers
2008-11-18 23:25           ` Xavier Maillard
2008-11-16 21:40       ` Eli Zaretskii
     [not found]       ` <mailman.518.1226859137.26697.help-gnu-emacs@gnu.org>
2008-11-16 18:20         ` Richard Riley
2008-11-16 23:12           ` Ian Eure
2008-11-17  8:37             ` Paul R
2008-11-17 15:45               ` Drew Adams
     [not found]               ` <mailman.604.1226937124.26697.help-gnu-emacs@gnu.org>
2008-11-17 16:11                 ` Richard Riley
2008-11-17 18:53                   ` Drew Adams
2008-11-17 19:10                     ` Richard Riley
2008-11-17 19:57                       ` Drew Adams
2008-11-17 20:53                       ` Eli Zaretskii
     [not found]                       ` <mailman.621.1226951870.26697.help-gnu-emacs@gnu.org>
2008-11-17 21:42                         ` Richard Riley
2008-11-18  0:55                           ` Drew Adams
     [not found]                           ` <mailman.641.1226969742.26697.help-gnu-emacs@gnu.org>
2008-11-18  1:08                             ` Richard Riley
2008-11-18  2:55                               ` Drew Adams
2008-11-17 23:37               ` Alan Mackenzie
2008-11-18  7:52                 ` Paul R
2008-11-18 13:48                   ` Alan Mackenzie
     [not found]           ` <mailman.543.1226877138.26697.help-gnu-emacs@gnu.org>
2008-11-16 23:35             ` Richard Riley
2008-11-16 22:45         ` Xah
     [not found]       ` <mailman.536.1226871605.26697.help-gnu-emacs@gnu.org>
2008-11-16 23:17         ` Xah
2008-11-17 20:39           ` Eli Zaretskii
2008-11-17 23:46             ` Alan Mackenzie
2008-11-18  0:31               ` Lennart Borgman
2008-11-18  9:32               ` Kevin Rodgers
2008-11-18  9:58                 ` Alan Mackenzie
     [not found]             ` <mailman.633.1226964831.26697.help-gnu-emacs@gnu.org>
2008-11-18  9:46               ` Fabrice Niessen
     [not found]           ` <mailman.623.1226954396.26697.help-gnu-emacs@gnu.org>
2008-11-17 22:09             ` Xah
2008-11-18  2:33               ` B. T. Raven
2008-11-18  3:24                 ` Xah
2008-11-18  4:58                   ` B. T. Raven [this message]
2008-11-18  6:54                     ` Richard Riley
2008-11-18  4:11               ` Eli Zaretskii

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=TIOdnScx8NXl1r_UnZ2dnUVZ_vWdnZ2d@sysmatrix.net \
    --to=nihil@nihilo.net \
    --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.