Bug#842317: caja: Type misidentified - octave code listed as objective-C

2017-05-07 Thread Vlad Orlov
Hi,

This is not a Caja bug. This is an old problem that affects also text editors
(gedit, pluma), other desktops (Xfce), etc etc etc.


google: m files octave Objective-C

Some results:

https://bugs.launchpad.net/ubuntu/+source/gtksourceview2/+bug/451816
https://bugzilla.gnome.org/show_bug.cgi?id=598579
https://forums.gentoo.org/viewtopic-t-1060538.html
http://abautu.blogspot.ru/2009/08/octave-files-misdetected-as-objective-c.html
https://mail.gnome.org/archives/gedit-list/2010-March/thread.html#00033


So, it's not fixable at our level.

Side note: it's claimed to be fixed in gtksourceview, but I still see it when
opening your example .m file in Pluma - it's marked as Obj-C file.



Bug#842317: caja: Type misidentified - octave code listed as objective-C

2017-01-24 Thread Mike Gabriel

Hi Harvey,

On  Fr 28 Okt 2016 05:46:29 CEST, Harvey J Stein wrote:


Package: caja
Version: 1.12.7-1+rosa
Severity: normal

Dear Maintainer,

Caja is listing some octave (.m) files as type Objective-C source code.  For
example, the following file (hw06reduced.m) is listed as Objective0C source
code:

= Cut here ===
1;


times = [0, 1, 2, 1000];
lambdas = [0.015, 0.02, 0.025, 0.025];

% Step function for defining hazard rate
function s = step(x, y, t)
   i = find(x>t, 1);
   if isempty(i)
   s = y(end);
   elseif i == 1
  s = [];
   else
  s = y(i-1);
   end;
end;

% Survival probabilities
function s = survival(times, lambdas, t)
dt = diff(times);
intlambdavect = [0 cumsum(dt .* lambdas(1:end-1))];
c = interp1(times, intlambdavect, t);

s = exp(-c);
end;

% Spot spreads as a function of hazard rates
function s = spread(times, lambdas, R, t)
invtimes = -1 ./ t;
s = invtimes .* log(1 - (1-R)*(1-survival(times, lambdas, t)))*1;
end;
= Cut here ===


This surely is a MIME type issue, I guess, as the .m file ending may  
be registered as Object-C source code. Actually, I don't know.


What would you expect instead? Do other browsers in Debian behave  
differently? How can a simple application distinguish on from the  
other except from looking at the file ending?


How can we (Debian MATE Team) help you with the above problem? (I know  
this comes late, but the release is at the door, so we triage our  
bugs...).


Mike
--

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de



pgpouWfR16Lp0.pgp
Description: Digitale PGP-Signatur


Bug#842317: caja: Type misidentified - octave code listed as objective-C

2016-10-27 Thread Harvey J Stein
Package: caja
Version: 1.12.7-1+rosa
Severity: normal

Dear Maintainer,

Caja is listing some octave (.m) files as type Objective-C source code.  For
example, the following file (hw06reduced.m) is listed as Objective0C source
code:

= Cut here ===
1;


times = [0, 1, 2, 1000];
lambdas = [0.015, 0.02, 0.025, 0.025];

% Step function for defining hazard rate
function s = step(x, y, t)
   i = find(x>t, 1);
   if isempty(i)
   s = y(end);
   elseif i == 1
  s = [];
   else
  s = y(i-1);
   end;
end;

% Survival probabilities
function s = survival(times, lambdas, t)
dt = diff(times);
intlambdavect = [0 cumsum(dt .* lambdas(1:end-1))];
c = interp1(times, intlambdavect, t);

s = exp(-c);
end;

% Spot spreads as a function of hazard rates
function s = spread(times, lambdas, R, t)
invtimes = -1 ./ t;
s = invtimes .* log(1 - (1-R)*(1-survival(times, lambdas, t)))*1;
end;
= Cut here ===



-- System Information:
Debian Release: jessie/sid
  APT prefers trusty-updates
  APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-45-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages caja depends on:
ii  caja-common   1.12.7-1+rosa
ii  desktop-file-utils0.22-1ubuntu1
ii  gvfs  1.20.3-0ubuntu1.2
ii  libatk1.0-0   2.10.0-2ubuntu2
ii  libc6 2.19-0ubuntu6.9
ii  libcairo2 1.13.0~20140204-0ubuntu1.1
ii  libcaja-extension11.12.7-1+rosa
ii  libexempi32.2.1-1ubuntu1
ii  libexif12 0.6.21-1ubuntu1
ii  libgail18 2.24.23-0ubuntu1.4
ii  libgdk-pixbuf2.0-02.30.7-0ubuntu1.6
ii  libglib2.0-0  2.40.2-0ubuntu1
ii  libglib2.0-data   2.40.2-0ubuntu1
ii  libgtk2.0-0   2.24.23-0ubuntu1.4
ii  libice6   2:1.0.8-2
ii  libmate-desktop-2-17  1.12.0.1-1+rosa
ii  libpango-1.0-01.36.3-1ubuntu1.1
ii  libpangocairo-1.0-0   1.36.3-1ubuntu1.1
ii  libselinux1   2.2.2-1ubuntu0.1
ii  libsm62:1.2.1-2
ii  libunique-1.0-0   1.1.6-4ubuntu2
ii  libx11-6  2:1.6.2-1ubuntu2
ii  libxml2   2.9.1+dfsg1-3ubuntu4.8
ii  libxrender1   1:0.9.8-1build0.14.04.1
ii  mate-desktop  1.12.0.1-1+rosa
ii  shared-mime-info  1.2-0ubuntu3

Versions of packages caja recommends:
ii  gvfs-backends  1.20.3-0ubuntu1.2

Versions of packages caja suggests:
ii  engrampa1.12.0-1+rosa
ii  gstreamer1.0-tools  1.2.4-0ubuntu1
ii  meld1.8.4-1

-- no debconf information