From: Dan Davison <firstname.lastname@example.org> To: "Sébastien Vauban" <public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@lo.gmane.org> Cc: emacs org-mode mailing list <email@example.com> Subject: Re: [BABEL] Two minor issues Date: Sat, 20 Nov 2010 13:05:54 +0000 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes: > Hi Dan, > > Dan Davison wrote: >>> #+begin_src emacs-lisp >>> ;; (message "Hello World") >>> #+end_src >> >> err, and I haven't had the energy to investigate this one yet! > > Another minibug, when natively fontifying, is that the line #+begin_src is no > more fontified up to the end of the screen (well to the end of the line): > choose a font with a background color, and you will notice the difference > immediately. Hi Seb, I do remember you reported this before, but I don't use faces with background colors and didn't get round to working out how to set the fonts. Could you provide a reproducible example with code to set up the necessary faces? The three changes you made in commit ff1b5de478e8575b2d8 to support fontification to end of line are marked below. I'm not totally clear which line is responsible for fontifying begin_src up the right-hand edge of the page. Is it this one? (add-text-properties beg beg1 '(face org-meta-line)) The thing is that your patch didn't change that line, which confuses me. But anyway, in the let binding at the top we have (beg1 (line-beginning-position 2)) which worries me slightly -- does that mean that your functionality relies on fontifying the first character of the *body* of the code block as org-meta-line? If so then isn't that incompatible with also fontifying the block contents as code? Your 3rd change is inside the cond, and org-src-fontify-natively comes earlier in the cond, so seb change 3 is not being evaluated when org-src-fontify-natively is turned on. But I guess that is not the problem as that code is dealing with the inside of the block, right? Dan #+begin_src emacs-lisp ;;; begin seb change 1 (add-text-properties (match-beginning 6) (+ (match-end 6) 1) '(font-lock-fontified t face org-block)) ; for backend-specific code ;;; end seb change 1 t) ((and (match-end 4) (equal dc3 "begin")) ;; Truly a block (setq block-type (downcase (match-string 5)) quoting (member block-type org-protecting-blocks)) (when (re-search-forward (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*") nil t) ;; on purpose, we look further than LIMIT (setq end (match-end 0) end1 (1- (match-beginning 0))) (setq block-end (match-beginning 0)) (when quoting (remove-text-properties beg end '(display t invisible t intangible t))) (add-text-properties beg end '(font-lock-fontified t font-lock-multiline t)) (add-text-properties beg beg1 '(face org-meta-line)) ;;; begin seb change 2 (add-text-properties end1 (+ end 1) '(face org-meta-line)) ; for end_src ;;; end seb change 2 (cond ((and lang org-src-fontify-natively) (org-src-font-lock-fontify-block lang block-start block-end)) (quoting ;;; begin seb change 3 (add-text-properties beg1 (+ end1 1) '(face org-block))) ; end of source block ;;; end seb change 3 ((not org-fontify-quote-and-verse-blocks)) ((string= block-type "quote") (add-text-properties beg1 end1 '(face org-quote))) ((string= block-type "verse") (add-text-properties beg1 end1 '(face org-verse)))) t)) #+end_src > > The line #+end_src is well correctly fontified from begin of a line to end of > screen. > > By end of screen, I mean the "whole line", even after the last character of > that line... Am I clear? > > Thanks. > > Best regards, > Seb
next prev parent reply other threads:[~2010-11-20 13:06 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-10-30 10:58 Jambunathan K 2010-11-20 0:07 ` Dan Davison 2010-11-20 7:19 ` Sébastien Vauban 2010-11-20 13:05 ` Dan Davison [this message] 2010-11-22 9:30 ` Sébastien Vauban 2010-11-22 14:20 ` Dan Davison 2010-11-22 20:14 ` Sébastien Vauban 2010-11-22 21:36 ` Sébastien Vauban
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --cc=public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@lo.gmane.org \ --subject='Re: [BABEL] Two minor issues' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).