all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#10601: 24.0.92; Visiting tgz files sets mode from File Local Variables
@ 2012-01-25 17:29 Juri Linkov
  2012-01-25 18:10 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2012-01-25 17:29 UTC (permalink / raw)
  To: 10601

When the last file in a tzg archive ends with the Local Variables section
where mode is specified (for the last file in the archive), then the whole
archive is visited in that mode instead of using `tar-mode'.

This is a regression caused by fixing bug#8586.

There are variables `inhibit-first-line-modes-regexps' and
`inhibit-first-line-modes-suffixes' that prevent getting mode from the
Local Variables section for tzg archives and other such file types.
But currently they are used to skip only scanning of the first -*- line.

To fix this regression, it is necessary to use these variables
to skip getting mode from the Local Variables section.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10601: 24.0.92; Visiting tgz files sets mode from File Local Variables
  2012-01-25 17:29 bug#10601: 24.0.92; Visiting tgz files sets mode from File Local Variables Juri Linkov
@ 2012-01-25 18:10 ` Eli Zaretskii
  2012-01-25 18:35   ` Juri Linkov
  2012-01-25 19:32   ` Juri Linkov
  0 siblings, 2 replies; 4+ messages in thread
From: Eli Zaretskii @ 2012-01-25 18:10 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 10601

> From: Juri Linkov <juri@jurta.org>
> Date: Wed, 25 Jan 2012 19:29:45 +0200
> 
> When the last file in a tzg archive ends with the Local Variables section
> where mode is specified (for the last file in the archive), then the whole
> archive is visited in that mode instead of using `tar-mode'.

Isn't this bug #10506 that Glenn fixed a few days ago?  When was your
Emacs built?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10601: 24.0.92; Visiting tgz files sets mode from File Local Variables
  2012-01-25 18:10 ` Eli Zaretskii
@ 2012-01-25 18:35   ` Juri Linkov
  2012-01-25 19:32   ` Juri Linkov
  1 sibling, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2012-01-25 18:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 10601

forcemerge 10506 10601
stop

> Isn't this bug #10506 that Glenn fixed a few days ago?  When was your
> Emacs built?

Thanks, I missed that.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10601: 24.0.92; Visiting tgz files sets mode from File Local Variables
  2012-01-25 18:10 ` Eli Zaretskii
  2012-01-25 18:35   ` Juri Linkov
@ 2012-01-25 19:32   ` Juri Linkov
  1 sibling, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2012-01-25 19:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 10601

> Isn't this bug #10506 that Glenn fixed a few days ago?  When was your
> Emacs built?

With bug#10506 Glenn also fixed the case of visiting `browser.jar'
that I reported in http://debbugs.gnu.org/10338#11

But visiting TGA image files still displays the message "Malformed -*- line"
as reported in http://debbugs.gnu.org/9044#29

I think `imagemagick-register-types' should add TGA to
`inhibit-local-variables-regexps':

=== modified file 'lisp/image.el'
--- lisp/image.el	2012-01-25 17:54:01 +0000
+++ lisp/image.el	2012-01-25 19:31:10 +0000
@@ -712,7 +712,8 @@ (defun imagemagick-register-types ()
 		     (not (memq (intern (upcase (symbol-name im-type)))
 				imagemagick-types-inhibit)))
 	    (push (cons (car header-regexp) 'imagemagick)
-		  image-type-header-regexps)))))))
+		  image-type-header-regexps))))
+      (push "\\.tga\\'" inhibit-local-variables-regexps))))
 
 (provide 'image)
 

This is desirable for TGA because it usually contains many occurences of -*-
in the first line.

Of course, in 24.2 it would be better to check for `image-mode'
to cover all other image formats as well.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-25 19:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-25 17:29 bug#10601: 24.0.92; Visiting tgz files sets mode from File Local Variables Juri Linkov
2012-01-25 18:10 ` Eli Zaretskii
2012-01-25 18:35   ` Juri Linkov
2012-01-25 19:32   ` Juri Linkov

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.