Strange... it worked for me. (Shell history copied below)  Could you
describe the error you experienced in more detail?

I've also attached a copy of the .m script, you could try that.

Best,
-Hunter

$ hgm@miata:~/Sandbox/ML_emacs $ cvs -z3
-d:pserver:anonym...@a.cvs.sourceforge.net:/cvsroot/matlab-emacs co -P
matlab-emacs
cvs checkout: Updating matlab-emacs
U matlab-emacs/.cvsignore
U matlab-emacs/ChangeLog
U matlab-emacs/ChangeLog.old1
U matlab-emacs/ChangeLog.old2
U matlab-emacs/INSTALL
U matlab-emacs/Makefile
U matlab-emacs/Project.ede
U matlab-emacs/README
U matlab-emacs/cedet-matlab.el
U matlab-emacs/company-matlab-shell.el
U matlab-emacs/dl_emacs_support.m
U matlab-emacs/linemark.el
U matlab-emacs/matlab-load.el
U matlab-emacs/matlab-publish.el
U matlab-emacs/matlab.el
U matlab-emacs/mlint.el
U matlab-emacs/semantic-matlab.el
U matlab-emacs/semanticdb-matlab.el
U matlab-emacs/srecode-matlab.el
U matlab-emacs/tlc.el
cvs checkout: Updating matlab-emacs/templates
U matlab-emacs/templates/Makefile
U matlab-emacs/templates/Project.ede
U matlab-emacs/templates/srecode-matlab.srt
cvs checkout: Updating matlab-emacs/toolbox
U matlab-emacs/toolbox/Makefile
U matlab-emacs/toolbox/Project.ede
U matlab-emacs/toolbox/emacsdocomplete.m
U matlab-emacs/toolbox/emacsinit.m
U matlab-emacs/toolbox/opentoline.m



On Wed, Jan 24, 2018 at 1:42 PM, Liu, Jiaen <jiaen....@gmail.com> wrote:

> Hi
>
> I am new to use matlab mode in emacs. I followed the link to download
> emacs-matlab by
> cvs -z3 
> -d:pserver:anonym...@matlab-emacs.cvs.sourceforge.net:/cvsroot/matlab-emacs
> co -P matlab-emacs
> But it doesn't work. It seems the connection is broken. Could anyone let
> me know how to download the files?
>
> Thanks,
>
> Jiaen
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Matlab-emacs-discuss mailing list
> Matlab-emacs-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss
>
>
function dl_emacs_support(varargin)
% Download MATLAB support files for Emacs
%
% DL_EMACS_SUPPRT - download all Emacs support files into the
%   current directory.
%
% DL_EMACS_SUPPORT(FILESET) - download a FILESET of Emacs support.
% Sets are:
%  dl - Download a new version of this download script.
%  core - Just the core MATLAB support files.
%  tlc - Just the core MATLAB/TLC support files.
%  cedet - Core, plus additional support for MATLAB using CEDET support.
%          Learn more about CEDET at: http://cedet.sf.net
%  support - Just the build files and READMEs for compiling.
%  all - All files
%
% DL_EMACS_SUPPORT(FILESET,DEST) - download FILESET and save in
%   destination directory DEST 
%
% For the most reliable refresh of the repository, run these two
% commands, the frist will make sure the downloader is current.
%
%    dl_emacs_support dl
%    dl_emacs_support
%
% On unix, you can then execute:
%
%   !make
%
% to compile.

    po = inputParser;
    
    addOptional(po, 'fileset', 'all', @ischar)
    addOptional(po, 'destination', pwd, @ischar)
    
    po.parse(varargin{:});

    stuff = po.Results;
    
    if exist(stuff.destination,'dir') ~= 7
        error(['The folder: ''',stuff.destination, ''', does not exist.']);
    end

    downloader = { 'dl_emacs_support.m' };
    
    coreFiles = { 'matlab-load.el' 'matlab.el' 'mlint.el' ...
                  'matlab-publish.el' 'company-matlab-shell.el' ...
                  'linemark.el' ...
                  'toolbox/emacsinit.m' 'toolbox/opentoline.m' 'toolbox/emacsdocomplete.m' };
    tlcFiles = { 'tlc.el' };
    cedetFiles = { 'cedet-matlab.el' 'semantic-matlab.el' ...
                   'semanticdb-matlab.el' 'srecode-matlab.el' ...
                   'templates/srecode-matlab.srt' };
    supportFiles = { 'README' 'INSTALL' 'ChangeLog' ...
                     'Project.ede'  'Makefile' ...
                     'toolbox/Project.ede' 'toolbox/Makefile' ...
                     'templates/Project.ede' 'templates/Makefile'};
    
    switch stuff.fileset
      case 'dl'
        getfiles(downloader);
      case 'core'
        mktoolboxdir
        getfiles(coreFiles);
      case 'tlc'
        mktoolboxdir
        getfiles(coreFiles);
        getfiles(tlcFiles);
      case 'cedet'
        mktoolboxdir
        getfiles(coreFiles);
        mktemplatedir;
        getfiles(cedetFiles);
      case 'support'
        mktemplatedir;
        getfiles(supportFiles);
      case 'all'
        mktoolboxdir
        getfiles(coreFiles);
        getfiles(tlcFiles);
        mktemplatedir;
        getfiles(cedetFiles);
        getfiles(supportFiles);
      otherwise
        error('Unknown fileset %s.', stuff.fileset);
    end    

    function mktemplatedir
        templateDir = fullfile(stuff.destination,'templates');
        if ~exist(templateDir,'dir')
            mkdir(templateDir);
        end
    end
    
    function mktoolboxdir
        toolboxDir = fullfile(stuff.destination,'toolbox');
        if ~exist(toolboxDir,'dir')
            mkdir(toolboxDir);
        end
    end

    function getfiles(fList)
        for i = 1:length(fList)
            file = fList{i};
            destFullFile = fullfile(stuff.destination,file);
            [ contents status ] = ...
                urlread(['http://matlab-emacs.cvs.sourceforge.net/viewvc/*checkout*/matlab-emacs/matlab-emacs/',...
                         file,'?revision=HEAD']);
            if ~status
                fprintf('Unable to download %s.\n', file);
            else
                fid = fopen(destFullFile,'w');
                fwrite(fid,contents);
                fclose(fid);
                fprintf('Successfully downloaded and created: ''%s''.\n',...
                        destFullFile);
            end
        end
    end
end

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss

Reply via email to