From 065ab69e8b80cfbb22fde231f39b370e4c737cb8 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 9 Nov 2008 17:23:46 +0000 Subject: [PATCH] Add Emacs client as text editor. Courtesy of Jochen Trumpf, thanks! svn path=/trunk/KDE/kdegraphics/okular/; revision=882065 --- conf/dlgeditor.cpp | 1 + conf/okular.kcfg | 1 + core/texteditors_p.h | 2 ++ 3 files changed, 4 insertions(+) diff --git a/conf/dlgeditor.cpp b/conf/dlgeditor.cpp index b1e4819e3..81724ab6a 100644 --- a/conf/dlgeditor.cpp +++ b/conf/dlgeditor.cpp @@ -29,6 +29,7 @@ DlgEditor::DlgEditor( QWidget * parent ) m_dlg->kcfg_ExternalEditor->addItem( i18nc( "Text editor", "Kate" ), 1 ); m_dlg->kcfg_ExternalEditor->addItem( i18nc( "Text editor", "Kile" ), 2 ); m_dlg->kcfg_ExternalEditor->addItem( i18nc( "Text editor", "SciTE" ), 3 ); + m_dlg->kcfg_ExternalEditor->addItem( i18nc( "Text editor", "Emacs client" ), 4 ); m_dlg->kcfg_ExternalEditorCommand->setWhatsThis( i18nc( "@info:whatsthis", "Set the command of a custom text editor to be launched.
\n" diff --git a/conf/okular.kcfg b/conf/okular.kcfg index cfd959806..dd8c1a0ff 100644 --- a/conf/okular.kcfg +++ b/conf/okular.kcfg @@ -167,6 +167,7 @@ + diff --git a/core/texteditors_p.h b/core/texteditors_p.h index 247688d0c..69336dcd1 100644 --- a/core/texteditors_p.h +++ b/core/texteditors_p.h @@ -27,6 +27,8 @@ static inline QHash< int, QString > buildEditorsMap() QString::fromLatin1( "kile --line %l" ) ); editors.insert( Settings::EnumExternalEditor::Scite, QString::fromLatin1( "scite %f \"-goto:%l,%c\"" ) ); + editors.insert( Settings::EnumExternalEditor::Emacsclient, + QString::fromLatin1( "emacsclient -a emacs --no-wait +%l %f" ) ); return editors; }