emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: src block face [8.3.1 (8.3.1-56-g17a225-elpaplus @ /Users/ctanis/.emacs.d/elpa/org-plus-contrib-20150817/)]
@ 2015-08-17 23:24 Tanis, Craig
  2015-08-18 14:36 ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Tanis, Craig @ 2015-08-17 23:24 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

SRC blocks don't show correct face when a language is specified.

#+begin_src 
  correctly shows in 'org-block face
#+end_src

#+begin_src language
incorrectly shows in 'default face
#+end_src





Emacs  : GNU Emacs 24.5.1 (x86_64-apple-darwin14.3.0, NS apple-appkit-1347.57)
of 2015-04-15 on zartan
Package: Org-mode version 8.3.1 (8.3.1-56-g17a225-elpaplus @ /Users/ctanis/.emacs.d/elpa/org-plus-contrib-20150817/)

current state:
==============
(setq
org-tab-first-hook '(yas/org-very-safe-expand org-hide-block-toggle-maybe
                      org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-goto-interface 'outline-path-completion
org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
org-agenda-diary-file "~/Dropbox/org/diary.org"
org-mac-grab-Chrome-app-p nil
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-log-done 'time
org-confirm-shell-link-function 'yes-or-no-p
org-image-actual-width nil
org-mac-grab-Firefox-app-p nil
org-startup-folded nil
org-yank-folded-subtrees nil
org-list-allow-alphabetical t
org-special-ctrl-a/e 'reversed
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-src-mode-hook '(org-src-babel-configure-edit-buffer
                     org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-mode-hook '(#[nil "\301\b\302\303#\207"
                   [org-mode-map define-key "g" org-mac-grab-link] 4]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-show-block-all append
                    local]
                   5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-babel-show-result-all
                    append local]
                   5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load
                 (lambda nil (make-variable-buffer-local (quote yas/trigger-key))
                  (setq yas/trigger-key [tab])
                  (if (member (quote yas/org-very-safe-expand) org-tab-first-hook)
                   org-tab-first-hook
                   (setq org-tab-first-hook
                    (cons (quote yas/org-very-safe-expand) org-tab-first-hook))
                   )
                  (define-key yas/keymap [tab] (quote yas-next-field)))
                 (lambda nil (local-set-key "\220" (quote org-backward-element))
                  (local-set-key "\216" (quote org-forward-element))
                  (local-set-key "\373" (quote backward-paragraph))
                  (local-set-key "\375" (quote forward-paragraph))
                  (local-set-key "\225" (quote org-up-list-or-element))
                  (local-set-key "\204" (quote org-down-element))
                  (local-set-key "\367" (quote org-refile-fullpath))
                  (local-set-key "\342" (quote org-mark-ring-goto))
                  (local-set-key "\356" (quote org-next-block))
                  (local-set-key "\360" (quote org-previous-block))
                  (auto-fill-mode 1) (toggle-truncate-lines -1)
                  (local-set-key (kbd "C-c SPC") (quote ace-jump-mode)))
                 )
org-refile-targets '((nil :maxlevel . 9))
org-outline-path-complete-in-steps nil
org-archive-hook '(org-attach-archive-delete-maybe)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-refile-use-outline-path t
org-directory "~/Dropbox/org"
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
org-archive-default-command 'org-toggle-archive-tag
org-hide-emphasis-markers t
org-catch-invisible-edits 'smart
org-babel-tangle-lang-exts '(("python" . "py") ("java" . "java") ("D" . "d")
                              ("C++" . "cpp") ("perl" . "pl") ("emacs-lisp" . "el")
                              ("elisp" . "el"))
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-log-into-drawer t
org-ditaa-jar-path "/usr/local/Cellar/ditaa/0.9/libexec/ditaa0_9.jar"
org-completion-use-ido t
org-babel-load-languages '((emacs-lisp . t) (perl . t) (C . t) (java . t)
                            (python . t) (ditaa . t) (dot . t) (gnuplot . t)
                            (octave . t) (calc . t) (sh . t))
org-cycle-global-at-bob t

org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
)


----
Craig Tanis, Ph.D.
UTC Computer Science
craig-tanis@utc.edu

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

* Re: Bug: src block face [8.3.1 (8.3.1-56-g17a225-elpaplus @ /Users/ctanis/.emacs.d/elpa/org-plus-contrib-20150817/)]
  2015-08-17 23:24 Bug: src block face [8.3.1 (8.3.1-56-g17a225-elpaplus @ /Users/ctanis/.emacs.d/elpa/org-plus-contrib-20150817/)] Tanis, Craig
@ 2015-08-18 14:36 ` Kyle Meyer
  2015-08-18 14:55   ` Tanis, Craig
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2015-08-18 14:36 UTC (permalink / raw)
  To: Tanis, Craig; +Cc: emacs-orgmode@gnu.org

"Tanis, Craig" <Craig-Tanis@utc.edu> writes:

> SRC blocks don't show correct face when a language is specified.
>
> #+begin_src
>   correctly shows in 'org-block face
> #+end_src
>
> #+begin_src language
> incorrectly shows in 'default face
> #+end_src

I suspect that in your second block you're using text the would have the
default face in a buffer for that language.

Depending on the value of org-src-fontify-natively, Org will try to
highlight the block according to the language.

So

#+begin_src
  (message "yes")
#+end_src

will use the org-block face, but

#+begin_src elisp
  (message "yes")
#+end_src

will highlight according to emacs-lisp-mode.

If org-src-fontify-natively is nil, the org-block face will be used for
the second block as well.

--
Kyle

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

* Re: Bug: src block face [8.3.1 (8.3.1-56-g17a225-elpaplus @ /Users/ctanis/.emacs.d/elpa/org-plus-contrib-20150817/)]
  2015-08-18 14:36 ` Kyle Meyer
@ 2015-08-18 14:55   ` Tanis, Craig
  2015-08-18 15:23     ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Tanis, Craig @ 2015-08-18 14:55 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode@gnu.org

Aha!  In my configuration, I was fontifying org-block to use a different background color and font family.  I don't suppose there's some way to get the best of both worlds: visibly distinct org-blocks with mode-specific keyword fontification?

Thanks,
Craig

> On Aug 18, 2015, at 10:36 AM, Kyle Meyer <kyle@kyleam.com> wrote:
> 
> "Tanis, Craig" <Craig-Tanis@utc.edu> writes:
> 
>> SRC blocks don't show correct face when a language is specified.
>> 
>> #+begin_src
>>  correctly shows in 'org-block face
>> #+end_src
>> 
>> #+begin_src language
>> incorrectly shows in 'default face
>> #+end_src
> 
> I suspect that in your second block you're using text the would have the
> default face in a buffer for that language.
> 
> Depending on the value of org-src-fontify-natively, Org will try to
> highlight the block according to the language.
> 
> So
> 
> #+begin_src
>  (message "yes")
> #+end_src
> 
> will use the org-block face, but
> 
> #+begin_src elisp
>  (message "yes")
> #+end_src
> 
> will highlight according to emacs-lisp-mode.
> 
> If org-src-fontify-natively is nil, the org-block face will be used for
> the second block as well.
> 
> --
> Kyle

----
Craig Tanis, Ph.D.
UTC Computer Science
craig-tanis@utc.edu

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

* Re: Bug: src block face [8.3.1 (8.3.1-56-g17a225-elpaplus @ /Users/ctanis/.emacs.d/elpa/org-plus-contrib-20150817/)]
  2015-08-18 14:55   ` Tanis, Craig
@ 2015-08-18 15:23     ` Kyle Meyer
  0 siblings, 0 replies; 4+ messages in thread
From: Kyle Meyer @ 2015-08-18 15:23 UTC (permalink / raw)
  To: Tanis, Craig; +Cc: emacs-orgmode@gnu.org

"Tanis, Craig" <Craig-Tanis@utc.edu> writes:

> I don't suppose there's some way to get the best of both worlds:
> visibly distinct org-blocks with mode-specific keyword fontification?

Not that I'm aware of (but see the recent thread on the removed
org-block-background face [1]).  You could change the
org-block-begin-line and org-block-end-line faces to be very distinct,
but that isn't the actual source block.

[1] http://thread.gmane.org/gmane.emacs.orgmode/99902.

--
Kyle

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

end of thread, other threads:[~2015-08-18 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-17 23:24 Bug: src block face [8.3.1 (8.3.1-56-g17a225-elpaplus @ /Users/ctanis/.emacs.d/elpa/org-plus-contrib-20150817/)] Tanis, Craig
2015-08-18 14:36 ` Kyle Meyer
2015-08-18 14:55   ` Tanis, Craig
2015-08-18 15:23     ` Kyle Meyer

Code repositories for project(s) associated with this public 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).