comparison yatexprc.el @ 520:52175326855d dev

Avoid neglection of image re-generation by 'insert-image-file
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 09 Jan 2018 13:33:50 +0900
parents a6a80e2b6f5a
children 8eb15c0f9627
comparison
equal deleted inserted replaced
519:a6a80e2b6f5a 520:52175326855d
1 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- 1 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*-
2 ;;; 2 ;;;
3 ;;; (c)1993-2018 by HIROSE Yuuji.[yuuji@yatex.org] 3 ;;; (c)1993-2018 by HIROSE Yuuji.[yuuji@yatex.org]
4 ;;; Last modified Fri Jan 5 22:48:43 2018 on firestorm 4 ;;; Last modified Tue Jan 9 13:18:05 2018 on firestorm
5 ;;; $Id$ 5 ;;; $Id$
6 6
7 ;;; Code: 7 ;;; Code:
8 ;(require 'yatex) 8 ;(require 'yatex)
9 (require 'yatexlib) 9 (require 'yatexlib)
489 (get-buffer-create buffer) 489 (get-buffer-create buffer)
490 (or func 'YaTeX-showup-buffer-bottom-most) 490 (or func 'YaTeX-showup-buffer-bottom-most)
491 t) 491 t)
492 (remove-images (point-min) (point-max)) 492 (remove-images (point-min) (point-max))
493 (erase-buffer) 493 (erase-buffer)
494 (insert-image 494 (if data-p
495 (setq image (create-image 495 (insert-image
496 (if data-p imagesrc (expand-file-name imagesrc)) 496 (setq image (create-image imagesrc nil data-p)))
497 nil data-p))) 497 ;; create-image does not re-create img-object for the same file
498 (insert-image-file (expand-file-name imagesrc))
499 (setq image (plist-get (text-properties-at (point)) 'intangible)))
498 (YaTeX-preview-image-mode) 500 (YaTeX-preview-image-mode)
499 (let ((height (1+ (cdr (image-size image))))) 501 (let ((height (1+ (cdr (image-size image)))))
500 (enlarge-window 502 (enlarge-window
501 (- (ceiling (min height (/ (frame-height) 2))) 503 (- (ceiling (min height (/ (frame-height) 2)))
502 (window-height)))) 504 (window-height))))

yatex.org