help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Skeleton & Abbrev


From: Tennis Smith
Subject: Re: Skeleton & Abbrev
Date: 29 Dec 2002 08:06:41 -0800

kai.grossjohann@uni-duisburg.de (Kai Großjohann wrote in message 
news:<847kdvkyfc.fsf@lucy.cs.uni-dortmund.de>...
> tennis_smith@yahoo.com (Tennis Smith) writes:
> 
> > So, when I type in _if in a tcl buffer, it should auto-expand to a new 
> > "if" statement stub. But, it doesn't do anything. I've turned on abbrev
> > mode and skeleton, but it doesn't make any difference.
> 
> Hm.  Underscore looks suspicious.  How about you try another abbrev,
> such as ifif?  Remember to type whitespace before and after the abbrev.

Thanks, that worked. :)  Also, how do I pass a var to the skeleton?  
For example:

(define-skeleton tcl-proc
  "A simple tcl proc skeleton" nil
  \n
  "#\n#\n#\n"
  "proc  PROC_NAME {  } {"
  \n
  _
  \n
  "} # end PROC_NAME "
)

How do I make "PROC_NAME" the contents of a var I pass at invocation time?

TIA,
-Tennis
>From help-gnu-emacs-bounces@gnu.org  Sun Dec 29 11:55:10 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!newsfeed.news2me.com!newsfeed-west.nntpserver.com!hub1.meganetnews.com!nntpserver.com!telocity-west!DIRECTV!sn-xit-03!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: Faheem Mitha <faheem@email.unc.edu>
Newsgroups: gnu.emacs.help
Date: Sun, 29 Dec 2002 16:54:58 -0000
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <slrnb0ua6f.194.faheem@Chrestomanci.home.earth>
References: <slrnb0t3f5.194.faheem@Chrestomanci.home.earth>
        <8465tdxde7.fsf@lucy.cs.uni-dortmund.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: slrn/0.9.7.4 (Linux)
X-Complaints-To: abuse@supernews.com
Lines: 25
Xref: shelby.stanford.edu gnu.emacs.help:108582
To: help-gnu-emacs@gnu.org
Subject: Re: emacs won't forget file state as saved by desktop.el
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 29 Dec 2002 16:55:10 -0000

On Sun, 29 Dec 2002 12:39:28 +0100, Kai Großjohann
<kai.grossjohann@uni-duisburg.de> wrote:
> Faheem Mitha <faheem@email.unc.edu> writes:
> 
>> I disabled desktop.el in my .emacs files and deleted .emacs.desktop
>> and thought that would be the end of the matter. But unfortunately
>> not. Whenever I open up reject1.tex I get it in fundamental mode and
>> with whizzytex enabled (so that advi pops up).
> 
> Does the string "-*-" (sans quotes) occur in the first line of the
> file?  Do the strings "Local Variables" and "End" (both sans quotes)
> occur near the end of the file?
> 
> If either, read the section on file variables in the Emacs
> documentation. 

Thanks for replying. It seems that the behaviour of whizzytex has
changed in the most recent upload (I'm tracking Debian testing) and it
is now enabled on every latex file by default and interferes with
auctex etc., but I didn't realise it. I generally use multifile
documents, and whizzytex dies on those, so I didn't realise anything
had changed. Sorry for bothering the group. I guess I'd better file a
bug report. (Sigh).

                                                       Faheem.
>From help-gnu-emacs-bounces@gnu.org  Sun Dec 29 12:00:11 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!fu-berlin.de!uni-berlin.de!pd951f026.dip.t-dialin.NET!not-for-mail
From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=)
Newsgroups: gnu.emacs.help
Date: Sun, 29 Dec 2002 17:55:33 +0100
Organization: University of Dortmund, Germany
Lines: 14
Message-ID: <84el80pxx6.fsf@lucy.cs.uni-dortmund.de>
References: <7f477f72.0212261731.364e59fd@posting.google.com>
        <847kdvkyfc.fsf@lucy.cs.uni-dortmund.de>
        <7f477f72.0212290806.2224eef5@posting.google.com>
NNTP-Posting-Host: pd951f026.dip.t-dialin.net (217.81.240.38)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 1041180952 8862118 217.81.240.38 (16 [73968])
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50
 (i686-pc-linux-gnu)
Cancel-Lock: sha1:ADTMD8ieQGTTQA6KJcDpSgeTh0w=
Xref: shelby.stanford.edu gnu.emacs.help:108583
To: help-gnu-emacs@gnu.org
Subject: Re: Skeleton & Abbrev
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 29 Dec 2002 17:00:11 -0000

tennis_smith@yahoo.com (Tennis Smith) writes:

> How do I make "PROC_NAME" the contents of a var I pass at invocation time?

I'm not sure that define-skeleton is the right way to do that.

Do you want the user to type in the name of the procedure?
Investigate "interactors" in the skeleton documentation.

If you really want to call the skeleton programmatically and pass
args to it, I suggest that you instead write a function which invokes
skeleton-insert.  That function can then receive arguments.
-- 
Ambibibentists unite!
>From help-gnu-emacs-bounces@gnu.org  Sun Dec 29 12:00:11 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!fu-berlin.de!uni-berlin.de!pd951f026.dip.t-dialin.NET!not-for-mail
From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=)
Newsgroups: gnu.emacs.help
Date: Sun, 29 Dec 2002 17:57:48 +0100
Organization: University of Dortmund, Germany
Lines: 26
Message-ID: <84bs34pxtf.fsf@lucy.cs.uni-dortmund.de>
References: <mailman.677.1041122911.19936.help-gnu-emacs@gnu.org>
        <84bs35xdlw.fsf@lucy.cs.uni-dortmund.de>
NNTP-Posting-Host: pd951f026.dip.t-dialin.net (217.81.240.38)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1041181086 8862118 217.81.240.38 (16 [73968])
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50
 (i686-pc-linux-gnu)
Cancel-Lock: sha1:tQS6XlGLOB66vFRTJUvXMk3Jxts=
Xref: shelby.stanford.edu gnu.emacs.help:108584
To: help-gnu-emacs@gnu.org
Subject: Re: filtering output from compile
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 29 Dec 2002 17:00:11 -0000

kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> "Theepa Somasundaram" <theepa@hemphil.f9.co.uk> writes:
>
>> I have a Make file which contains a line like,
>>         gdb dummy.exe
>> I run the make file from Emacs in compile mode. I would like Emacs
>> not to send the command to the shell and instead to execute the
>> debugger within Emacs, as if I had started the debugger with a
>> shotcut key.
>
> It is not possible for make to talk back to Emacs to do stuff.  So
> you will have to circumvent make.
>
> I suggest you try M-x gdb RET.

I forgot to mention that it might be possible to change the command
line.  M-x gdb RET offers you to type a command.  You could try
typing "make frumple" there, if frumple is the target that invokes
the debugger in the end.

But this might fail because M-x gdb RET does some magic with the
command line that you type.  Investigate the function
gud-gdb-massage-args for the gory details.
-- 
Ambibibentists unite!
>From help-gnu-emacs-bounces@gnu.org  Sun Dec 29 12:05:10 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!pd951f026.dip.t-dialin.NET!not-for-mail
From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=)
Newsgroups: gnu.emacs.help
Date: Sun, 29 Dec 2002 17:59:57 +0100
Organization: University of Dortmund, Germany
Lines: 19
Message-ID: <848yy8pxpu.fsf@lucy.cs.uni-dortmund.de>
References: <mailman.687.1041177644.19936.help-gnu-emacs@gnu.org>
NNTP-Posting-Host: pd951f026.dip.t-dialin.net (217.81.240.38)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 1041181215 8862118 217.81.240.38 (16 [73968])
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50
 (i686-pc-linux-gnu)
Cancel-Lock: sha1:1MaifJsrbdHTSxa8EvG1UzfueAg=
Xref: shelby.stanford.edu gnu.emacs.help:108585
To: help-gnu-emacs@gnu.org
Subject: Re: filtering output to the *compilation* buffer
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 29 Dec 2002 17:05:10 -0000

"Theepa Somasundaram" <theepa@hemphil.f9.co.uk> writes:

> Within emacs, using elisp, is there any way of filtering the output
> to a compilation buffer?
>
> for instance if the shell echoes the line, 
>             "gud dummy.exe"
> can I pick it from compile.el, or something, and call my own
> function, which might start the debugger?

Of course, you can search the *compilation* buffer and then extract a
line from it and so on.

But I think that's not the right approach.  Investigate the
call-make-from-M-x-gdb approach that I suggested in the other message.

Alas, you might have to fiddle with the Lisp source...
-- 
Ambibibentists unite!
>From ehud@unix.mvs.co.il Sun Dec 29 12:37:26 2002
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18ShMl-0001bF-00
        for help-gnu-emacs@gnu.org; Sun, 29 Dec 2002 12:36:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18ShMU-0000kX-00
        for help-gnu-emacs@gnu.org; Sun, 29 Dec 2002 12:36:36 -0500
Received: from unix.sw.co.il ([192.114.178.12] helo=unix.mvs.co.il)
        by monty-python.gnu.org with esmtp (Exim 4.10.13)
        id 18ShMK-00009j-00
        for help-gnu-emacs@gnu.org; Sun, 29 Dec 2002 12:36:20 -0500
Received: from beta.mvs.co.il (beta [10.253.0.3])
        by unix.mvs.co.il (8.11.6/8.11.6) with ESMTP id gBTHYhh25107;
        Sun, 29 Dec 2002 19:34:43 +0200
Received: from beta.mvs.co.il (localhost [127.0.0.1])
        by beta.mvs.co.il (8.12.5/8.12.5) with ESMTP id gBTHYfed006531;
        Sun, 29 Dec 2002 19:34:42 +0200
Received: (from ehud@localhost)
        by beta.mvs.co.il (8.12.5/8.12.5/Submit) id gBTHYetV006525;
        Sun, 29 Dec 2002 19:34:40 +0200
Date: Sun, 29 Dec 2002 19:34:40 +0200
Message-Id: <200212291734.gBTHYetV006525@beta.mvs.co.il>
X-Authentication-Warning: beta.mvs.co.il: ehud set sender to
        ehud@unix.mvs.co.il using -f
From: "Ehud Karni" <ehud@unix.mvs.co.il>
To: "Uwe Ziegenhagen" <isestd14@wiwi.hu-berlin.de>
In-reply-to: <aufpr7$7d2$1@lnews.rz.hu-berlin.de> (message from Uwe
        Ziegenhagen on Thu, 26 Dec 2002 21:46:28 +0100)
Organization: Mivtach-Simon Insurance agencies
References: <aufpr7$7d2$1@lnews.rz.hu-berlin.de>
X-Mailer: Emacs 21.2.91.3 rmail (send-msg 1.106)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-8
Content-Transfer-Encoding: 7bit
cc: help-gnu-emacs@gnu.org
Subject: Re: How to have Emacs ignore Case and list Dirs first with
        dired-sort-menu
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: ehud@unix.mvs.co.il
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 29 Dec 2002 17:37:26 -0000

On Thu, 26 Dec 2002 21:46:28 +0100, Uwe Ziegenhagen 
<isestd14@wiwi.hu-berlin.de> wrote:
> 
> I even set (setq ls-lisp-dirs-first t) and (setq ls-lisp-ignore-case t), 
> but this is ignored.
> 
> 
> (add-hook 'dired-load-hook
> (lambda () (load-library "ls-lisp")))
> 
> [snip]
> 
> ; this should do it, but somehow doesn't work
> ;
> (setq ls-lisp-dirs-first t)
> (setq ls-lisp-ignore-case t)

You are setting the variables before their package is loaded. (when
`ls-lisp' is loaded they get default values according to your OS).

Do something like this:

(defun my-dired-changes ()
   "Set my preferences for dired"
    (require 'ls-lisp)  
    (require 'dired-explore)       ;I don't find these 
    (require 'dired-sort-menu)     ;packages in 21.2
    (setq ls-lisp-dirs-first t)
    (setq ls-lisp-ignore-case t))

(add-hook 'dired-load-hook 'my-dired-changes)

That will load the packages after the `dired' is loaded and THEN set
the needed variables.

Ehud.


-- 
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:ehud@unix.mvs.co.il                  Better  Safe  Than  Sorry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]